Hello again, fellow otlanders. I just started scripting and i just made this script but the exhaust system aint working
thanks before hand ++rep!
thanks before hand ++rep!
PHP:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions'))
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end
if getPlayerLevel(cid) >= 100 and getPlayerVocation(cid) == 6 then
doCreatureAddMana(cid,500)
doCreatureAddHealth(cid,900)
doAddCondition(cid, exhaust)
doCreatureSay(cid, "I liek weeeeedzz", TALKTYPE_ORANGE_1)
else
doCreatureSay(itemEx.uid, "Only vocations of level 100 or above may use this rune.", TALKTYPE_ORANGE_1)
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= 100 and getPlayerVocation(cid) == 1 then
doCreatureAddMana(cid,100)
doCreatureAddHealth(cid,200)
doAddCondition(cid, exhaust)
doCreatureSay(cid, "I liek weeeeedzz", TALKTYPE_ORANGE_1)
else
doCreatureSay(itemEx.uid, "Only vocations of level 100 or above may use this rune.", TALKTYPE_ORANGE_1)
end
return true
end