Abdelrahman Hajjaj 3 Report post Posted October 20, 2016 Hi, i have a problem decrying the resource table, since i'm making my own website (note. it's not in php). i read the class.inventorydecrypt.php class from a website template but i dont get it all since there is no comments. so can anyone help me please. Quote Share this post Link to post Share on other sites
V3ct0r 2,121 Report post Posted October 20, 2016 Hello @Abdelrahman Hajjaj! See this topic: You can find here example of usage class.inventorydecrypt.php Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Abdelrahman Hajjaj 3 Report post Posted October 20, 2016 hi, @V3ct0r thank you very much just a small question in this function function loadEncodedInventory($cryptedInv, $key) { list($maxSize,$no,$cryptedInv) = split ('[@#]', $cryptedInv, 3); $decypheredInv = decrypt($cryptedInv, $key); $inventory = loadInventory($maxSize,$no,$decypheredInv); return ($inventory); } the split function how does it work as far as i know the 1st param is the split identifier or something like that , 2nd param is the crypted string to split, whats the 3rd param can you explain plz ? sorry for being annoying Quote Share this post Link to post Share on other sites
Billy 164 Report post Posted October 20, 2016 first param is REGEX to split by, in this case it splits by @ and # . Third param is the max amount of splits 2 Quote Share this post Link to post Share on other sites
Abdelrahman Hajjaj 3 Report post Posted October 20, 2016 oh thanks @Billy one more tiny question can i assume that "@#" is an array of chars (length 2), i mean can i make it '@' + '#' ? Quote Share this post Link to post Share on other sites
V3ct0r 2,121 Report post Posted October 21, 2016 @Abdelrahman Hajjaj Any string is array of chars: <?php $str = '@#'; $foo = $str[0] . $str[1]; echo '$str[0] = ' . $str[0] . '<br />'; echo '$str[1] = ' . $str[1] . '<br />'; echo '$foo = ' . $foo . '<br />'; ?> Output: $str[0] = @ $str[1] = # $foo = @# Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Vasil 71 Report post Posted October 21, 2016 Since its speaking about temp inv. Anyone has an idea how to make item transferable from normal inv to temp bag by a command?eg /temp Quote Share this post Link to post Share on other sites
Abdelrahman Hajjaj 3 Report post Posted October 21, 2016 @V3ct0r yea ik that any string is an array of chars. i meant with my question that would it be better to work with string or array of chars (as i mentioned before i'm not working with php so even if they will give the same output, the interaction with them is different) but anyway thanks for help @Vasil why would u do that? more space? Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted October 21, 2016 22 minutes ago, Abdelrahman Hajjaj said: @V3ct0r yea ik that any string is an array of chars. i meant with my question that would it be better to work with string or array of chars (as i mentioned before i'm not working with php so even if they will give the same output, the interaction with them is different) but anyway thanks for help @Vasil why would u do that? more space? Yeah. It would help the player to clean his inventory Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted October 28, 2016 BUMPS @V3ct0r Quote Share this post Link to post Share on other sites