DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • November 17, 2018, 06:22:00 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Coins [v2]  (Read 9844 times)
0 Members and 1 Guest are viewing this topic.
R4000
Guest
« on: July 21, 2005, 09:03:35 AM »

This version is a total revamp of the old code!

This modules allows the user to find 8 different coins in the forest.:
(In order of value)
  • Unknown Coin
  • Magical Coin
  • Rune Coin
  • Gold Coin
  • Silver Coin
  • Bronze Coin
  • Rubber Coin
  • Tarnished Coin

You can add/remove the coins easly in you modules by using:
(Please dont add a coin unless you took it in the 1st place!)

Add coin:
Code:
set_module_pref("<coinname>coin",1,"coins");

Remove coin:
Code:
set_module_pref("<coinname>coin",0,"coins");

Check if user has coin:
Code:
if(get_module_pref("<coinname>coin",1,"coins")){
//code
}

Replace <coinname> with the coin name.
Please do not remove the tarnished coin!


Updates since v1.1
  • Added shop in village
  • Known bugs:
  • You can go out to the inn, even if not in that town.
  • 3 new coins.
  • Entry to the shop is possable via inn (randomly!)
  • You can ask at the bank what each coin does.
  • Total revamp of how the coins are handled ect. (Makes it easy for new coins to be added)
  • Now a village module!
  • And probley a few other things i forgot!

As you can see... this has been a busy release!

Enjoy!


PHP 4.3.0 or above is required to install this module.
« Last Edit: July 28, 2005, 04:09:12 PM by R4000 » Logged
chicu
Guest
« Reply #1 on: July 21, 2005, 09:45:29 AM »

Code:
Fatal error: Call to undefined function: mb_strtolower() in d:\programme\easyphp1-7\www\modules\coins.php on line 101

i get that error in the forest, if taht forestevent "coins" is triggerd
« Last Edit: July 21, 2005, 09:45:47 AM by chicu » Logged
Turock
Guest
« Reply #2 on: July 21, 2005, 10:04:09 AM »

If you are using a php version prior to 4.3.0 then you won't have that function.
Logged
R4000
Guest
« Reply #3 on: July 21, 2005, 11:33:18 AM »

I take my hat off to you turock Smiley
Couldnt have said it better!
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5479



View Profile WWW
« Reply #4 on: July 21, 2005, 11:35:07 AM »

If you are using a php version prior to 4.3.0 then you won't have that function.

If your mod requires more advanced versions of things like PHP than does the game itself, you should really make a point of saying so in your announcement thread and/or in the file itself...
Logged

Play the latest beta version here on DragonPrime
R4000
Guest
« Reply #5 on: July 21, 2005, 11:46:03 AM »

okay, post updated.

Also upgraded module, so it wonbt install if the mb_strtolower function cannot be used/detected.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #6 on: July 21, 2005, 10:12:23 PM »

Couldn't you just check if mb_strtolower is installed and - if not - simply use strtolower?!
Logged

Running for more than three years now:
R4000
Guest
« Reply #7 on: January 21, 2006, 11:55:04 AM »

your right, i updated it.

and yes all, im back to the lotgd modding community now"
Logged
ratbastid
Guest
« Reply #8 on: January 25, 2006, 09:15:05 AM »

I can't seem to do anything with my coins. Under the "sell coins" section of the coin shop, the guy seems very eager, but my only nav is "Nothing".
Logged
Penbrock
Guest
« Reply #9 on: May 28, 2006, 12:59:19 PM »

I can't seem to do anything with my coins. Under the "sell coins" section of the coin shop, the guy seems very eager, but my only nav is "Nothing".

Same here. Any ideas?
Logged
R4000
Guest
« Reply #10 on: June 07, 2006, 12:24:49 PM »

i did say that the shop is buggy
ill have a look soon
Logged
technodragon73
Guest
« Reply #11 on: June 24, 2006, 08:32:24 PM »

any progress on an update?
Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #12 on: June 26, 2006, 03:12:31 PM »

Thanks to White Knights explanation to how to use the $key and $val, I can now debug part of this module...

line210-212 should read:

Code:
if(get_module_pref(strtolower($val)."coin") == 1){
addnav("...the ".$val." coin","runmodule.php?module=coins&op=shop&subop=sell2&coin=".$val);
}
(essentially, the $val and $key got reversed)

You will now be able to go to the coin shop  and sell your bronze and silver coins.

I think this module has a lot of potential... I'm starting to like it a lot more now. Wink

Unless there are objections, I'm just going to upload the fixes.

And  just a little reminder of the Complimentary Modules:
Pit of Doom?
Well of Enutrof by Enhas
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
technodragon73
Guest
« Reply #13 on: June 26, 2006, 09:02:58 PM »

So does this mean you are taking this over dave?
Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #14 on: June 26, 2006, 09:05:32 PM »

well... it's actually fully functional as R4000 intended at this point..

If people find bugs with it I can give a shot at fixing other things wrong with it... but at this point I think it's pretty stable and does everything it's supposed to.
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

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