Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > King's Bounty > King's Bounty: The Legend > Mods

Mods Everything about mods

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.