Blysco
New Member
- Joined
- Oct 12, 2013
- Messages
- 163
- Reaction score
- 2
What musst i change that a player get teleportet to his home-City ?
And what is wrong with exhaust ??
I want 20 minutes exhaust time 2000secs
That means you cann use the scroll every 20 min to teleport you to your home City.
Please help me
And what is wrong with exhaust ??
I want 20 minutes exhaust time 2000secs
That means you cann use the scroll every 20 min to teleport you to your home City.
Please help me
Code:
local newpos = {x=32369, y=32241, z=7}
local time = 50
function onUse(cid, item, frompos, item2, topos)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
if exhaustion.check(cid, 1949) then
return doPlayerSendCancel(cid, "Please Wait "..exhaustion.get(cid,1605)..".") and doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
if not inFight then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid,newpos)
doCreatureSay(cid, "The scroll teleportet you back to your Home-City !", TALKTYPE_ORANGE_1)
exhaustion.set(cid, 1605, time)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can't use the teleport scroll if you are PZ LOCKED!!")
end
return true
end