solar Posted June 10, 2007 Posted June 10, 2007 basically just a change gym but i like it :) cgym.php <?php /* Crystal gym modded by Solar http://crime-city-07.freehostia.com */ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $out=""; $_GET['times']= abs((int) $_GET['times']); if(isset($_GET['train'])) { $tgain=0; for($i=1;$i<=$_GET['times'] && $ir['crystals'] > 0;$i++) { if ($ir['crystals'] > 0) { $gain=rand(1,3)/rand(200,800)*rand(200,800)*(($ir['will']+20)/150); $tgain+=$gain; if ($_GET['train']=="IQ") { $gain/=100; } $ir[$_GET['train']]+=$gain; $egain=$gain/10; $ts=$ir[$_GET['train']]; $st=$_GET['train']; mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,crystals=crystals-1,exp=exp+$egain WHERE userid=$userid ".mysql_error()); $wu=(int) (rand(1,3)); if ($ir['will'] >= $wu) { $ir['will']-=$wu; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c); } else { $ir['will']=0; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=0 WHERE userid=$userid",$c); } $ir['crystals']-=1; $ir['exp']+=$egain; } else { $out="You do not have enough crystals to train."; } } $stat=$ir[$st]; $i--; $out="You begin training your $st. You have gained $tgain $st by training it $i times. You now have $stat $st and {$ir['crystals']} crystals left. "; } else { $out=" Crystal Gym: Main Lobby "; } $h->userdata($ir,$lv,$fm); $h->menuarea(); print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['crystals']} times. Strength Speed Work Skill Defence "; $h->endpage(); ?> then open mainmenu.php and find the href section and under Gym add a link to cgym.php Quote
Michael Posted June 10, 2007 Posted June 10, 2007 Re: [FREE][CRYSTAL GYM] Easy to make but it's nice :) +1 Quote
solar Posted June 10, 2007 Author Posted June 10, 2007 Re: [FREE][CRYSTAL GYM] Thanks :-D first time i tryed i kept getting an error saying abusers not allowed but i managed to get rid of dat lol Quote
John1 Posted June 26, 2007 Posted June 26, 2007 Re: [FREE][CRYSTAL GYM] works a treat and u can also make it so u can train iq Quote
YoungGold Posted June 28, 2007 Posted June 28, 2007 Re: [FREE][CRYSTAL GYM] yer you can lol but that is so simple Quote
rydog Posted June 29, 2007 Posted June 29, 2007 Re: [FREE][CRYSTAL GYM] Any ideas on how to use on V2? havent had much time to mess with it much, but when i go to the gym is uses the number of crystals i have to train, ex. 5000= you can train up to 5000 times lol. If i have time to figure it out i'll let yall know. Quote
Isomerizer Posted July 11, 2007 Posted July 11, 2007 Re: [FREE][CRYSTAL GYM] Didnt work for me :S So i made my own www.isomerizer.com/mods.php :) Quote
Magictallguy Posted July 15, 2007 Posted July 15, 2007 Re: [FREE][CRYSTAL GYM] Well I used that mod but because I have 50gb/s Any train over 35,000 would shut down the game for around 5 mins so I took it off. Nice mod though!! Quote
solar Posted July 15, 2007 Author Posted July 15, 2007 Re: [FREE][CRYSTAL GYM] V1 slightly improved cgym.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. i only made it because some people were asking for it. I wasnt going to use i just thought it might be useful for some people Quote
Danny Posted July 15, 2007 Posted July 15, 2007 Re: [FREE][CRYSTAL GYM] you only added IQ Value any dim whit could of added it to the original Copy Quote
Danny Posted July 15, 2007 Posted July 15, 2007 Re: [FREE][CRYSTAL GYM] You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I edited this so it is money instead of Cyrstals Quote
farmboy2004 Posted August 22, 2007 Posted August 22, 2007 Re: [FREE][CRYSTAL GYM] Does anyone have this is V2? R <?php /* Crystal gym modded by Solar http://crime-city-07.freehostia.com */ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $out=""; $_GET['times']= abs((int) $_GET['times']); if(isset($_GET['train'])) { $tgain=0; for($i=1;$i<=$_GET['times'] && $ir['crystals'] > 0;$i++) { if ($ir['crystals'] > 0) { $gain=rand(1,3)/rand(200,800)*rand(200,800)*(($ir['will']+20)/150); $tgain+=$gain; if ($_GET['train']=="IQ") { $gain/=100; } $ir[$_GET['train']]+=$gain; $egain=$gain/10; $ts=$ir[$_GET['train']]; $st=$_GET['train']; mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,crystals=crystals-1,exp=exp+$egain WHERE userid=$userid ".mysql_error()); $wu=(int) (rand(1,3)); if ($ir['will'] >= $wu) { $ir['will']-=$wu; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c); } else { $ir['will']=0; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=0 WHERE userid=$userid",$c); } $ir['crystals']-=1; $ir['exp']+=$egain; } else { $out="You do not have enough crystals to train."; } } $stat=$ir[$st]; $i--; $out="You begin training your $st. You have gained $tgain $st by training it $i times. You now have $stat $st and {$ir['crystals']} crystals left. "; } else { $out="<h3>Crystal Gym: Main Lobby<h3>"; } $h->userdata($ir,$lv,$fm); $h->menuarea(); print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['crystals']} times. <form action='cgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?> Quote
HITMAN 17 Posted August 22, 2007 Posted August 22, 2007 Re: [FREE][CRYSTAL GYM] nice thnx mate i gave u + Quote
Satans_Pimp Posted August 28, 2007 Posted August 28, 2007 Re: [FREE][CRYSTAL GYM] V2 here it is EASy <?php include "globals.php"; print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['crystals']} times. <form action='cgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?> Quote
farmboy2004 Posted August 29, 2007 Posted August 29, 2007 Re: [FREE][CRYSTAL GYM] hey ive tried to get it working but cant seem to im getting this error, Fatal error: Cannot redeclare class headers in /home/shadowu/public_html/header.php on line 4 here is the code, please tell me whats wrong lol? <?php session_start(); include "globals.php"; $userid=$_SESSION['userid']; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } include "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $db,$c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $out=""; $_GET['times']= abs((int) $_GET['times']); if(isset($_GET['train'])) { $tgain=0; for($i=1;$i<=$_GET['times'] && $ir['crystals'] > 0;$i++) { if ($ir['crystals'] > 0) { $gain=rand(1,3)/rand(200,800)*rand(200,800)*(($ir['will']+20)/150); $tgain+=$gain; if ($_GET['train']=="IQ") { $gain/=100; } $ir[$_GET['train']]+=$gain; $egain=$gain/10; $ts=$ir[$_GET['train']]; $st=$_GET['train']; mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,crystals=crystals-1,exp=exp+$egain WHERE userid=$userid ".mysql_error()); $wu=(int) (rand(1,3)); if ($ir['will'] >= $wu) { $ir['will']-=$wu; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c); } else { $ir['will']=0; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=0 WHERE userid=$userid",$c); } $ir['crystals']-=1; $ir['exp']+=$egain; } else { $out="You do not have enough crystals to train."; } } $stat=$ir[$st]; $i--; $out="You begin training your $st. You have gained $tgain $st by training it $i times. You now have $stat $st and {$ir['crystals']} crystals left. "; } else { $out="<h3>Crystal Gym: Main Lobby<h3>"; } $h->userdata($ir,$lv,$fm); $h->menuarea(); print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['crystals']} times. <form action='cgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?> Quote
SoulOfDeath Posted August 29, 2007 Posted August 29, 2007 Re: [FREE][CRYSTAL GYM] can i ask why you are running $300 codes on a free host? Quote
Satans_Pimp Posted August 30, 2007 Posted August 30, 2007 Re: [FREE][CRYSTAL GYM] hey ive tried to get it working but cant seem to im getting this error, Fatal error: Cannot redeclare class headers in /home/shadowu/public_html/header.php on line 4 here is the code, please tell me whats wrong lol? are you tring to get this to work on V2...if so code is wrong V2 here it is EASy <?php include "globals.php"; print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['crystals']} times. <form action='cgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?> thats for V2 Quote
farmboy2004 Posted August 30, 2007 Posted August 30, 2007 Re: [FREE][CRYSTAL GYM] you cant just have <?php include "globals.php"; print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['crystals']} times. <form action='cgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?> as it doesnt work :S? Quote
Doki` Posted August 30, 2007 Posted August 30, 2007 Re: [FREE][CRYSTAL GYM] can i ask why you are running $300 codes on a free host? I wonder.. lol. Quote
farmboy2004 Posted August 30, 2007 Posted August 30, 2007 Re: [FREE][CRYSTAL GYM] im not on a free host Quote
Danny Posted August 30, 2007 Posted August 30, 2007 Re: [FREE][CRYSTAL GYM] he isnt on a free host thats why is domain is .net not gamename.sum%^&£$freehost.com Quote
Absolute Zero Posted August 30, 2007 Posted August 30, 2007 Re: [FREE][CRYSTAL GYM] Please people use [code*][/code*] when wanting to post code, not quotes. - Remove *'s when posting code, and code goes between You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. like that. Quote
Danny Posted August 30, 2007 Posted August 30, 2007 Re: [FREE][CRYSTAL GYM] Their you go You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
farmboy2004 Posted September 1, 2007 Posted September 1, 2007 Re: [FREE][CRYSTAL GYM] lol still don't work for me 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.