skinny Posted December 12, 2008 Posted December 12, 2008 One last thing :lol: i looked at the coding for energy refill edited it to all nerve refiil but it just says its full when its not :oops: please help Bit basic but here it is lol What would you like to spend your points on? [url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} points[/url] [url='crystaltemple.php?spend=money']Money - \$".number_format($set['ct_moneypercrys'])." per point[/url] "; } else { if($_GET['spend'] == 'refill') { if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough points!"; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full Energy."; } else { $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid"); print "You have paid {$set['ct_refillprice']}points to refill your Energy bar."; } } else if($_GET['spend'] == 'IQ') { print "Type in the amount of crystals you want to swap for IQ. You have [b]{$ir['crystals']}[/b] crystals. One crystal = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough points or did not fill out the form. [url='crystaltemple.php?spend=IQ']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_iqpercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid"); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} crystals for $iqgain IQ."; } } else if($_GET['spend'] == 'money') { print "Type in the amount of points you want to swap for money. You have [b]{$ir['crystals']}[/b] points. One crystal = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'money2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough points or did not fill out the form. [url='crystaltemple.php?spend=money']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_moneypercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} points for \$".number_format($iqgain)."."; } } } $h->endpage(); ?> Quote
AlabamaHit Posted December 12, 2008 Posted December 12, 2008 Re: Nerve Refill for crystal temple It seems right......Its saying you have full energy all the time? Quote
skinny Posted December 12, 2008 Author Posted December 12, 2008 Re: Nerve Refill for crystal temple yes i know but i would like one refill for energy and one for nerve but when i add nerve into it it doesnt work properly Quote
AlabamaHit Posted December 12, 2008 Posted December 12, 2008 Re: Nerve Refill for crystal temple What would you like to spend your points on? [url='crystaltemple.php?spend=brefill']Brave Refill - {$set['ct_refillprice']} points[/url] [url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} points[/url] [url='crystaltemple.php?spend=money']Money - \$".number_format($set['ct_moneypercrys'])." per point[/url] "; } else { if($_GET['spend'] == 'brefill') { if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough points!"; } else if($ir['brave'] == $ir['maxbrave']) { print "You already have full Brave."; } else { $db->query("UPDATE users SET brave=maxbrave,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid"); print "You have paid {$set['ct_refillprice']}points to refill your Brave bar."; } } else if($_GET['spend'] == 'refill') { if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough points!"; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full Energy."; } else { $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid"); print "You have paid {$set['ct_refillprice']}points to refill your Energy bar."; } } else if($_GET['spend'] == 'IQ') { print "Type in the amount of crystals you want to swap for IQ. You have [b]{$ir['crystals']}[/b] crystals. One crystal = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough points or did not fill out the form. [url='crystaltemple.php?spend=IQ']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_iqpercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid"); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} crystals for $iqgain IQ."; } } else if($_GET['spend'] == 'money') { print "Type in the amount of points you want to swap for money. You have [b]{$ir['crystals']}[/b] points. One crystal = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'money2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough points or did not fill out the form. [url='crystaltemple.php?spend=money']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_moneypercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} points for \$".number_format($iqgain)."."; } } } $h->endpage(); ?> Something like that? Quote
skinny Posted December 12, 2008 Author Posted December 12, 2008 Re: Nerve Refill for crystal temple thats what i done but it said nerve/brave already full even with yours :| Quote
AlabamaHit Posted December 12, 2008 Posted December 12, 2008 Re: Nerve Refill for crystal temple ....is it full? if yoru brave does not equal the maxbrave then it shouldnt say that. Quote
skinny Posted December 12, 2008 Author Posted December 12, 2008 Re: Nerve Refill for crystal temple Sorted now i missed a "b" from the brave refill and you missed out a "max" from $ir['maxbrave']) but you editted it in Thanx :D Quote
AlabamaHit Posted December 12, 2008 Posted December 12, 2008 Re: Nerve Refill for crystal temple No problem... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.