Z?v?? Posted April 14, 2007 Share Posted April 14, 2007 This was very simple to make but someone might find this useful. I just edited the regular gym.php. This is called creditgym.php but if you want to change it to crystals or diamonds or whatever, just change all the instances of credits in the code. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You need to go validate.Please Click Here To Validate"); } $_GET['times']= abs((int) $_GET['times']); if($ir['validated'] < 1) { die(" You need to go validate. Quote Link to comment Share on other sites More sharing options...
hamster01 Posted April 14, 2007 Share Posted April 14, 2007 Re: Credit Gym You did not make it. Its original mcc. Yea just altered energy into credits but nothin gmore.. mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,credits=credits-1,exp=exp+$egain WHERE userid=$userid ".mysql_error()); Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted April 14, 2007 Author Share Posted April 14, 2007 Re: Credit Gym I know, I said that. I just editied the regular gym.php Quote Link to comment Share on other sites More sharing options...
hamster01 Posted April 14, 2007 Share Posted April 14, 2007 Re: Credit Gym Ok :) Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 14, 2007 Share Posted April 14, 2007 Re: Credit Gym Holy shit, you have one query per train? And you wonder why you're all getting kicked off hosting for using up too much resources? What if someone has like 100 energy, that'd make it 100 queries per train...yeeeeeeesh Someone needs to teach optimization here Quote Link to comment Share on other sites More sharing options...
oxidati0n Posted April 14, 2007 Share Posted April 14, 2007 Re: Credit Gym lol. :) TC's way is what it'd be doing You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I dont generally know how it works but thats an idea of how it should work. 100 querys down to 2 Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 14, 2007 Share Posted April 14, 2007 Re: Credit Gym It isn't just TC's way of doing it, it's anyone who's smart enough to figure out how to reduce sql server load and reduce queries, and stress on the sql server. It's 1000x more efficient to construct a query in a loop, then once it's ended, run the query, instead of hundreds of smaller ones. Just as an example, You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. is horrible compared to: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
hamster01 Posted April 14, 2007 Share Posted April 14, 2007 Re: Credit Gym True i have also heard that alot of: include ""; does slow the server down. Thats why i always code with least amount of files. Quote Link to comment Share on other sites More sharing options...
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.