Jump to content
MakeWebGames

Money, Crystal & Stats Cap


Recommended Posts

Maybe, 11 means that: 99,999,999,999 is the cap. set it to what you feel would be a good number. Keep in mine the (#) is how many characters are allowed

Key:

4 = thousands

7 = millions

10 = billions

13 = trillions

16 = quadrillions

19= quintillions

Link to comment
Share on other sites

Could someone explain to me what i need to do to make the crystals, money and stats cap higher than 2.1Bil?

There are also numerous places in the code where variables are hard set to (int). You'll need to update this to your new data type.

Link to comment
Share on other sites

CREATE TABLE `users` (
 `userid` int(11) NOT NULL auto_increment,
 `username` varchar(255) NOT NULL default '',
 `userpass` varchar(255) NOT NULL default '',
 `level` bigint(16) NOT NULL default '0',
 `exp` decimal(11,4) NOT NULL default '0.0000',
 `money` bigint(16) NOT NULL default '0',
 `crystals` bigint(16) NOT NULL default '0',
 `laston` int(11) NOT NULL default '0',
 `lastip` varchar(255) NOT NULL default '',
 `job` int(11) NOT NULL default '0',
 `energy` int(11) NOT NULL default '0',
 `will` int(11) NOT NULL default '0',
 `maxwill` int(11) NOT NULL default '0',
 `brave` int(11) NOT NULL default '0',
 `maxbrave` int(11) NOT NULL default '0',
 `maxenergy` int(11) NOT NULL default '0',
 `hp` int(11) NOT NULL default '0',
 `maxhp` bigint(16) NOT NULL default '0',
 `lastrest_life` int(11) NOT NULL default '0',
 `lastrest_other` int(11) NOT NULL default '0',
 `location` int(11) NOT NULL default '0',
 `hospital` int(11) NOT NULL default '0',
 `jail` int(11) NOT NULL default '0',
 `jail_reason` varchar(255) NOT NULL default '',
 `fedjail` int(11) NOT NULL default '0',
 `user_level` int(11) NOT NULL default '1',
 `gender` enum('Male','Female') NOT NULL default 'Male',
 `daysold` int(11) NOT NULL default '0',
 `signedup` int(11) NOT NULL default '0',
 `gang` int(11) NOT NULL default '0',
 `daysingang` int(11) NOT NULL default '0',
 `course` int(11) NOT NULL default '0',
 `cdays` int(11) NOT NULL default '0',
 `jobrank` int(11) NOT NULL default '0',
 `donatordays` int(11) NOT NULL default '0',
 `email` varchar(255) NOT NULL default '',
 `login_name` varchar(255) NOT NULL default '',
 `display_pic` text NOT NULL,
 `duties` varchar(255) NOT NULL default 'N/A',
 `bankmoney` bigint(16) NOT NULL default '0',
 `cybermoney` bigint(16) NOT NULL default '-1',
 `staffnotes` longtext NOT NULL,
 `mailban` int(11) NOT NULL default '0',
 `mb_reason` varchar(255) NOT NULL default '',
 `hospreason` varchar(255) NOT NULL default '',
 `lastip_login` varchar(255) NOT NULL default '127.0.0.1',
 `lastip_signup` varchar(255) NOT NULL default '127.0.0.1',
 `last_login` int(11) NOT NULL default '0',
 `voted` text NOT NULL,
 `crimexp` int(11) NOT NULL default '0',
 `attacking` int(11) NOT NULL default '0',
 `verified` int(11) NOT NULL default '0',
 `forumban` int(11) NOT NULL default '0',
 `fb_reason` varchar(255) NOT NULL default '',
 `posts` int(11) NOT NULL default '0',
 `forums_avatar` varchar(255) NOT NULL default '',
 `forums_signature` text NOT NULL,
 `new_events` int(11) NOT NULL default '0',
 `new_mail` int(11) NOT NULL default '0',
 `friend_count` int(11) NOT NULL default '0',
 `enemy_count` int(11) NOT NULL default '0',
 `new_announcements` int(11) NOT NULL default '0',
 `boxes_opened` int(11) NOT NULL default '0',
 `user_notepad` text NOT NULL,
 `equip_primary` bigint(16) NOT NULL default '0',
 `equip_secondary` bigint(16) NOT NULL default '0',
 `equip_armor` bigint(16) NOT NULL default '0',
 `force_logout` tinyint(4) NOT NULL default '0',
 PRIMARY KEY  (`userid`)
) ENGINE=MyISAM  ;

 

Can someone edit this SQL please, so it can be Altered into the SQL? I tried changing 'CREATE' to 'ALTER' but that didnt work :P

Edited by Reecey12345
Link to comment
Share on other sites

Can someone edit this SQL please, so it can be Altered into the SQL? I tried changing 'CREATE' to 'ALTER' but that didnt work :P

Wow.

> Change 1 word, didn't work, must ask for help

Research a little more before considering this is a valid reason to ask for help

By "little", I mean extensively - I just didn't want you to read that big word and get upset that you'd have to do some work on your end.

Yes I'm annoyed

Edited by sniko
Link to comment
Share on other sites

Wow.

> Change 1 word, didn't work, must ask for help

Research a little more before considering this is a valid reason to ask for help

By "little", I mean extensively - I just didn't want you to read that big word and get upset that you'd have to do some work on your end.

Yes I'm annoyed

Think this forum is made for discussion, helping others and releasing things and what not else.

I asked for some help like a lot of people do, i know absolutely nothing about SQL's.

Anyway I looked into the Modify column stuff, nor did that help me.

Edited by Reecey12345
Link to comment
Share on other sites

Think this forum is made for discussion, helping others and releasing things and what not else.

I asked for some help like a lot of people do, i know absolutely nothing about SQL's.

Anyway I looked into the Modify column stuff, nor did that help me.

Sure. Discussion, helping others, releasing things, I agree.

Giving someone the fish, and not the abilities to fish? No.

 

Anyway I looked into the Modify column stuff, nor did that help me.

Then post your new query.

& If you did look into it, it did help you, just not directly with this problem.

Link to comment
Share on other sites

CREATE TABLE `users` (
 `userid` int(11) NOT NULL auto_increment,
 `username` varchar(255) NOT NULL default '',
 `userpass` varchar(255) NOT NULL default '',
 `level` bigint(16) NOT NULL default '0',
 `exp` decimal(11,4) NOT NULL default '0.0000',
 `money` bigint(16) NOT NULL default '0',
 `crystals` bigint(16) NOT NULL default '0',
 `laston` int(11) NOT NULL default '0',
 `lastip` varchar(255) NOT NULL default '',
 `job` int(11) NOT NULL default '0',
 `energy` int(11) NOT NULL default '0',
 `will` int(11) NOT NULL default '0',
 `maxwill` int(11) NOT NULL default '0',
 `brave` int(11) NOT NULL default '0',
 `maxbrave` int(11) NOT NULL default '0',
 `maxenergy` int(11) NOT NULL default '0',
 `hp` int(11) NOT NULL default '0',
 `maxhp` bigint(16) NOT NULL default '0',
 `lastrest_life` int(11) NOT NULL default '0',
 `lastrest_other` int(11) NOT NULL default '0',
 `location` int(11) NOT NULL default '0',
 `hospital` int(11) NOT NULL default '0',
 `jail` int(11) NOT NULL default '0',
 `jail_reason` varchar(255) NOT NULL default '',
 `fedjail` int(11) NOT NULL default '0',
 `user_level` int(11) NOT NULL default '1',
 `gender` enum('Male','Female') NOT NULL default 'Male',
 `daysold` int(11) NOT NULL default '0',
 `signedup` int(11) NOT NULL default '0',
 `gang` int(11) NOT NULL default '0',
 `daysingang` int(11) NOT NULL default '0',
 `course` int(11) NOT NULL default '0',
 `cdays` int(11) NOT NULL default '0',
 `jobrank` int(11) NOT NULL default '0',
 `donatordays` int(11) NOT NULL default '0',
 `email` varchar(255) NOT NULL default '',
 `login_name` varchar(255) NOT NULL default '',
 `display_pic` text NOT NULL,
 `duties` varchar(255) NOT NULL default 'N/A',
 `bankmoney` bigint(16) NOT NULL default '0',
 `cybermoney` bigint(16) NOT NULL default '-1',
 `staffnotes` longtext NOT NULL,
 `mailban` int(11) NOT NULL default '0',
 `mb_reason` varchar(255) NOT NULL default '',
 `hospreason` varchar(255) NOT NULL default '',
 `lastip_login` varchar(255) NOT NULL default '127.0.0.1',
 `lastip_signup` varchar(255) NOT NULL default '127.0.0.1',
 `last_login` int(11) NOT NULL default '0',
 `voted` text NOT NULL,
 `crimexp` int(11) NOT NULL default '0',
 `attacking` int(11) NOT NULL default '0',
 `verified` int(11) NOT NULL default '0',
 `forumban` int(11) NOT NULL default '0',
 `fb_reason` varchar(255) NOT NULL default '',
 `posts` int(11) NOT NULL default '0',
 `forums_avatar` varchar(255) NOT NULL default '',
 `forums_signature` text NOT NULL,
 `new_events` int(11) NOT NULL default '0',
 `new_mail` int(11) NOT NULL default '0',
 `friend_count` int(11) NOT NULL default '0',
 `enemy_count` int(11) NOT NULL default '0',
 `new_announcements` int(11) NOT NULL default '0',
 `boxes_opened` int(11) NOT NULL default '0',
 `user_notepad` text NOT NULL,
 `equip_primary` bigint(16) NOT NULL default '0',
 `equip_secondary` bigint(16) NOT NULL default '0',
 `equip_armor` bigint(16) NOT NULL default '0',
 `force_logout` tinyint(4) NOT NULL default '0',
 PRIMARY KEY  (`userid`)
) ENGINE=MyISAM  ;

Can someone edit this SQL please, so it can be Altered into the SQL? I tried changing 'CREATE' to 'ALTER' but that didnt work :P

As Sniko has said you should do some more research first!

ALTER TABLE tablename MODIFY columnname INTEGER;

Source: http://stackoverflow.com/questions/1356866/how-do-i-change-the-data-type-for-a-column-in-mysql

As you can see, the syntax is different from the CREATE syntax.

So say we wanted to change money to a bigint

ALTER TABLE users MODIFY money BIGINT;

I'd suggest reading up on the syntax in some detail on the MySQL site http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

Link to comment
Share on other sites

As Sniko has said you should do some more research first!

 

Source: http://stackoverflow.com/questions/1356866/how-do-i-change-the-data-type-for-a-column-in-mysql

As you can see, the syntax is different from the CREATE syntax.

So say we wanted to change money to a bigint

 

I'd suggest reading up on the syntax in some detail on the MySQL site http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

Thanks for that Dave, you explained it a little better than how i looked at it on the website and ive done it all now.

One more thing for you Dave, i bought your Ajax Chat & Ajax Cart mods, the Ajax cart works perfectly, but the Chat when i make a new chat and try to add the requirements of the 3 usernames i want to have access to it, it doesnt save the requirements at all.

Link to comment
Share on other sites

Thanks for that Dave, you explained it a little better than how i looked at it on the website and ive done it all now.

One more thing for you Dave, i bought your Ajax Chat & Ajax Cart mods, the Ajax cart works perfectly, but the Chat when i make a new chat and try to add the requirements of the 3 usernames i want to have access to it, it doesnt save the requirements at all.

Good stuff! Glad I could help.

Hmm weird. I'll send you a PM!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...