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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2009, 08:33 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 18,118
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
  #2  
Old 10-08-2009, 08:49 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,937
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Cash System

Very nice seapyramid =D

This will even work with the next release of the forum, as it gives points for posts and what not which could be "converted" into "money".
Reply With Quote
  #3  
Old 10-08-2009, 03:31 PM
arlecchina arlecchina is offline
Member
 
Join Date: Feb 2009
Posts: 65
Credits: 4,218
arlecchina
Default RE: Cash System

Thanks so much for posting this Sea.
Reply With Quote
  #4  
Old 10-08-2009, 03:32 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 18,118
Seapyramid
Default RE: Cash System

Thank you & all are quite welcome.

Sea
Reply With Quote
  #5  
Old 10-22-2009, 10:43 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 109,947
Tequila is on a distinguished road
Default RE: Cash System

I just installed this, it wasn't even that bad. :) You did a great job on this Sea. Nice and easy.
Reply With Quote
  #6  
Old 10-22-2009, 01:57 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 18,118
Seapyramid
Default RE: Cash System

Quote:
Originally Posted by enddayne
I just installed this, it wasn't even that bad. :) You did a great job on this Sea. Nice and easy.
Thank you :)
Reply With Quote
  #7  
Old 10-23-2009, 09:46 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 109,947
Tequila is on a distinguished road
Default RE: Cash System

I just came across an idea to show how much money a user has on their profile & in their sidefeed menu. What variable would I need to use for that?
Reply With Quote
  #8  
Old 10-30-2009, 01:55 AM
Haylzee Haylzee is offline
Member
 
Join Date: Jun 2009
Posts: 34
Credits: 537
Haylzee
Default RE: Cash System

Thanks, this works really well. :)

Now to figure out what to use the currency for lol.
Reply With Quote
  #9  
Old 10-30-2009, 02:36 AM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 18,118
Seapyramid
Default RE: Cash System

rolf.. I do have a few games that are generic the can can be used on by those with a bit of knowledge... items systems are quite personalized to the site so I cant help you there. :)

Sea
Reply With Quote
  #10  
Old 10-30-2009, 02:49 AM
Haylzee Haylzee is offline
Member
 
Join Date: Jun 2009
Posts: 34
Credits: 537
Haylzee
Default RE: Cash System

lol well I managed to show the currency on profiles so at the moment it can just be used to show who clicks the most pets. :D
Reply With Quote
Reply


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


All times are GMT -5. The time now is 08:03 AM.

Currently Active Users: 740 (0 members and 740 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