Zarabustor
Human Being
i got a problem with this script dont works, im using tfs 3.6
local exhausttime = 20 * 60 * 1000
local exhaust = createConditionObject(CONDITION_EXHAUST)
local temple = {x = 504, y = 504, z = 7}
setConditionParam(exhaust, CONDITION_PARAM_TICKS, exhausttime)
function onUse(cid, item, frompos, item2, topos)
temple = getPlayerTown(cid)
effect = math.random (1, 215)
pos = getPlayerPosition(cid)
if getCreatureCondition(cid, CONDITION_EXHAUSTED) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
doSendMagicEffect(pos,2)
doTeleportThing(cid, temple)
doRemoveItem(cid, (item.uid), 1)
doAddCondition(cid, exhaust)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You are in a fight!")
end
return 1
end
local exhausttime = 20 * 60 * 1000
local exhaust = createConditionObject(CONDITION_EXHAUST)
local temple = {x = 504, y = 504, z = 7}
setConditionParam(exhaust, CONDITION_PARAM_TICKS, exhausttime)
function onUse(cid, item, frompos, item2, topos)
temple = getPlayerTown(cid)
effect = math.random (1, 215)
pos = getPlayerPosition(cid)
if getCreatureCondition(cid, CONDITION_EXHAUSTED) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
doSendMagicEffect(pos,2)
doTeleportThing(cid, temple)
doRemoveItem(cid, (item.uid), 1)
doAddCondition(cid, exhaust)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You are in a fight!")
end
return 1
end