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

How to set "cid" in onAddItem function?

Hermes

dziwki kola gramy w lola
Joined
Nov 17, 2007
Messages
1,867
Reaction score
14
Location
Poland
Hi there!

I am writing a script using function onAddItem (which is not included in LUA_FUNCTIONS!):

Code:
function onAddItem(moveitem, tileitem, pos)

Yeah, it works, but I can't do something with a player for which script was executed (cid), because cid isn't there as a parameter :f.

Is there any way to define player in LUA script?

Regards,
Hermes
 
@up
That is checking is the thing that launched the script is player or it's monster or whatever. Also, it's using (cid) parameter, so it will print error, because cid will be nil if it's not used in function.

@slawkens
Thank you :>
 
Back
Top