• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Teleport Scroll "only can use in temple"

adry

Mapper/scripter
Joined
Aug 30, 2010
Messages
64
Reaction score
4
Location
Venezuela
Hello guys need some script Teleport onUse item , but only can teleport with you stay in temple.
 
data/actions/actions.xml
Code:
<action itemid="ITEM_ID_HERE" script="name.lua"/>

data/actions/scripts/name.lua
Code:
local config = {
   teleportTo = {x=3333, y=5555, z=7} -- position the player will be teleported to
}

function onUse(cid, item, frompos, item2, topos)
   if (getTilePzInfo(getPlayerPosition(cid)) == TRUE) then
   doTeleportThing(cid, config.teleportTo)
   doSendMagicEffect(config.teleportTo, 10)
   else
   doPlayerSendTextMessage(cid,22,"You can only use this item inside protection zone!")
   end
   return true
end

Not tested, tell me if it worked..
Since there is no function which checks the temple, this script can be used only on pz tiles.
 
Back
Top