• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Well tested open source PHP Cabal helper classes

Joined
Jun 10, 2009
Messages
659
Reaction score
141
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 duck 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!
 
Joined
Jun 10, 2009
Messages
659
Reaction score
141
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
 
Joined
Jun 10, 2009
Messages
659
Reaction score
141
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.
 
Joined
Jun 10, 2009
Messages
659
Reaction score
141
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.
 
Joined
Jun 10, 2009
Messages
659
Reaction score
141
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');
 
Newbie Spellweaver
Joined
Dec 27, 2017
Messages
29
Reaction score
1
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
Top