View Single Post
  #5  
Old 01-03-2009, 03:59 PM
The Rider The Rider is offline
Approved Member
 
Join Date: Jun 2008
Posts: 76
Default

so the final code looks like that and most important it works
it gives 3.33% chance for a random rune per trophy level skill plus another 3.33% per iron fist/rune stone/high magic (max 20% chance for a rune after a battle)
Code:
 if (Game.Random(1,90) <= tonumber(Logic.hero_lu_skill("charm"))*3+Logic.hero_lu_skill("iron_fist"))*3+Logic.hero_lu_skill("rune_stone"))*3+Logic.hero_lu_skill("hi_magic"))*3) then
local random_rune = Game.Random(1,9)
if random_rune >= 7 then
local rune_might_count = Logic.hero_lu_item("rune_might","count")
                Logic.hero_lu_item("rune_might","count",rune_might_count+1)
elseif random_rune >= 4 then
local rune_mind_count = Logic.hero_lu_item("rune_mind","count")
                Logic.hero_lu_item("rune_mind","count",rune_mind_count+1)
elseif random_rune >= 1 then
local rune_magic_count = Logic.hero_lu_item("rune_magic","count")
                Logic.hero_lu_item("rune_magic","count",rune_magic_count+1)
  end
  end
Attached Files
File Type: zip mod_16b7_eng_bonus_rune.zip (26.1 KB, 146 views)

Last edited by The Rider; 01-03-2009 at 05:21 PM. Reason: added a file
Reply With Quote