Jaed Le Raep
★Gaeming★
- Joined
- Sep 3, 2007
- Messages
- 1,295
- Reaction score
- 441
Hey guys, I'm trying to add a thing in which if the player is in battle and they stepped on this tile, then it wouldn't work, but if they're not in battle, then it would work. The script is below, just can't figure out a parameter for it to work.
Code:
local delay = 5 * 1
local newpos = {x = 1068, y = 1047, z = 7}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if (isPlayer(cid)) then
addEvent(function(cid, block, newpos)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You begin to sink into the depths of the sinkhole.")
if (isPlayer(cid)) then
doTeleportThing(cid, newpos)
end
end, delay * 1000, cid, false, newpos)
end
return true
end