![]() |
|
#1
|
|||
|
|||
|
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
Code:
if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("charm"))*5) then
Logic.hero_add_item("rune_might")
end
Code:
if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("charm"))*5) then
Logic.hero_add_item(1,"rune_might",might)
end
any ideas? |
|
|