god of war
Member
Hello i need a script that when players are vip they can go down certain stairs and if they arent they get teleported back
<movevent type="StepIn" uniqueid="30000" event="script" value="viptp.lua"/>
local place = {x=927, y=1014, z=8}
function onStepIn(cid, item, pos, fromPos)
if isPlayer(cid) then
if getPlayerVipDays(cid) ~= 0 then
doSendMagicEffect(pos, 2)
doTeleportThing(cid, place)
doSendMagicEffect(place,10)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not VIP")
doTeleportThing(cid, {x=1000, y=998, z=7})
end
end
end
It could just be doTeleportThing(cid, fromPos)just put Uniqueid on the stairs and use this script
movements.xml
create file viptp.luaCode:<movevent type="StepIn" uniqueid="30000" event="script" value="viptp.lua"/>
Code:local place = {x=927, y=1014, z=8} function onStepIn(cid, item, pos, fromPos) if isPlayer(cid) then if getPlayerVipDays(cid) ~= 0 then doSendMagicEffect(pos, 2) doTeleportThing(cid, place) doSendMagicEffect(place,10) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not VIP") doTeleportThing(cid, {x=1000, y=998, z=7}) end end end
ya but i don't want him to spam next the tp
so get back him to temple better ?![]()
[19/08/2011 17:15:08] [Error - MoveEvents Interface]
[19/08/2011 17:15:08] data/movements/scripts/viptp.luanStepIn
[19/08/2011 17:15:09] Description:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:15:09] stack traceback:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: in function <data/movements/scripts/viptp.lua:2>
[19/08/2011 17:15:09] [Error - MoveEvents Interface]
[19/08/2011 17:15:09] data/movements/scripts/viptp.luanStepIn
[19/08/2011 17:15:09] Description:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:15:09] stack traceback:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: in function <data/movements/scripts/viptp.lua:2>
[19/08/2011 17:15:10] [Error - MoveEvents Interface]
[19/08/2011 17:15:10] data/movements/scripts/viptp.luanStepIn
[19/08/2011 17:15:10] Description:
[19/08/2011 17:15:10] data/movements/scripts/viptp.lua:4: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:15:10] stack traceback:
[19/08/2011 17:15:10] data/movements/scripts/viptp.lua:4: in function <data/movements/scripts/viptp.lua:2>
function onStepIn(cid, item, pos, fromPos)
if isPlayer(cid) then
if getPlayerVipDays(cid) ~= 0 then
doSendMagicEffect(pos, 2)
doTeleportThing(cid, pos)
doSendMagicEffect(place,10)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not VIP")
doTeleportThing(cid, fromPos)
end
end
end
[19/08/2011 17:38:29] [Error - MoveEvents Interface]
[19/08/2011 17:38:29] data/movements/scripts/viptp.luanStepIn
[19/08/2011 17:38:29] Description:
[19/08/2011 17:38:29] data/movements/scripts/viptp.lua:3: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:38:29] stack traceback:
[19/08/2011 17:38:29] data/movements/scripts/viptp.lua:3: in function <data/movements/scripts/viptp.lua:1>
i still get this error ;s