• 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!

Lua TFS 1.0 Metatable and Userdata questions

Karain

Jack of all trades
Joined
Jul 9, 2009
Messages
338
Solutions
3
Reaction score
147
Location
Egypt
Hello, it's been a while since i played around with TFS' Lua, but since TFS 1.0 has been massively updated with tons of new functions and features, i wanted to give it a try with some crazy script idea. but i hit a problem

i still can't get my head around the metatables.

for example:
  1. tile:getItems()

    i know it returns an array, but the value of it's keys are nul, and it's not nested array.. so what exactly can i do with it? i can't even get the id of the items on the tile...
Anyone wanna help me on that?

Thanks in advance.
 
Thanks a lot summ for answering my question.

i have another question about monster scripts, I found out that i can create scripts in monsters/scripts folder, but one thing struck me is the default onThink function doesn't take any parameter, specially "cid" therefor i can't really do much with this function, but i need it.

Is there a way around it? creaturescript maybe?
 
Back
Top