DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 05, 2010, 07:56:28 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Boosts System [Including 3 Boosts]  (Read 1969 times)
0 Members and 1 Guest are viewing this topic.
R4000
Guest
« on: January 23, 2006, 02:51:16 PM »

This modules allows you to configure boosts to certain items via the admin panel.

Features:

  • A full admin system INSIDE the admin grotto (not module admin, its own link)
  • Includes 3 standard boosts, XP, Atk (attack), Def (defence)
  • No core modding required!
  • I learnt alot coding this.
  • New boosts can be created by adding 2-3 lines to 'boosts_admin.php' and coding the 'boosts_NAME.php' file
  • Displays list of active boosts on index page (login)
  • Displays list of active boosts on newday.
  • Translation Ready

Included Boosts Features:
  • XP
  • Allows you to times the XP gain by any figure
  • All messages changable (via module settings)
  • Hooks into boosts admin module
  • Gold
  • Allows you to times the Gold gain by any figure
  • All messages changable (via module settings)
  • Hooks into boosts admin module
  • Attack
  • Allows you to times the Atk gain by any figure
  • All messages changable (via module settings)
  • Hooks into boosts admin module
  • Defence
  • Allows you to times the Def gain by any figure
  • All messages changable (via module settings)
  • Hooks into boosts admin module
[/list]

Thanks to everybody who helped me with my hooking questions during this project!
(I would credit you, but the post size would triple! but you know who you are and thanks Smiley)

Please notify me of any bugs and tell me what you think of this module.

DOWNLOAD - http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=743 - DOWNLOAD
« Last Edit: May 29, 2007, 10:43:35 PM by Elessa » Logged
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1536


Yay for elephants!


View Profile WWW
« Reply #1 on: January 23, 2006, 05:31:01 PM »

Could you add in a gem and gold boost as well?
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka<br /><br />A mini city
R4000
Guest
« Reply #2 on: January 23, 2006, 11:16:35 PM »

I don't think it would be possblle, sorry!
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: January 23, 2006, 11:24:01 PM »

Gold is possible. Base it from the EXP one and change creatureexp to creaturegold.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #4 on: January 23, 2006, 11:35:42 PM »

And for gems:

hookname -> "batte-victory"
check -> "$args['type'] == 'forest'"
if true -> $session['user']['gems']++
Logged

Running for more than three years now:
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #5 on: January 23, 2006, 11:53:31 PM »

Just some things noticed:
    boosts_admin.php
  • Lines 2,3,5,6 aren't needed, as they are already require_once()'d by the runmodule.php.
  • Lines 19-21, I would surround them with an IF statement like:
Code:
if ($session['user']['superuser'] & SU_MEGAUSER){
// Statements here
}
  • Lines 35-38, you are creating duplicate entries in the translation table. addnav()'s are already translated, they don't need any translate inline.
  • Line 51, experience is spelled wrong.
  • Line 68, not translation ready. Should be:
Code:
output("`2%s`n",$boost[1]);
  • Line 91, not the best of code. Should be:
Code:
addnav(array("%s",$boost[1]),$from."what=edit&id=".$boost[0]);
[/list]
    boosts_atk.php
  • Same thing with early lines 2-6
  • Line 56, I can exhaust 1000 rounds in battle. Change it to -1 to be infinite
  • Lines 62 & 72, not translation ready. Could be:
Code:
output_notl($msg);
[/list]
    boosts_def.php
  • Same as boosts_atk.php
  • Lines 35-38 can be removed. You can simply make an addition to the getmoduleinfo array:
Code:
"requires"=>array(
"boosts_admin"=>"1.2|R4000, available at Dragonprime",
),
[/list]
    boosts_exp.php
  • Same about early lines, as well as install function.
  • case "battle-victory":, needs to be changed:
Code:
        case "battle-victory":
            $msg = str_replace("%d",get_module_pref("xpbonus"),get_module_setting("msga"));
// Or, this could just be a: $msg = sprintf(get_module_setting("msga",get_module_pref("xpbonus"));
            output_notl($msg);
            break;
  • Lines 64 and 68, not translation ready. Change output() to output_notl()
That should just about do it. If anyone wants to correct me, go ahead.
« Last Edit: January 23, 2006, 11:54:54 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

R4000
Guest
« Reply #6 on: January 24, 2006, 11:45:46 PM »

Done!
i fixed all them bugs, plus i added a gold boosts. Gems i thinks is a bit inaproprate so i havnt made it, but its simple enough to make your own!
Logged
R4000
Guest
« Reply #7 on: January 25, 2006, 09:09:09 AM »

noticed a bug in the xp module, fixed it tho now. Smiley
Logged
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1536


Yay for elephants!


View Profile WWW
« Reply #8 on: January 25, 2006, 03:13:48 PM »

When using the boost editor, i just get this error:
Code:
Fatal error: Call to undefined function showform() in /home/simo2085/public_html/logd/modules/boosts_admin.php on line 68
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka<br /><br />A mini city
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #9 on: January 25, 2006, 03:15:54 PM »

I told him not to remove 2-6, but 2,3,5,6. Tongue He removed the require_once of showform.php
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

R4000
Guest
« Reply #10 on: January 25, 2006, 11:33:43 PM »

fixed the bugs Smiley
Logged
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1536


Yay for elephants!


View Profile WWW
« Reply #11 on: January 31, 2006, 05:32:02 PM »

You should check if the boost is active before displaying on the home page
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka<br /><br />A mini city
Kalisiin
Guest
« Reply #12 on: January 03, 2007, 01:38:12 PM »

Is this particular module now reasonably stable?  I downloaded it, and when I went to install it, got a message that this was still in BETA, and had some quirks.  I'm wondering if those have now been fixed...and, if not, would like to be kept in the loop as to when they are.

Just downloaded yesterday.

Thanks!
Logged
Magpie
Codemeister
****
Offline Offline

Posts: 252


Magpie


View Profile WWW
« Reply #13 on: January 17, 2008, 12:41:42 AM »

I had this module installed and active, and after some issues I'd been having with it (the boosts were active whilst fighting the master) disabled and un-installed. I was aware that it was buggy, so just figured I'd call it good. (Coinidentially [or was it] the random sex change problem my server had seems to have stopped upon un-installation).

I run on DP version 1.1.1

I still have all the texts that display, the buffs, the message on the newday page....
How do I get rid of these?
« Last Edit: January 17, 2008, 12:43:14 AM by Magpie » Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
33 Guests, 6 Users
Daolin, Adept, JollyGG, KaosKaizer, Oak, Cory2
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search