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

Need function to action script 'exhaust'

Zonkill

Banned User
Joined
Oct 10, 2010
Messages
102
Reaction score
1
Hey, so my problem is that i have script, but i don't know how to add 'Exhaust on use' as it is with potions.
Code:
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= 10 and getPlayerLevel(cid) < 12 then
 doRemoveItem(item.uid, 1)
 doSendMagicEffect(topos,8)
  doPlayerSay(cid," 1000 experiance Up",1)
  doPlayerAddExp(cid, 1000)
end
end
I will be thankful if someone may help me, Thanks.(rep+)
 
Code:
local exhaust = createConditionObject(CONDITION_EXHAUSTED)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 2000)
function onUse(cid, item, frompos, item2, topos)
if (getCreatureCondition(cid, CONDITION_EXHAUSTED) == FALSE) then
   if getPlayerLevel(cid) >= 10 and getPlayerLevel(cid) < 12 then
      doRemoveItem(item.uid, 1)
      doSendMagicEffect(topos,8)
      doPlayerSay(cid," 1000 experiance Up",1)
      doPlayerAddExp(cid, 1000)
   end
else
    doPlayerSendTextMessage(cid, 12, "You are exhausted.")
end
return 1
end
 
Back
Top