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

Solved Exhaust script

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,557
Solutions
8
Reaction score
957
Location
Spain
Im using tfs 1.0, how can I add exhaust to my script? (action) I tried this but no success

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.
 
Back
Top