Code:
function onAddItem(moveitem, tileitem, pos, cid)
local newpos = {x=32791, y=32332, z=10}
if tileitem.uid == 10200 and moveitem.type == 2 then
doRemoveItem(moveitem.uid, 1)
doSendMagicEffect(pos,0)
doTeleportThing(cid, newpos)
doCreatureSay(cid, "Muahahahaha...", TALKTYPE_ORANGE_1, false, 0, newpos)
doSendMagicEffect(newpos,10)
end
return TRUE
end
Well, it was supposed to work.. but it send me errors in console saying that has a nil value at do teleportThing ( probably cid)...
Any ideas? :S