ares413
New Member
- Joined
- Apr 1, 2010
- Messages
- 130
- Reaction score
- 3
i have a rebirth server im working on,
the global storage for rebirth is 2500
i want a tp(portal) that when stepped on, checks if that storage is 5 or more, and sends you through if so.
if not it teleports you to a different position.
can anyone help?
rep++
Edit: i know its a movement step in script, i just cant get it right. please help!
Edit: i just found this script and changed it a bit, still not working
the global storage for rebirth is 2500
i want a tp(portal) that when stepped on, checks if that storage is 5 or more, and sends you through if so.
if not it teleports you to a different position.
can anyone help?
rep++
Edit: i know its a movement step in script, i just cant get it right. please help!
Edit: i just found this script and changed it a bit, still not working
Code:
function onStepIn(cid, item, position, fromPosition)
local config = {
uniqueid = 1112, ---item unique id
vipstorage = 2500, ---- storage of vip player
kickpos = {x=1090, y=1062, z=7, stackpos=1 } --- position where non vip player will be kicked
}
if(item.uid == config.uniqueid) then
if (getPlayerStorageValue(cid, config.vipstorage) == 0) then
doTeleportThing(cid, config.kickpos)
doCreatureSay(cid, "You need atleast 1 rebirth", TALKTYPE_ORANGE_2, getCreaturePosition(cid))
else
doPlayerSendTextMessage(cid, 20, 'Welcome to the first rebirth spawn.')
end
end
return TRUE
end
Code:
<movevent type="StepIn" itemid="1112" event="script" value="teleport1.lua"/>
Last edited: