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
  #1  
Old 01-03-2009, 01:09 PM
The Rider The Rider is offline
Approved Member
 
Join Date: Jun 2008
Posts: 76
Default Random rune after a battle

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?
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 05:36 AM.


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