• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Item storage value / table index and uid changes

G4BB3R

New Member
Joined
Jul 23, 2010
Messages
80
Reaction score
4
Hello...
I need a way to set a storage value for a item that is created in the ground...

Just an example:
Code:
local bomb = A_COOL_STONE_ID_OR_SOMETHING_LOL
local biriba = doCreateItem(bomb, 1, getPlayerPosition(cid))
doItemSetAttribute(biriba, "storage1", 29)
doItemSetAttribute(biriba, "storage2", 34)       
-- how i'll do it ? and whats the function that show the item atributes ?

other problem:
I indexed the table lol.storage1[ getitem.uid ] = 20 --( getitem.uid == 161
but in the time i'll check again, the index and uid changed ._. its very strange D:
getitem.uid now is == 162 or other increased number
The uid changes, and I dont know why ;/
ps.: every time i check the uid using getThingfromPos..

ideas ?
thank you :D
 
Imagine that I want to hold information of 10++ stones created in the ground in a table.
if I use uniqueID, I will hold only one information: table[ UNIQUE_ID ]
but If I use the item uid, (there's no item with the same uid) I will hold everything I want to... :)
But the problem is the item uid in the ground is changing (Idk why ._.)
So, what value I can index in a table and there's no conflict between the items values ?

Sorry, my english sucks ):
Thankxx
 
Last edited:
well, I solved this problem setting actionIDs to the respectives stones and adding to the table and the AID of the stone as index =P



But now I im almost dying, because the global variables and global tables that I use on talkactions dont appear on actions ): ): ):

How to set global variables as a normal var or as a table, that work for every place in the OTserver (actions, talkactions, movements, etc)
Thanks
 
Back
Top