DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 28, 2016, 04:42:55 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: The Wishing Well v1.5  (Read 3739 times)
0 Members and 1 Guest are viewing this topic.
bapenguin
Guest
« on: April 08, 2004, 10:41:53 AM »

Well...got another new mod for you guys.  This one is a wishing well.  Basically what it does is a user can toss in a certain amount of gold, and there's a chance they'll get some more gold back.  Also a chance of getting 1 or 2 gems.  When the well has more than 20,000 in it there's a chance someone will get 10,000 back!  

You need to toss at least 25 gold per level in to get anything....

create a new table called custom, add 2 fields area and amount and put wellGold in area and 500 (or whatever gold you want the well to start with in amount)

Well 1.5

Let me know what you guys think!
« Last Edit: April 20, 2004, 09:28:06 AM by bapenguin » Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #1 on: April 08, 2004, 09:52:41 PM »

Me gusta mucho!  great work, and a really cool idea.

what are the types of fields though?  a little more explanation on th DB would be great.
« Last Edit: April 08, 2004, 10:02:02 PM by sixf00t4 » Logged

bapenguin
Guest
« Reply #2 on: April 09, 2004, 05:49:27 AM »

No problem, the area field is a varchar of 255 and the amount field is a integer field.

One little glitch i noticed is i forgot to take gold away if you are too cheap!

Here is the new version:


http://dragonprime.cawsquad.net/users/bapenguin/wellv1.1.zip
Logged
bapenguin
Guest
« Reply #3 on: April 20, 2004, 09:28:56 AM »

Updated the well to include some other random actions...

there's a small chance you will get robbed at the well....
there's a chance after you hit the jackpot once that subsequent jackpots get divided amongst ALL the players.

Let me know what you guys think!
Logged
Odyssey
Guest
« Reply #4 on: June 09, 2004, 05:19:17 PM »

I don't think the database is taking all the gold that has been thrown in.  When I put in the mod last week, I started it off with 250 gold.  By now, it should be close to 1000.  The database still shows 250.  

Either I'm reading this wrong or I have the DB set up wrong.  Here is my custom table

Field      Type     Attributes     Null     Default     Extra    
area     varchar(255)               No     wellGold                        
amount     int(11)                    No     250      

« Last Edit: June 09, 2004, 05:38:20 PM by Odyssey » Logged
kodysumter
Guest
« Reply #5 on: June 09, 2004, 05:34:01 PM »

could someone supply the db inserts or exact specifics pls. lol i am such a newb....sigh
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #6 on: June 09, 2004, 08:52:31 PM »

you know what, i am having the same problem.  Both the well and the sword in the stone, which are from Bapenguin don't work for me.  That isnt to say that his code is wrong, but they both use the custom table.  There has to be something we are missing with the DB.  Either that, or it is something with the version of mysql?

anyone who has either of the mods working, could you give us the sql code to create the table/fields?  
Logged

Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #7 on: June 09, 2004, 10:31:19 PM »

anyone who has either of the mods working, could you give us the sql code to create the table/fields?  
I have installed only Sword in the Stone mod, this is my SQL dump:
Code:
#
# Struttura della tabella `custom`
#

CREATE TABLE `custom` (
  `area` varchar(255) NOT NULL default '',
  `amount` int(11) NOT NULL default '0',
  `dTime` time NOT NULL default '00:00:00'
) TYPE=MyISAM;

#
# Dump dei dati per la tabella `custom`
#

INSERT INTO `custom` VALUES ('swordGuy', 0, '00:00:00');

Rgds Excalibur
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #8 on: June 09, 2004, 11:23:44 PM »

Wonder bar!!!! Grin  works like a charm.  Ex to the rescue again.  I have no idea why it didnt work, but i apparently had something wrong with the tables.

EDIT: that means i got the sword in the stone working too!
« Last Edit: June 09, 2004, 11:24:44 PM by sixf00t4 » Logged

Odyssey
Guest
« Reply #9 on: June 10, 2004, 04:50:07 AM »


#
# Struttura della tabella `custom`
#

CREATE TABLE `custom` (
  `area` varchar(255) NOT NULL default 'wellGold',
  `amount` int(11) NOT NULL default '250',
  `dTime` time NOT NULL default '00:00:00'
) TYPE=MyISAM;

#
# Dump dei dati per la tabella `custom`
#





So, to make sure we've got this....

   for the Well to work, if you add in what I have in bold - that should do it?
*the number '250' can be anything.
« Last Edit: June 10, 2004, 04:50:44 AM by Odyssey » Logged
thegleek
Guest
« Reply #10 on: June 10, 2004, 06:46:02 AM »

that wouldnt hold so well if you already have the table 'custom' in your db if you installed the sword mod... if that exists, i would instead execute this line:

Code:
INSERT INTO `custom` VALUES ('wellGold',250, '00:00:00');
Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #11 on: June 10, 2004, 06:59:06 AM »


CREATE TABLE `custom` (
  `area` varchar(255) NOT NULL default 'wellGold',
  `amount` int(11) NOT NULL default '250',
  `dTime` time NOT NULL default '00:00:00'
) TYPE=MyISAM;

No, it's better to leave as it is and add the line TheGleek has wrote, so it should be like this:

Code:
#
# Structure for table `custom`
#

CREATE TABLE `custom` (
  `area` varchar(255) NOT NULL default '',
  `amount` int(11) NOT NULL default '0',
  `dTime` time NOT NULL default '00:00:00'
) TYPE=MyISAM;

#
# Dump for table `custom`
#

INSERT INTO `custom` VALUES ('swordGuy', 0, '00:00:00');
INSERT INTO `custom` VALUES ('wellGold',250, '00:00:00');

Excalibur
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
DeathDragon
Guest
« Reply #12 on: June 10, 2004, 09:22:07 AM »

This mod doesn't work for me either!
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
39 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search