beliar34
Member
- Joined
- Feb 28, 2012
- Messages
- 307
- Solutions
- 7
- Reaction score
- 11
Hello i made simple script that teleport us like teleport in diablo 2
First use : teleport to temple
Second use : teleport back to place where you use first tp
third use : teleport to temple and loop is going on
To use you cant have PZ
Script :
First use : teleport to temple
Second use : teleport back to place where you use first tp
third use : teleport to temple and loop is going on
To use you cant have PZ
Script :
Code:
function onUse(cid, item, frompos, item2, topos)
local temple = getPlayerMasterPos(cid)
local graczpos = getPlayerPosition(cid)
if hasCondition(cid, CONDITION_INFIGHT) == false then
if ((getPlayerStorageValue(cid, 80000) == 0) or (getPlayerStorageValue(cid, 80000) == -1)) then
setPlayerStorageValue(cid,80001,graczpos.x)
setPlayerStorageValue(cid,80002,graczpos.y)
setPlayerStorageValue(cid,80003,graczpos.z)
setPlayerStorageValue(cid,80000,1)
doTeleportThing(cid,temple)
doSendMagicEffect(temple, 41)
elseif getPlayerStorageValue(cid, 80000) == 1 then
doTeleportThing(cid, {x = getPlayerStorageValue(cid, 80001), y = getPlayerStorageValue(cid, 80002), z = getPlayerStorageValue(cid, 80003)})
setPlayerStorageValue(cid,80000,0)
end
else
doCreatureSay(cid, "Cant teleport with PZ.", TALKTYPE_ORANGE_1)
end
end