function onStepIn(cid, item, fromPosition, toPosition)
if not isPremium(cid) then
doTeleportThing(cid, {x = 100, y = 100, z = 7}, true)
doCreatureSay(cid, "Only Premium players are allowed to pass!", TALKTYPE_MONSTER)
end
end
data/movements/scripts/script.lua
LUA:function onStepIn(cid, item, fromPosition, toPosition) if not isPremium(cid) then doTeleportThing(cid, {x = 100, y = 100, z = 7}, true) doCreatureSay(cid, "Only Premium players are allowed to pass!", TALKTYPE_MONSTER) end end
It will probably be more than just one tile, so you need multiple position to get teleported back to if you don't have premium, right? Wouldn't it be smarter to teleport the player to lastPos? I'm a newb in lua ...
It will probably be more than just one tile, so you need multiple position to get teleported back to if you don't have premium, right? Wouldn't it be smarter to teleport the player to lastPos? I'm a newb in lua ...
local t = {
[1220] = {x = 100, y = 100, z = 7},
[1221] = {x = 100, y = 100, z = 7}
}
function onStepIn(cid, item, fromPosition, toPosition)
local k = t[item.actionid]
if(k and not isPremium(cid)) then
doTeleportThing(cid, k, false)
doSendMagicEffect(k, CONST_ME_TELEPORT)
doCreatureSay(cid, "Only premium players may pass!", TALKTYPE_MONSTER)
end
end