Well tested open source PHP Cabal helper classes

Programmer
Decennium
Joined
Jun 10, 2009
Messages
731
Reaction score
176
While I was building a CMS in PHP for Cabal server, I noticed that lot of PHP code was scattered around in this section. Some worked and others did not. It was bit hard to find pieces of important code like decoding style etc. which actually worked and did not **** up the data. Hence once I wrote/found working code I decided to make a bunch of open source helpers classes that can be used by any PHP developer who intends to build control panels for his/her website.

Link:

Currently there are some character helpers methods as well as game constant listing methods only. Tests have been written for all the available methods too.

In the future I have plans of adding item code and item option generating helper methods, methods to help edit server files to manipulate drops, start/stop/restart server etc.

Feedback and feature suggestions are always welcome. If you find issues please report it in Github itself so that it is easy to track.

Happy server development guys!
 
Keep going on this project.
Item generation is described here in ragezone, however the slot and craft options could be server specific.
 
Version 1.2.0 released with item code as well as item options generation helper classes. README has been updated with basic usage details for anyone who wants to start using the library!
 
Version 1.3.0 has been released with the following things

* ItemCode extract method: This will return the original item code, binding and grade from the given generated item code
* ItemOption extract methods: This will returns slot count, craft count, slots options and craft options from the given generated item option
 
Version 1.4.0 has been released with the following things

* Binary item list decode feature. This method can used to decode inventory as well as warehouse data from their respective tables saved in Cabal server database.
 
Version 1.5.0 has been released with the following things

* Remove item slot option from item option code feature has been added.
 
Version 1.6.0 has been released with the following changes

* Remove all slot options from item option feature added.
* Remove binding from item code feature added.
* Max grade of an item has been updated from 15 to 20 in ItemCode class to generate items with +20 grade.
 
Hi there,

Can you give us an example on how to use your cabal_msg reader support?

Thanks in advance.,

Convert cabal_msg.enc to cabal_msg.dec and then use the class CabalMsg getArray method to get the full content of the file. Do something like this after placing cabal_msg.dec in same folder as PHP code:

PHP:
<?php
require 'vendor/autoload.php';
$cabalMsgDecoder = new cyberinferno\Cabal\Helpers\FileSystem\Client\CabalMsg('cabal_msg.dec');
echo '<pre>' . print_r($cabalMsgDecoder->getArray(), true) . '</pre>';

If you can want only some info like item details then you can call getArray by sending top level key as parameter:

PHP:
$cabalMsgDecoder->getArray('item_msg');
 
Hi again,

Do you have an item encoder?

From your decoder to re-encode methods?

From this
[itemCode] => 1
[itemOption] => 0
[itemInventorySlot] => 2

to HEX Binary value?Looking forward for your reply.

TIA
 
Back