Jump to content
MakeWebGames

onlyaguy

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by onlyaguy

  1. would some please be able to teach me how to secure a game? thanks :)
  2. which one would you say is any good
  3. is there any you would recommend? and its all the crons tht arent working
  4. lol from reading through the other threads uv posted on i thought about that but they said they dont deal with any website developement when i run the cron code through the address bar though it works fine
  5. iv done it the same way before and i didn't have any problems then its just this time the install file doesn't work
  6. i didnt use the installer i did everything manually unaware it even existed and then when i found out about it and went to use it to get the cron code it was just a blank white screen :)
  7. my crons arent working i have searched all over for the error and nothing is wrong im on hosting24.com and all the cron codes im using are right(iv had more experienced coders check them lol) can someone please help asap
  8. why where you thrown off by it?
  9. i tried that and its still not working
  10. thats what iv done its just getting the crons done that im confused about i dont know what i need to put in the command box for it to work
  11. maybe new isnt the best way of describing it, iv coded my own mods and edited other people to suit my needs but i didnt use the install.php i uploaded the files directly then the sqls and changed the neccesary lines of code in config.php and the scrips run fine. iv recoded my own gym which works and making items also works iv tested nearly everything and it works how it should. i dont see how not using the installer is so hard to cmprehend but i didnt even know about it till i searched how to do the crons :)
  12. i do need the crons but the install file doesnt work at all so how can i get them? and i tried inputting them manually but it wouldnt work but i might have been doing it wrong so can you clarify howw to input them for me thanks
  13. the game im working on works fine apart from the install.php so is there a different way i can do the crons? when i go to the install page its just a blank white page still new to coding so any help is appreciated greatly:)
  14. it was only for the one table but thanks :)
  15. this is gunna sound really nooby but iv kinda forgotten how to change the coulrs of a table. How to change the line colour is what i want to know so can someone help pleas :) iv only just started learning php so would really appreciate the help thanks
  16. i was bored of the standard gym so i made this one instead :)   so just replace gym.php with this <?php $macropage = "gym.php"; require_once "globals.php"; echo "<hr><h1> Gym </h1>"; print "<h3>Current Stats:</h3>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); print "<table><tr><td><b>Strength:</b> {$ir['strength']} [Ranked: {$ir['strank']}]</td><td><b>Agility:</b> {$ir['agility']} [Ranked: {$ir['agirank']}]</td></tr> <tr><td><b>Guard:</b> {$ir['guard']} [Ranked: {$ir['guarank']}]</td><td><b>Labour:</b> {$ir['labour']} [Ranked: {$ir['labrank']}]</td></tr> <tr><td><b>IQ: </b> {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td><b>Total stats:</b> {$ts} [Ranked: $tsrank]</td></tr></table>"; ($ir['hospital'] ? die("This page cannot be accessed while in hospital.") : FALSE); $statnames = array ( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour' ); $_POST['amnt'] = (!empty($_POST['amnt']) && ctype_digit($_POST['amnt']) && isset($_POST['amnt']) ? abs(@intval($_POST['amnt'])) : ""); $_POST['stat'] = (!empty($_POST['stat']) && ctype_alpha($_POST['stat']) && isset($_POST['amnt']) ? htmlentities(trim($_POST['stat'])) : ""); $gymname = ($ir['jail'] ? "Jail Gym" : "Gym"); if($_POST['stat'] && $_POST['amnt']) { $stat = $statnames[$_POST['stat']]; (!$stat ? die("This stat cannot be trained or it does not exist") : FALSE); if($_POST['amnt'] > $ir['energy']) { echo "You do not have enough energy to train that much"; } else { $gain = 0; for($i=0; $i<$_POST['amnt']; $i++) { $gain += mt_rand(1,3) / mt_rand(800,1000) * mt_rand(800,1000) * (($ir['will'] + 20) / 150); $ir['will'] -= mt_rand(1,3); ($ir['will'] < 0 ? $ir['will'] = 0 : $ir['will'] = $ir['will']); } ($ir['jail'] ? $gain /= 2 : FALSE); $statUp = sprintf("UPDATE `userstats` SET `%s` = `%s` + %d WHERE (`userid` = %u)", $stat, $stat, abs(@intval($gain)), abs(@intval($userid))); $do_statUp = mysql_query($statUp); if($do_statUp === FALSE) { echo "".mysql_error().""; } $adjUser = sprintf("UPDATE `users` SET `will` = %d, `energy` = `energy` - %d WHERE (`userid` = %u)", abs(@intval($ir['will'])), $_POST['amnt'], abs(@intval($userid))); $do_adjUser = mysql_query($adjUser); if($do_adjUser === FALSE) { echo "".mysql_error().""; } $inc = abs(@intval($ir[$stat] + $gain)); $inc2 = abs(@intval($ir['energy'] - $_POST['amnt'])); if($stat == "strength") { printf(" You begin lifting some weights. You have gained %d strength, by doing %d sets of weights. You now have %d strength and %d energy left. </p>", abs(@intval($gain)), $_POST['amnt'], $inc, $inc2); $_SESSION['checked'] = 1; } elseif($stat == "agility") { printf(" You begin running on a treadmill. You have gained %d agility, by doing %d minutes of running. You now have %d agility and %d energy left. </p>", abs(@intval($gain)), $_POST['amnt'], $inc, $inc2); $_SESSION['checked'] = 2; } elseif($stat == "guard") { printf(" You jump into the pool, and begin swimming. You have gained %d guard, by doing %d minutes of swimming. You now have %d guard and %d energy left. </p>", abs(@intval($gain)), $_POST['amnt'], $inc, $inc2); $_SESSION['checked'] = 3; } elseif($stat == "labour") { printf(" You walk over to some boxes filled with gym equipment and start moving them. You have gained %d labour, by moving %d boxes. You now have %d labour and %d energy left. </p>", abs(@intval($gain)), $_POST['amnt'], $inc, $inc2); $_SESSION['checked'] = 4; } $ir['energy'] -= $_POST['amnt']; $ir[$stat] += $gain; } } $checked1 = (($_SESSION['checked'] == 1) ? "checked='checked' />" : "/>"); $checked2 = (($_SESSION['checked'] == 2) ? "checked='checked' />" : "/>"); $checked3 = (($_SESSION['checked'] == 3) ? "checked='checked' />" : "/>"); $checked4 = (($_SESSION['checked'] == 4) ? "checked='checked' />" : "/>"); $ir['strank'] = get_rank($ir['strength'],'strength'); $ir['agirank'] = get_rank($ir['agility'],'agility'); $ir['guarank'] = get_rank($ir['guard'],'guard'); $ir['labrank'] = get_rank($ir['labour'],'labour'); echo <<<EOF2 <h3> Choose the stat you want to train and the times you would like to train it</h3> <h3> You can train up to {$ir['energy']} times </h3> <form action="gym.php" method="POST"> <table width=50% cellspacing=1 class='table'><tr> <td> <input type="radio" name="stat" value="Strength" $checked1 <label for="strength"> Strength </label> -increases your attack damage. </td> </tr> <tr> <td> <input type="radio" name="stat" value="Agility" $checked2 <label for="agility"> Agility </label> -increases your chances of hitting your opponent. </td> </tr> <tr> <td> <input type="radio" name="stat" value="Guard" $checked3 <label for="guard"> Guard </label> -reduces damage taken. </td> </tr> <tr> <td> <input type="radio" name="stat" value="Labour" $checked4 <label for="labour"> Labour </label> -allows you to upgrade jobs. </td> </tr> <tr> <td><label for="amnt"> Times to <span class="highlight">Train</span> </label> <input type="text" name="amnt" value="{$ir['energy']}" /> </td> </tr> <tr> <td> <div align='center'> <input type='submit' value='Train' /></div> </td> </tr> </table> </form> <br /> <br /> <br /> <div align='center'><a href='crystaltemple.php?spend=refill' /><font color='black'>[Refill your energy]</font></a> EOF2; $h->endpage(); ?>   heres a screenshot :) [ATTACH=CONFIG]515[/ATTACH] the colour scheme will be whatever you have in your headers :) post what you think of it please :P
×
×
  • Create New...