Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-04-2010, 10:50 PM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 5,640
Magnie
Send a message via ICQ to Magnie
Default Mod: Currency

Well, you know everyone is wanting a currency mod ( Including me )? Well, I've figured out how to make one, so I decided to show everyone how to have one. Do note, all this will do, is give you a currency and allow you to increase it by clicking/leveling adoptables. You will have to make all the extensions for it yourself. :P But I guess I will be willing to help you make one if you ask ( nicely xD ). :D

Step 1: Make the currency table.
Open up your MySql then find "Query" ( I have no idea how you access your MySql DB or what it looks like, so you'll need to find stuff yourself ) It should allow you to run a MySql Query, the query I want you to run is this:

ALTER TABLE users
ADD money INT(11) NULL DEFAULT '0'

Change 'users' to whatever you "prefix" is plus 'users'. Mine is adopt_users. Just an example. :P Then change 'money' to whatever currency you want, then run it. :)

Step 2: Make it so you get money for clicking on adopts.
There is a file called 'levelup.php'. Open that up then go to line 98, it should be a "}". Then after that, copy and paste then edit to your desires ( You can add some enters to keep everything clean :P ):

PHP Code:
$query "SELECT * FROM ".$prefix."users WHERE username = '".$loggedinname."'";

$result mysql_query($query);

$num mysql_numrows($result);



//Loop out code

$i=0;

while (
$i 1) {



$money=@mysql_result($result,$i,"money");



$i++;


Now change the money variable to whatever you want, but change the second 'money' to the same as the one in the in Step 1 where you named the currency. :D Okay, now go to line 162 it should say:

PHP Code:
    $newclicks $totalclicks 1// Add 1 click to the current click total of this adoptable... 
Now after that add:

PHP Code:
    $newmoney $money 10
Then go to line 168 and it should say:

PHP Code:
    mysql_query($query); 
Then after that add:

PHP Code:
    $query "UPDATE ".$prefix."users SET money='".$newmoney."' WHERE username = '".$loggedinname."'";

    
mysql_query($query); 
Then that should be it for 'levelup.php'

Step 3: Fixing other files...
There may be some files that need fixing, like the 'register.php' file. We will need to fix it so other people can register. :D Go to line 182, it should say:

PHP Code:
    mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0','','','','','')"); 
and replace it with:

PHP Code:
    mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0','','','','','','0')"); 
There may be some other files that need fixing, but I have no idea, or I don't remember. So if you notice any problems, please tell me and I'll figure it out. O.O

A simple 3 Step tutorial thingy on how to make a currency mod. :D

Please note, it is not my fault if you mess up your website. I messed mine up and had to remake it. So make sure you have some sort of Backup or something. :D Or, just try it on another website. ;)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Currency Question ilrak Questions and Supports 1 03-09-2015 12:47 PM
Second Currency and Currency icon Rovick Suggestions and Feature Requests 14 11-11-2014 06:29 PM
New Release Currency trollis76 Suggestions and Feature Requests 19 05-27-2009 04:49 PM
Currency Mod Killgore Questions and Supports 1 04-10-2009 09:04 PM
New Release Currency trollis76 Questions and Supports 0 12-31-1969 07:00 PM


All times are GMT -5. The time now is 04:16 AM.

Currently Active Users: 1273 (0 members and 1273 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636