DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • November 12, 2018, 10:10:10 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Battle Potions  (Read 7219 times)
0 Members and 1 Guest are viewing this topic.
lonnyl
Guest
« on: March 28, 2005, 07:21:57 AM »

Simple module to add up to 20 single use battle potions to your game.  All Battle Potions are admin configurable, shop owner is admin configurable, and shop location as well.   The shop by default is closed and will not appear to players, this will allow you to create all of the potions you want before players see the shop.   I opted not to use a table for this module for a number of reasons...  

This module REQUIRES the Alternate Currencies Module.

Balance must be considered when creating potions, setting their power, and the currency they use (even how often a currency is found, and if you allow exchange).  I use a currency that is gold based (players loose it at dragonkill), but does not exchange.  It also is not found very often, so players do not get too many battle potions (thus making things too easy).  

http://www.pqcomp.com/modules/mydownloads/visit.php?cid=3&lid=89
« Last Edit: March 28, 2005, 07:22:30 AM by lonnyl » Logged
Jim
Guest
« Reply #1 on: March 28, 2005, 10:11:20 AM »

Hi Lonny!  Smiley

Fatal error: Call to undefined function: altcurrency_buildlist() in battlepotions.php on line 12
Logged
lonnyl
Guest
« Reply #2 on: March 28, 2005, 10:23:46 AM »

Hi Lonny!  Smiley

Fatal error: Call to undefined function: altcurrency_buildlist() in battlepotions.php on line 12

Hmmm.... it should check for altcurrencies before it installs..... I'll check the code... I propably needs to run a check before attempting to build the array....
Logged
lonnyl
Guest
« Reply #3 on: March 28, 2005, 10:30:22 AM »

It shouldn't give that error any longer....

But yes it does REQUIRE the Alt currencies...
Logged
Jim
Guest
« Reply #4 on: March 28, 2005, 10:34:05 AM »

Okay. I have alt curren uploaded but not installed. I was going to play with both today. I just figured that I could upload and install alt curren then install the battlepotions. Sorry it was an IDtenT error.......
Logged
lonnyl
Guest
« Reply #5 on: March 28, 2005, 10:40:23 AM »

Actually because the module dynamically builds the prefs and game settings via the info that is contained in the currency tables, it needed a check to see if altcurrency module was active to accomplish this.... with the fix it will not attempt to do that unless alt currency is active.  Thus it will now show up properly in the uninstalled modules and show that it requires the alt currency instead of erroring out....
Logged
Gucky2000
Captain of the Guard
***
Offline Offline

Posts: 150


View Profile
« Reply #6 on: July 01, 2006, 02:43:14 PM »

Hi LonnyL,

I found a little mistake in your code.

Code:
$modsettings[$pval] = "Potion ".$i." Value.,enum,0,Useless,1,Extremely Low,2,Very Low,3,Low,4,Medium Low,5,Medium,6,Medium High,7,High,8,Very High,9,Extremely High,10 Unreal!";

the grade Unreal! isn't shown in the Potion Editor, because of a missing kommata.

Code:
$modsettings[$pval] = "Potion ".$i." Value.,enum,0,Useless,1,Extremely Low,2,Very Low,3,Low,4,Medium Low,5,Medium,6,Medium High,7,High,8,Very High,9,Extremely High,10,Unreal!";

greets Gucky2000
Logged
trapeur
Guest
« Reply #7 on: August 25, 2006, 10:05:47 AM »

hello, where can the player have salt ?
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 #8 on: August 25, 2006, 10:18:48 AM »

Read the first post:

This module REQUIRES the Alternate Currencies Module.
Logged

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

robert
Old Dog
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #9 on: August 25, 2006, 10:20:33 AM »

SALT - is the default currency in Lonny's Alternate Currencies module

The admin of the site could have changed that (salt) to anything they wanted.
Logged

trapeur
Guest
« Reply #10 on: August 25, 2006, 11:23:54 AM »

i have installed the alternate currency module, but i don't understand when the player win salt.


Huh
Logged
RaynDarren
Mod God
*****
Offline Offline

Posts: 732


View Profile WWW
« Reply #11 on: August 07, 2009, 08:00:40 PM »

I realize this topic is very old, but I'm having the same problem as posted in the second respoince to this thread.


Fatal error: Call to undefined function altcurrency_buildlist() in //modules/battlepotions.php on line 14

The fix that Lonny put in is in the file I downloaded, however the error is stil there.

~Rayn
Logged

White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #12 on: August 08, 2009, 03:06:00 AM »

That's because battlepotions is unaware of the modularized files of altcurrency. Function altcurrency_buildlist() is now in a different file.

Change line 13 from
require_once("modules/altcurrency.php");
to
require_once ('modules/altcurrency/altcurrency_run.php');
Logged

Helping you help yourself.
RaynDarren
Mod God
*****
Offline Offline

Posts: 732


View Profile WWW
« Reply #13 on: August 10, 2009, 05:05:00 PM »

Thank you so much! Any idea why the upload of this file does not allow me to access the manage modules section? I hit the hotkey and it sends me back to the village. Sad

~Rayn
Logged

White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #14 on: August 10, 2009, 06:35:04 PM »

I'm sorry for not checking that file. All I did was find the function and assumed that some good practices were followed, which--sigh!--they weren't.

To make the long story short, you will need to use this replacement instead of what I had offered before:
	
	
	
if( !
function_exists'altcurrency_buildlist' ) )
	
	
	
{
	
	
	
	
$include file_get_contents'modules/altcurrency/altcurrency_run.php' );
	
	
	
	
eval( 
rtrimsubstr$includestrpos$include'function' ) ), '>?' ) );
	
	
	
}

I know it's ugly, but it should work.
« Last Edit: August 10, 2009, 06:45:23 PM by White Knight » Logged

Helping you help yourself.
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
72 Guests, 1 User
Megan|SaraBeth
Home Forums News Downloads Login Register Advanced Search