Rufo
New Member
- Joined
- Jan 9, 2008
- Messages
- 251
- Reaction score
- 1
I saw a friend of mine, asking for this script, this tps you to an "x" position, then you use it again and tps you back to temple, you may not have pz lock. its fully configurable and please dont delete the credits :*.
Tested on TFS 0.3.4+ (It only prints an error but theres no problem)
And on actions.xml
Tested on TFS 0.3.4+ (It only prints an error but theres no problem)
LUA:
function onUse(cid, item, frompos, item2, topos)
-- 100% by Rufo
-- [url]Http://myrland.servegame.com/[/url]
-- Config
local iditem = XXXX -- Id of your scroll.
local actionitem = XXXX -- Actionid thats gonna be added to scroll.
local temple = getPlayerMasterPos(cid) -- Dont touch
local nuevapos = {x=xxxx, y=xxxx, z=x} -- New position
-- End config
if item.itemid == iditem and isPlayerPzLocked(cid) == FALSE then
if item.actionid == actionitem then
doTeleportThing(cid,temple)
doRemoveItem(item.uid,1)
else
doSetItemActionId(item.uid, actionitem)
doTeleportThing(cid,nuevapos)
end
else
doCreatureSay(cid,"You cant use this scroll with protection zone lock.", TALKTYPE_ORANGE_1)
end
return TRUE
end
And on actions.xml
<action itemid="Itemidofthescript" event="script" value="nameofscript.lua" />
<action actionid="actionidofthescript" event="script" value="nameofscript.lua" />
Last edited: