Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Creator: David Mccracken//
- //This is a Free Modification (NOT TO BE SOLD!!!)//
- //Email: daddychav@googlemail.com//
- include "config.php";
- include "globals.php";
- if(!$_GET['spend'])
- //Check to see if player is in Jail or Hospital
- if($ir['jail']) {
- die("You can not visit the store while in Jail!".$h->endpage());
- }
- if($ir['hospital']) {
- die("You can not visit the store while in the Hospital".$h->endpage());
- }
- //Only touch these if you no what you are doing//
- //Functions//
- switch($_GET['action']) {
- case "brave": brave(); break;
- case "energy": energy(); break;
- case "will": will(); break;
- case "health": health(); break;
- case "rob": rob(); break;
- case "addmoney": addmoney(); break;
- default: index(); break;
- //End Of Functions//
- }
- //Primary Code that displays items
- function index()
- {
- //Next line displays picture, change this to text if desired
- echo "<center><h1>Crystal Dome</h1></center>
- <br>
- <br>
- <table class='table'>
- <th class='table'>Stat</th>
- <th class='table'>Price</th>
- <th class='table'>Buy</th>
- <tr class='table'>
- <td>Refill Energy</td>
- <td align=center>15 Crystals</td>
- <td align=center><a href='crystal_dome.php?action=energy'><font color=green>Buy</a></font></td>
- </tr>
- <td>Refill Brave</td>
- <td align=center>25 Crystals</td>
- <td align=center><a href='crystal_dome.php?action=brave'><font color=green>Buy</a></font></td>
- </tr>
- <tr class='tr1'>
- <td>Refill Health</td>
- <td align=center>30 Crystals</td>
- <td align=center><a href='crystal_dome.php?action=health'><font color=green>Buy</a></font></td>
- </tr>
- <tr class='tr2'>
- <td>Refill Will</td>
- <td align=center>75 Crystals</td>
- <td align=center><a href='crystal_dome.php?action=will'><font color=green>Buy</a></font></td>
- </tr>
- <tr class='tr2'>
- <td>Rob Skill (+15 Rob Skill points)</td>
- <td align=center>550 Crystals</td>
- <td align=center><a href='crystal_dome.php?action=rob'><font color=green>Buy</a></font></td>
- </tr>
- <tr class='tr2'>
- <td>Extra Cash (+1 Mil)</td>
- <td align=center>2000 Crystals</td>
- <td align=center><a href='crystal_dome.php?action=money'><font color=green>Buy</a></font></td>
- </tr>
- </table>";
- }
- function brave() {
- global $db, $ir, $userid;
- if($ir['brave'] == $ir['maxbrave']) {
- echo "You already have full Brave.";
- } else if($ir['crystals'] < 25) { //Change the ammount of Crystals to what you want//
- echo "You dont have 15 Crystals come back when you do.";
- } else {
- print "You have Refilled your Brave Bar.<br><br> <a href='index.php'><b>Home</b></a>";
- $db->query("UPDATE users SET brave=maxbrave,crystals=crystals-15 WHERE userid=$userid");
- }
- }
- function energy() {
- global $db, $ir, $userid;
- if($ir['energy'] == $ir['maxenergy']) {
- echo "You already have full Energy.";
- } else if($ir['crystals'] < 15) { //Change the ammount of Crystals to what you want//
- echo "You dont have 15 Crystals come back when you do.";
- } else {
- print "You have Refilled your Energy Bar.<br><br> <a href='index.php'><b>Home</b></a>";
- $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-15 WHERE userid=$userid");
- }
- }
- function will() {
- global $db, $ir, $userid;
- if($ir['will'] == $ir['maxwill']) {
- echo "You already have full Will.";
- } else if($ir['crystals'] < 75) { //Change the ammount of Crystals to what you want//
- echo "You dont have 15 Crystals come back when you do.";
- } else {
- print "You have Refilled your Will Bar.<br><br> <a href='index.php'><b>Home</b></a>";
- $db->query("UPDATE users SET will=maxwill,crystals=crystals-75 WHERE userid=$userid");
- }
- }
- function health() {
- global $db, $ir, $userid;
- if($ir['health'] == $ir['maxhealth']) {
- echo "You already have full Energy.";
- } else if($ir['crystals'] < 30) { //Change the ammount of Crystals to what you want//
- echo "You dont have 30 Crystals come back when you do.";
- } else {
- print "You have Refilled your Health Bar.<br><br> <a href='index.php'><b>Home</b></a>";
- $db->query("UPDATE users SET health=maxhealth,crystals=crystals-30 WHERE userid=$userid");
- }
- }
- function rob() {
- global $db, $ir, $userid;
- if($ir['rob']) {
- echo "SLOW DOWN!.";
- } else if($ir['crystals'] < 550) { //Change the ammount of Crystals to what you want//
- echo "You dont have 550 Crystals come back when you do.";
- } else {
- print "You have Added 10 Rob Skill points to your account for 550 Crystals.<br><br> <a href='index.php'><b>Home</b></a>";
- $db->query("UPDATE users SET crystals=crystals-550 WHERE userid=$userid");
- $db->query("UPDATE userstats SET robskill=robskill+10 WHERE userid=$userid");
- }
- }
- function addmoney() {
- global $db, $ir, $userid;
- if($ir['money']) {
- echo "Calm down you dont need that much cash !.";
- } else if($ir['crystals'] < 2000) { //Change the ammount of Crystals to what you want//
- echo "You dont have 2000 Crystals come back when you do.";
- } else {
- print "You have Added $1,000,000 to your account for 2000 Crystals.<br><br> <a href='index.php'><b>Home</b></a>";
- $db->query("UPDATE users SET crystals=crystals-2000 WHERE userid=$userid");
- $db->query("UPDATE users SET money=money+1000000 WHERE userid=$userid");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement