• 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!

Teleportation Scrolls

Ninkobi

Owner /Founder of Syphera
Joined
Apr 5, 2008
Messages
206
Reaction score
1
Location
England
I need someone to help with my teleportation scroll script, it doesn't work. It must only work if you don't have battle or PZ.
Code:
function onUse(cid, item, frompos, item2, topos)
temple = getPlayerMasterPos(cid)
pos = getPlayerPosition(cid)
if getCreatureCondition(cid, CONDITION_PZ) == 1 then
	doSendMagicEffect(pos,2)
	doTeleportThing(cid,temple)
	doSendMagicEffect(temple,10)
			doRemoveItem(item.uid)
else
	doPlayerSendCancel(cid,"You have PZ lock.")
end
return 1
end
Thanks in advance.
 
try this one:

function onUse(cid, item, frompos, item2, topos)
temple = getPlayerMasterPos(cid)
pos = getPlayerPosition(cid)
pz = getTilePzInfo(pos)
if pz == 1 then
doSendMagicEffect(pos,2)
doTeleportThing(cid,temple)
doSendMagicEffect(temple,10)
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid,"You have PZ lock.")
end
return 1
end

This will only let you use it if you are in PZ, i don't know the condition from battles :S
 
Code:
if getCreatureCondition(cid, CONDITION_PZ) == 1 then
=
Code:
if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then

Dunno how to check about PZlock.
 
Back
Top