RazorBlade
Retired Snek
I'm having trouble with a script. It doesn't add health/mana when it's told to.
It's supposed to add a random amount of maxhealth or maxmana between 250 and 500 (code above is just the maxhealth part) There are no console errors and it sends the magic effect so I know it gets past adding the health, it just doesn't add it. what's wrong?
I'm using TFS 0.4, some rev in the 8.62 range.
Code:
local choice2 = math.random(1, 2)
if (choice2 == 1) then
maxhp = math.random(250, 500)
hp = (hp + maxhp)
doItemSetAttribute(itemEx.uid, 'maxhealthpoints', hp)
points2 = (jewel2Point + 1)
doItemSetAttribute(itemEx.uid, "jewel2", points2)
doSendAnimatedText(toPosition, "Upgraded!", TEXTCOLOR_GREEN)
doSendMagicEffect(toPosition, CONST_ME_MAGIC_GREEN)
I'm using TFS 0.4, some rev in the 8.62 range.