Raggaer
Godly Member
Im using tfs 1.0, how can I add exhaust to my script? (action) I tried this but no success
Thanks.
Code:
local exhaust = createConditionObject(CONDITION_EXHAUSTED)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 2000)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local temple = getPlayerMasterPos(cid)
local player = Player(cid)
local position = temple
if (getCreatureCondition(cid, CONDITION_EXHAUSTED) == FALSE) then
if player:isPzLocked() == true then
player:sendCancelMessage("You cant use the scroll now.")
else
player:teleportTo(temple)
player:say("Teleported!", TALKTYPE_ORANGE_1)
position:sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
else
player:sendCancelMessage("You cant use the scroll now.")
end
return true
end
Thanks.