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 10-07-2009, 07:33 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,589
Seapyramid
Default Cash System

OK.. I suck at tutorials but I will give this a try

Find
PHP Code:
                     if ($newclicks >= $requiredclicks and $requiredclicks != and $requiredclicks != "") {
                          
// We need to level this adoptable up...
                          
                          
$query "UPDATE " $prefix "owned_adoptables SET currentlevel='" $nextlevel "' WHERE aid='" $id "'";
                          
mysql_query($query);
                          
                          
// Now we check if we are enabling alternate images...
                          
                          // Get the ID of the parent type adoptable
                          
$parentid converttypetoparentid($type);
                          
// Check if we are using alternate images or not...
                          
$altstatus getaltstatus($parentid$id$nextlevel);
                          
                          if (
$altstatus == "yes") {
                              
// We are enabling alternate images for this adoptable...
                              
                              
$query "UPDATE " $prefix "owned_adoptables SET usealternates='yes' WHERE aid='" $id "'";
                              
mysql_query($query);
                          }
                          
                          
// Now we can see if the adoptable's owner gets a reward...
                          // The reward function will take care of sending out any reward that exists...
                          
                          
$rewardstatus reward($id$type$nextlevel$owner);
                      }
                      
// End the if statement if we are leveling the adoptable up
                      
$image getcurrentimage($id);
                      
                      
                      
$article_title "You just gave " $name " one Maturity Training.<br />";
                      
$article_content $article_content "<br /><br />";
                  } 
on your levelup.php page. Directly below it add
PHP Code:
                  // ************************************************
                  
                  // Start Rewards
                  
                  // ************************************************  
                  
                  
                  //Get currency on level up
                  
                  
$query "SELECT * FROM `adopts_users` WHERE `username`='$loggedinname'";
                  
$result mysql_query($query);
                  
$num mysql_numrows($result);
                  
                  
$i 0;
                  while (
$i 1) {
                      
$money = @mysql_result($result$i"money");
                      
                      
// Change this number 10 to the number of currency you want users to earn on level up  
                      
$newbalance $money 2;
                      
                      
$i++;
                  }
                  
                  
mysql_query("UPDATE `adopts_users` SET `money`='" $newbalance "' WHERE `username`='$loggedinname'");
                  
                  
                  
$article_content $article_content "<div align='center'><br />You have earned 2 Gold Pieces for leveling up this Companion. <br />You now have  " $newbalance " Gold Pieces.</div>"
on this line in the above script
PHP Code:
$newbalance $money 2
is where you change the amount to whatever you want it to be.

You will have to modify your adopts_users table and add a new field called money `money` int(11) NOT NULL default '0',

Lastly you will have to modify your register.php page
PHP Code:
    mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0','','','','','','0')"); 
If I didn't forget anything it should work.

Sea
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
secondary cash.. maximillion Questions and Supports 2 07-04-2011 09:42 PM
Games With the Cash System redheadturkey Suggestions and Feature Requests 8 08-27-2010 03:37 AM
Cash System Ashje Questions and Supports 10 12-21-2009 03:55 PM
About the cash system Ben Suggestions and Feature Requests 10 10-07-2009 08:34 PM
Buying 'cash' with cash? Quillink Questions and Supports 4 07-20-2009 03:21 AM


All times are GMT -5. The time now is 02:48 PM.

Currently Active Users: 9863 (0 members and 9863 guests)
Threads: 4,080, Posts: 32,024, 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