Page 1 of 1

OnuseItem ?

Posted: Fri Nov 14, 2014 9:56 am
by Eleven Warrior
Hi I have created a item that when used should heal the champ of poison. I drink a poison potion use the item and the champ is not cured of poison.

{
class = "UsableItem",

onUseItem = function(self,champion)
playSound("curepoison_1")
champion:setCondition("poison", 0) ---Is this the problem---
hudPrint(champion:getName() .. " Uses the mugwort and poison is cured.")
end
},

}
}

Re: OnuseItem ?

Posted: Fri Nov 14, 2014 10:21 am
by jxjxjf
Should be

Code: Select all

champion:removeCondition("poison");
Everything else looks great. :D

Re: OnuseItem ?

Posted: Fri Nov 14, 2014 3:45 pm
by Eleven Warrior
Ahhh thxs man :)