Jump to content
Abdelrahman Hajjaj

Temp Bag, Inv to Website

Recommended Posts

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.    

Share this post


Link to post
Share on other sites

Hello @Abdelrahman Hajjaj!

 

See this topic:

 

You can find here example of usage class.inventorydecrypt.php


Share this post


Link to post
Share on other sites

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 :) 

Share this post


Link to post
Share on other sites

@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 = @#

 


Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

@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 :D 

 

@Vasil

why would u do that? more space? 

Share this post


Link to post
Share on other sites
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 :D 

 

@Vasil

why would u do that? more space? 

Yeah. It would help the player to clean his inventory :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...