Hi all,
I was trying to change the existing mod that gives mana or rage potion after a battle. My idea was to give with a small chance depending on the hero skill trophies a random rune. I tried two variants of that without success.
that was the old code:
Code:
if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("alchemist"))*10) then
Logic.hero_add_item("mana_potion")
end
I first changed it to that, since the runes are considered items in the game:
Code:
if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("charm"))*5) then
Logic.hero_add_item("rune_might")
end
than I tried that, following the logic from the level up of the hero:
Code:
if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("charm"))*5) then
Logic.hero_add_item(1,"rune_might",might)
end
but nothing happens...
any ideas?