DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • November 23, 2017, 03:00:15 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Race - Greedy Dwarves  (Read 3268 times)
0 Members and 1 Guest are viewing this topic.
SpiritOfFire
Guest
« on: January 22, 2005, 11:25:44 AM »

http://dragonprime.net/users/SpiritOfFire/racegreedydwarf.zip

New race.  Add-on to regular dwarves.
1.)  Admins can customize how much more gold they get from encounters
2.)  The amount of gold on hand is square-rooted, divided by an admin-settable number, and then rounded to the nearest tenth, and that is added to the attack as a buff.

I got a little lost making it translation-ready...when in doubt, I followed the template of other people.
« Last Edit: January 22, 2005, 11:26:36 AM by SpiritOfFire » Logged
SpiritOfFire
Guest
« Reply #1 on: January 22, 2005, 06:49:45 PM »

Did I mention that you can set how many DragonKills you need to make it available?
Logged
SpiritOfFire
Guest
« Reply #2 on: January 23, 2005, 08:21:08 PM »

IBServer is the best!

Changes:
1.) Changed addnav from "Imp" to "Greedy Dwarves" (oops  Embarrassed)
2.)  Refreshes buff more often
3.)  Buff works
4.)  Allows admins to customize the base buff--this is added to the square root of the amount of gold that the user has, then divided by a setting.
5.)  Changed default so you don't need 10,000 gold on hand to get the buff.

The old version will have to be uninstalled and this reinstalled if you want the buff to update when you leave the bank.  Otherwise, just change the file.
Logged
IndieRadioLive
Guest
« Reply #3 on: April 26, 2006, 11:54:03 AM »

This is what I get on every page as a Greedy Dwarf... I have the DK requirement at 0. Is this what is giving me the error?

Code:
HP Warning: "Division by zero"
in /home/public_html/lotgd/modules/racegreedydwarf.php at 55.
Call Stack:
2: racegreedydwarf_refresh_buff() called from /home/public_html/lotgd/modules/racegreedydwarf.php on line 55
3: racegreedydwarf_refresh_buff() called from /home/public_html/lotgd/modules/racegreedydwarf.php on line 117
4: racegreedydwarf_dohook("newday", Array(

"resurrection"=>false, "turnstoday"=>"Base: 30, Spirits: 0, DK:..."

)) called from /home/public_html/lotgd/lib/modules.php on line 508
5: modulehook("newday", Array(

"resurrection"=>false, "turnstoday"=>"Base: 30, Spirits: 0, DK:..."

)) called from /home/public_html/lotgd/newday.php on line 485
Logged
IndieRadioLive
Guest
« Reply #4 on: May 01, 2006, 02:39:18 PM »

Hmmm, ok that sucks.. I'll just delete the race.


Thanks!
Logged
Nightborn
Guest
« Reply #5 on: May 01, 2006, 02:50:24 PM »

error is on line 55

Code:
    $greedydwarf = round(sqrt($session['user']['gold'])/$divide, 1);


<--$divide is never defined. so its 0. and you can not divide by 0.

he means the setting, yet doesn't grab it.

make it a

   
Code:
$greedydwarf = round(sqrt($session['user']['gold'])/get_module_setting('divide'), 1);

and make sure it's not 0.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
20 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search