Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    759
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by peterisgb

  1. IF i am honest, i never used this for my game. I made this for this forum lol.
  2. paid advertising seems the be the only route unless you know loads of people that will play.
  3. I wonder if i could ever make this list.
  4. hehe, i relented and placed screenshots lol. Thanks, I forgot that i still use that page to sent users registration details. That has now been fixed so thanks for bringing that up. As to the work, hell yea lol. I work on the site everyday for hours on end since october 2018. Its only now that i'm getting close to full release and advertising soon. I'm on 150MB/s fibre myself. the video is only 2.21MB in size so isnt that big, had a few people say but meh, loads fine for me lol
  5. I've had to edit mine version of this for 2 reasons, I dont use the username login system and different version off mccodes. I also changed mine over to a security question setup. Players use their email address and answer to reset their passwords. I also removed the captcha as i didnt like it lol. <?php session_start(); include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } print <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{$set['game_name']}</title> </head> <body onload="getme();"> <center> <header> EOF; if (!isset($_GET['step'])) { $_GET['step'] = ''; } switch ($_GET['step']) { case '1': step1(); break; case '2': step2(); break; default: home(); break; } function home() { global $db,$h; echo "<table width='55%' border='0' align='center' id='maint'> <tr> <td><form method='post' action='?step=1'> <table> <tr><td>Email:</td><td> <input type='text' name='email' placeholder='Enter the account email' autocomplete='false'></td></tr> <td></td><td><button type='submit'>Next Step</button></td> </table> </form> </td> <tr> <td colspan='2' align='center'><br /><br /><small><a href='login.php'>> Back to login</a></small><br /></td> </tr> </table>"; } function step1() { global $db,$h; $email = $_POST['email']; $q=$db->query("SELECT * FROM users WHERE email = '$email'"); $rs=$db->fetch_row($q); if (empty($email)) { echo "<table width='75%' border='0' align='center' id='maint'><tr> <td>You did not specify an email.<br /><br /><a href='pwform.php'>> Back</a></td></tr></table>"; $h->endpage(); exit; } if ($email == '[email protected]') { echo "<table width='75%' border='0' align='center' id='maint'><tr> <td>yeah, no chance, sorry.<br /><br /><a href='pwform.php'>> Back</a></td></tr></table>"; $h->endpage(); exit; } if ($rs['squestion'] == 'question' || empty($rs['squestion'])) { echo "<table width='75%' border='0' align='center' id='maint'><tr> <td>You havent set up a Security Question for this account or this account doesnt exist. <br /> Either Log in or contact [email protected]<br /><br /><a href='pwform.php'>> Back</a></td></tr></table>"; $h->endpage(); exit; } echo " <table width='75%' border='0' align='center' id='maint'> <tr> <td>If you have troubles, please [email protected]<br /><br /> <form method='post' action='?step=2'> <table width='85%'> <tr><td></td><td> <input type='hidden' name='email' value='{$_POST['email']}'></td></tr> <tr><td>Security Question:</td><td>{$rs['squestion']} ?</td></tr> <tr><td>Answer:</td><td> <input type='text' name='sanswer' placeholder='Enter your question answer' autocomplete='false'></td></tr> <tr><td>User ID:</td><td> <input type='text' name='userid' placeholder='User ID' autocomplete='false'></td></tr> <tr><td>New Password:</td><td> <input type='password' name='npw' placeholder='Enter the new password' autocomplete='false'></td></tr> <tr><td>Confirm Password:</td><td> <input type='password' name='cpw' placeholder='Confirm the password' autocomplete='false'></td></tr> <td></td><td><button type='submit'>Reset Password</button></td> </table> </form> </td> <tr> <td colspan='2' align='center'><br /><br /><small><a href='login.php'>> Back to login</a></small><br /></td> </tr> </table> "; } function step2() { global $db,$h; $email = $_POST['email']; $_POST['userid'] = abs((int) $_POST['userid']); $_POST['email']=(stripslashes($_POST['email'])); $_POST['npw'] = (isset($_POST['npw'])) ? $db->escape(strip_tags(stripslashes($_POST['npw']))) : ''; $_POST['cpw'] = (isset($_POST['cpw'])) ? $db->escape(strip_tags(stripslashes($_POST['cpw']))) : ''; $q=$db->query("SELECT * FROM users WHERE email = '$email'"); $rs=$db->fetch_row($q); echo "<table width='75%' border='0' align='center' id='maint'> <tr> <td>"; if (empty($_POST['email'])) { die("You did not specify an email."); } if (empty($_POST['npw']) || empty($_POST['cpw'])) { die("You did not specify a password"); } if ($_POST['npw'] != $_POST['cpw']) { die("Passwords do not match."); } if ($_POST['sanswer'] != $rs['sanswer']) { die("You security answer doesnt match."); } if (in_array($_POST['userid'], array(1,70,74))) //Add the User ID's to this array who's password should not be changed { echo 'Invalid user.<br /> > <a href="pwform.php">Go Back</a>'; die($h->endpage()); } $t = $db->query( 'SELECT `user_level` FROM `users` WHERE `userid` = ' . $_POST['userid']); if ($db->num_rows($t) == 0) { $db->free_result($t); die('User ID not found.'); } $e = $db->query( "SELECT `user_level` FROM `users` WHERE `email` = '{$_POST['email']}'"); if ($db->num_rows($e) == 0) { $db->free_result($e); die('Email not found.'); } if (empty($_POST['userid'])) { die("You did not specify a User ID."); } $q=$db->query("SELECT `email`,`userid`,`login_name` FROM `users` WHERE `userid` = {$_POST['userid']}"); while ($r=$db->fetch_row($q)) { if ($r['userid'] != ($_POST['userid'])) { die("User ID does not match what you entered."); } if ($r['email'] != ($_POST['email'])) { die("Email does not match what you entered."); } $new_psw = $db->escape($_POST['npw']); $db->query("UPDATE `users` SET userpass=md5('{$new_psw}') WHERE `userid` = {$_POST['userid']}"); echo "Password changed!<br /><a href='login.php'>Back to Login</a>"; } echo "</td> </tr> </table>"; } ?> </body> Also with this you will need to create 2 new fields in users. squestion and sanswer. open preferences.php add these case 'questionchange': question_change(); break; case 'questionchange2': do_question_change(); break; function question_change() { global $ir,$c,$userid,$h; echo "<h3 class=fontface>Setup/Change Security Question and Answer</h3><br /> <form action='preferences.php?action=questionchange2' method='post'> <select name='squestion' type='dropdown'> <option value='Street you grew up on'>Street you grew up on?</option> <option value='Name of your first friend'>Name of your first friend?</option> <option value='Name of your first pet'>Name of your first pet?</option> <option value='How old was you when you got married'>How old was you when you got married?</option> <option value='Year you passed your driving test'>Year you passed your driving test?</option> <option value='Name of your favourite cartoon charactor'>Name of your favourite cartoon charactor?</option> <option value='What is your favourite number'>What is your favourite number?</option> <option value='What is your favourite TV series'>What is your favourite TV series?</option> <option value='What is your favourite movie'>What is your favourite movie?</option> <option value='What is the name of your favourite teacher'>What is the name of your favourite teacher?</option> <option value='What is your favourite year'>What is your favourite year?</option> </select><br /> <input type='text' name='sanswer' placeholder='Your Security Question Answer Here' size='40'><br /> <input type='submit' value='Change' /></form>"; } function do_question_change() { global $db,$ir,$c,$userid,$h; if($_POST['sanswer'] == "") { print "<br />You Failed to put in an answer <a href='preferences.php?action=questionchange'> Back</a>"; } else { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET squestion='{$_POST['squestion']}', sanswer='{$_POST['sanswer']}' WHERE userid=$userid"); print "Security Question and Answer Updated."; } }
  6. Ive decided to use my old game name from over a decade ago as its a .com domain and better than my current domain. This did mean i had to chance the game name from Androidian to Infamous Wars to match the domain. I also stuck some screenshots on the homepage as requested. Not that i wanted to do this ๐Ÿ˜„ new link here https://www.infamouswars.com NOTE: This is NOT a revival of my best game ever infamous wars. I am purely using the domain name and name as i still own them.
  7. As i said this is v1, but yes this is the way i was planning to go with it. but for not i just wanted to get it working. Your welcome to give it a go and post back ๐Ÿ™‚
  8. This is only a basic mod that i made today, But it beats the default one. Update the questions and answers to suit your needs. This is v1 of this mod so i may update it and release new versions here. create a blank page and call it help.php <?php include "globals.php"; $question=strtolower($_POST['question']); echo ' <h2 class="fontface"> <span class="green">T</span>utorial</h2><hr /> <br /><br /> <table border="0" width="650"><tr><td> <p>Welcome to the Tutorial, we hope that this guide will help you to better understand the game.<p><br /> <p>You are free to choose your own path. You can protect the weak, or exploit their weakness. Spend your money to help your friends, or horde it, they can take care of themselves. Buy a gang and become the most respected group of players in the land. Declare war on an enemy, or an innocent bystander, the choice is yours.</p><br /> <h3 class="fontface">'.$set['game_name'].' Help Bot</h3>'; echo '<small>(Ask the Bot a question below and lets see if we can get you going.)</small><br /><br />'; $ask= '<form action="help.php" method="POST">Question: <input type="text" name="question" size="70" placeholder="What would you like to know? why not try typing in training, gangs or rules"><input type="submit" value="Ask"></form>'; if ($question == "") { echo $ask; $h->endpage(); exit; } else { if ($question=="x") { $answerq="x"; } // Replace X with your own if ($question=="help") { $answerq="What do you need help with?"; } if ($question=="hello"||$question=="helo"||$question=="hi"||$question=="hey") { $answerq="Hello how are you?"; } if ($question=="gym"||$question=="the gym") { $answerq="The gym is where you use energy,gold and some will potions to train your stats up.<Br />Stats help you beat up players and protect yourself aswell from attacks."; } if ($question=="good") { $answerq="Im glad to hear your good."; } if ($question=="strength") { $answerq="This stat is used to calculate how much damage a weapon does."; } if ($question=="agility") { $answerq="This stat is used for dodging attacks."; } if ($question=="labour") { $answerq="This stat is used for getting promoted in jobs."; } if ($question=="IQ") { $answerq="This stat is stat is gained from courses and used for promotions."; } if ($question=="gold") { $answerq="Gold are used for various things under <a href=goldtemple.php>Gold Temple</a>"; } if ($question=="cash") { $answerq="Cash is used to buy stuff all over the game"; } if ($question=="energy") { $answerq="This is used mainly for training and attacking"; } if ($question=="brave") { $answerq="This is used for doing crimes"; } if ($question=="health") { $answerq="How much health you have in a fight"; } if ($question=="mine"||$question=="mines") { $answerq="Mining a great way to earn gold"; } if ($question=="job") { $answerq="Nice way to earn cash and stats"; } if ($question=="education") { $answerq="Used for gaining $IQ"; } if ($question=="mail") { $answerq="Your own personal mail system"; } if ($question=="events") { $answerq="What happens to you is recorded here"; } if ($question=="logout") { $answerq="Used to logout of the game, duh."; } if ($question=="explore") { $answerq="Where the main links are listed"; } if ($question=="search") { $answerq="Search for other players!"; } if ($question=="friend list") { $answerq="Record your friends"; } if ($question=="black list") { $answerq="Record your enemys"; } if ($question=="missions") { $answerq="This is where you can use some of your brave to earn some cash."; } if ($question=="preferences") { $answerq="Used to change your account around"; } if ($question=="donate") { $answerq="Donate to the game and be awared donator features"; } if ($question=="vote") { $answerq="Voting earns you rewards and it helps the game grow"; } if ($question=="item"||$question=="items") { $answerq="Items are a main part of the game and used for doing lots of things"; } if ($question=="church") { $answerq="Used for getting married"; } if ($question=="stats") { $answerq="Stats are what determines your account and how good you are"; } if ($question=="travel") { $answerq="Travel around the game"; } if ($question=="casino") { $answerq="Casino, play various games earning you some cash"; } if ($question=="quests") { $answerq="Quests do varios tasks to earn rewards"; } if ($question=="banned") { $answerq="Users banned are listed in dungeon"; } if ($question=="war") { $answerq="War is when 2 gangs's fight each other"; } if ($question=="staff") { $answerq="Main staff can be listed under Staff, ID 1 is the overall owner"; } if ($question=="prison") { $answerq="Sent here when failing crimes"; } if ($question=="hospital"||$question=="hosp") { $answerq="Sent here when attacked"; } if ($question=="noob"||$question=="n00b") { $answerq="Who you calling a noob?"; } if ($question=="fuck"||$question=="shit"||$question=="prick"||$question=="cunt"||$question=="bitch") { $answerq="Please do not swear"; } if ($question=="robot"||$question=="bot") { $answerq="Who you calling a bot!"; } if ($question=="who are you") { $answerq="I am the androidian Bot"; } if ($question=="weather") { $answerq="The weather effects your training at the gym and your mining rates when at the mines.<br />You can also visit the weather page and ask the gods for better weather."; } if ($question=="money") { $answerq="Please Explain? e.g: how to get money or what should i save for"; } if ($question=="how to get money") { $answerq="The best way to get money is by going into the mines and mine for gold and sell it. You could also take a risk and put it into the stock exchange."; } if ($question=="what should i save for") { $answerq="Well thats upto you but personally i would save up for a better house as that will help improove your stats and player."; } if ($question=="users online") { $answerq="This is where you see who is online"; } if ($question=="attacking") { $answerq="Attacking is a good way to get experience, and exert your superiority over those weaker than you. In order to attack you need 1 energy, and should have a weapon. When you win a fight you will get a percentage of experience depending on how much stronger you are compared to the person you are attacking. Make sure that you really want to fight the person, because once you start you can't stop until one of you loses. When you start a fight, you will have the option of using any weapon that you currently have in your items page."; } if ($question=="gangs"||$question=="gangs") { $answerq="Gangs are a group of players that band together to work for a common purpose, granted this may be robbing a bank, or taking down the losers in a rival gang.<br /> Gangs cost $500K to create, and once you buy it, you are the president of your gang.<br /> Your gnag will initially be able to hold 5 members, but will be able to upgrade to more as time goes on.<br /> The President will be able to assign a Vice-President to the gang. Gangs are able to do Organised Crimes for money and respect.<br /> The president can also select to go to war with another gang. One should be careful about doing this though, as it may come back to haunt you."; } if ($question=="training") { $answerq="<b>Gym: </b>To use the gym, type in the number of times you want to train, select the stat to train and click ok.<br /> The next screen will tell you how much of that stat you gained, and what your total in that stat is.<br /><br /> <b>Missions: </b>Go to the mission screen and select the mission you want to do. <br />Remember that trying a mission that is to hard may land you in jail, and lose the experience you've worked so hard to get.<br /><br /> <b>School: </b>School offers courses that will raise your stats over a certain period of time<br /><br /> <b>Your Job: </b>A job will provide you with money at 5:00PM every day, as well as raising your job stats everyday. <br />Some jobs have requirements before you can do them, so make sure to keep an eye out for that.<br /><br /> <b>Attacking: </b>Attacking will gain you experience when you win, but you lose experience if you lose.<br /> The amount of experience depends on the comparative strength of your enemy, if they are much weaker, you won't get much experience."; } if ($question=="rules") { $answerq="Rules are important, They make sure that everyone gets a chance and the games is fair and fun for all. For all the rules please check out the game rules section."; } if ($question=="profile"||$question=="profiles") { $answerq="This is where you can look at yours and other players profiles. Very informative "; } if ($question=="rucksack") { $answerq="this is where you find you items to use within the game, you also find your weapons and armour here.<br />"; } if ($question=="referrals"||$question=="referral") { $answerq="This is where you give friends a link to the game to earn rewards."; } if ($question=="lucky"||$question=="box"||$question=="lucky box") { $answerq="This is your reward for logging in every hour."; } echo $ask.'<br />'; echo '<span class="blue"><b>You asked the Bot:</b></span> '.$question.'<br />'; echo '<span class="gold"><b>The Bot replied:</b></span> '.$answerq; if ($answerq == "") { echo 'Sorry, I dont know the answer. <br />It has been submitted to the database.'; $db->query("INSERT INTO `bot` (`ID` ,`submitted` ,`question` )VALUES (LCASE( NULL ) , '$userid', '$question')"); $h->endpage(); exit; } } echo '</td></tr></table>'; $h->endpage(); ?> Here is the Sql. CREATE TABLE `bot` ( `ID` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `submitted` INT( 11 ) NOT NULL , `question` VARCHAR( 25 ) NOT NULL ) ENGINE = MYISAM ;
  9. I started this a while back for my game but decided not to finish it, But after looking at it, its seems like too much of a waste just to dump it. So feel free to use it, Build on it or whatever. create a file called tamigotcha.php and put this in it. <?php require_once('globals.php'); // Settings // $main = 'Tami-GotchA'; $cost = '1000'; $costcheck = '999'; $foodcost = '10'; $watercost = '10'; $foodgain = '1'; $watergain = '1'; $xpgain = '0.25'; // End Settings // // CONFIGS // $data = $db->query("SELECT * FROM tami WHERE owner=$userid"); $tami = $db->fetch_row($data); $healthperc = (int) ($tami['health'] / $tami['maxhealth'] * 100); $foodperc = (int) ($tami['food'] / $tami['maxfood'] * 100); $waterperc = (int) ($tami['water'] / $tami['maxwater'] * 100); // END CONFIGS echo '<h2 class="fontface">'.$main.'</h2>'; if (!isset($_GET['a'])) { $_GET['a'] = ''; } switch ($_GET['a']) { case 'buy': buy(); break; case 'set': set(); break; case 'doset': doset(); break; case 'eat': eat(); break; case 'drink': drink(); break; default: index(); break; } function index() { global $db,$ir,$h,$userid,$tami,$main,$cost,$healthperc,$foodperc,$waterperc,$foodcost,$watercost,$foodgain,$watergain; if($tami['owner'] == $userid) { $moodc = ($tami['food']+$tami['water']); $moodm = ($tami['maxfood']+$tami['maxwater']); $moodv = ($tami['maxfood']+$tami['maxwater'])/2; $tam['xp_needed'] = (int) (($tami['level'] + 1) * ($tami['level'] + 1) * ($tami['level'] + 1) * 1.2); $xperc = (int) ($tami['xp'] / $tam['xp_needed'] * 100); if ($moodc == $moodm) { $mood='smilies1/biggrin.gif'; $moodt='Happy'; } else { if ($moodc >= $moodv) { $mood='smilies1/mellow.gif'; $moodt='so-so'; } else { if ($moodc <= $moodv) { $mood='smilies1/sad.gif'; $moodt='Sad'; }}} echo '<br /></center> <table border="1" width="95%"> <tr> <td align="center" width="100"><b><u>'.$main.' DETAILS</u></b></td> <td></td> <td></td> </tr> <tr> <td><hr />Name: <span class="blue">'.$tami['name'].'</span><br /> Level: <span class="yellow">'.$tami['level'].'</span> <div style="background: url(images/level-bg.png) no-repeat;width:168px;height:21px;"> <div style="background: url(images/levelx.png) no-repeat;width:'.$xperc.'%;height:21px;"> <div style="width:160px;color: #000;position: absolute;padding-left:10px;line-height:21px;text-shadow:none;"> <font color=black><center><b>XP: '.$tami['xp'].'/'.$tam['xp_needed'].'</b></center></font></div></div></div><hr /> <div class="c100 p'.$healthperc.' dark green"> <span><font color="#5fd400" size="-1">Health: '.$tami['health'].'/'.$tami['maxhealth'].'</font></span> <div class="slice"> <div class="bar"></div> <div class="fill"></div> </div> </div><br /> <div class="c100 p'.$foodperc.' dark orange"> <span><font color="#5fd400" size="-1">Food: '.$tami['food'].'/'.$tami['maxfood'].'</font></span> <div class="slice"> <div class="bar"></div> <div class="fill"></div> </div> </div><br /> <div class="c100 p'.$waterperc.' dark blue"> <span><font color="#5fd400" size="-1">Water: '.$tami['water'].'/'.$tami['maxwater'].'</font></span> <div class="slice"> <div class="bar"></div> <div class="fill"></div> </div> </div></td> <td></td> <td></td> </tr> <tr> <td><b><u>Links</u></b><br /> <table> <tr> <td>Does</td> <td>Cost</td> <td>Gains</td> <td>Actions</td> </tr> <tr> <td>Food</td> <td><span class="green">'.money_formatter($foodcost).'</span></td> <td>+<span class="blue">'.$foodgain.'</span></td> <td><a href="?a=eat"><b>Do</b></a></td> </tr> <tr> <td>Water</td> <td><span class="green">'.money_formatter($watercost).'</span></td> <td>+<span class="blue">'.$watergain.'</span></td> <td><a href="?a=drink"><b>Do</b></a></td> </tr> </table> </td> <td valign="top"> <table border="1" width="50%"> <tr> <td colspan="2" align="center"><b><u>Your '.$main.'\'s Mood</u></b></td> </tr> <tr> <td align="center"><span class="green">'.$moodc.'</span> / <span class="brightred">'.$moodm.'</span></td> <td align="center"><img src="'.$mood.'"><br />'.$moodt.'</td> </tr> </table> </td> <td></td> </tr> </table> '; } else echo '<span class="brightred">No '.$main.'.</span><br /><a href="?a=buy" class="button">Buy one (<small><span class="purple">'.money_formatter($cost).'</span></small>)</a>'; echo '<br /><br /> </center> <hr /> <small> <ul> <li>1. Food and Water goes down by 1 Every hour.</li> <li>2.</li> <li>3.</li> </ul> </small><center> '; } function buy() { global $db,$ir,$h,$userid,$main,$tami, $cost,$costcheck; if($ir['money'] <= $costcheck) { echo 'You dont have enough.<br /><a href="tamigotcha.php" class="button">Back</a>'; $h->endpage(); exit; } else { echo 'You now have a '.$main.'.<br /> <a href="tamigotcha.php?a=set">Set Settings</a>'; $db->query("INSERT INTO `tami`(`owner`) VALUES ($userid)"); $db->query("UPDATE users SET money=money-$cost WHERE userid=$userid"); } } function set() { global $db,$ir,$h,$userid,$tami, $cost,$main; echo ' <form action="?a=doset" method="post"> '.$main.' Name: <input type="text" name="name"> <br /> <input type="submit" value="Set Tami-Gotcha"> </form> '; } function doset() { global $db,$ir,$h,$userid,$tami, $cost,$name; $name = $_POST['name']; $db->query("UPDATE tami SET name='$name' WHERE owner=$userid"); echo 'Done.<br /><a href="tamigotcha.php">Proceed to '.$main.'</a>'; } function eat() { global $db,$ir,$h,$userid,$tami,$foodcost,$foodgain,$main,$xpgain; if($ir['money'] < $foodcost) { echo 'You don\'t have enough<br /><a href="tamigotcha.php" class="button">Back</a>'; $h->endpage(); exit; } else if($tami['food'] >= $tami['maxfood']) { echo 'Your '.$main.' is already full<br /><a href="tamigotcha.php" class="button">Back</a>'; $h->endpage(); exit; } else { $xpgain1 = $xpgain*($tami['level']*$tami['level']); $db->query("UPDATE tami SET food=food+'$foodgain', xp=xp+$xpgain1 WHERE owner=$userid"); $db->query("UPDATE users SET money=money-'$foodcost' WHERE userid=$userid"); echo 'You '.$main.' has gained <span class="green">'.$foodgain.'</span> Food, <span class="gold">'.$xpgain1.'</span> XP which cost you <span class="brightred">'.money_formatter($foodcost).'</span><br /><br /><a href="tamigotcha.php">Proceed to '.$main.'</a>'; } } function drink() { global $db,$ir,$h,$userid,$tami,$watercost,$watergain,$main,$xpgain; if($ir['money'] < $watercost) { echo 'You don\'t have enough<br /><a href="tamigotcha.php" class="button">Back</a>'; $h->endpage(); exit; } else if($tami['water'] >= $tami['maxwater']) { echo 'Your '.$main.' is already full<br /><a href="tamigotcha.php" class="button">Back</a>'; $h->endpage(); exit; } else { $xpgain1 = $xpgain*($tami['level']*$tami['level']); $db->query("UPDATE tami SET water=water+'$watergain', xp=xp+$xpgain1 WHERE owner=$userid"); $db->query("UPDATE users SET money=money-'$watercost' WHERE userid=$userid"); echo 'You Tami-Gotcha has gained <span class="green">'.$watergain.'</span> Food, <span class="gold">'.$xpgain1.'</span> XP which cost you <span class="brightred">'.money_formatter($watercost).'</span><br /><br /><a href="tamigotcha.php">Proceed to '.$main.'</a>'; } } $h->endpage(); ?> Here are the Sqls for the Database. CREATE TABLE `tami` ( `id` int(11) NOT NULL, `owner` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `level` int(11) NOT NULL DEFAULT 1, `xp` decimal(11,2) NOT NULL DEFAULT 0.00, `xp_needed` decimal(11,2) NOT NULL DEFAULT 9.00, `health` int(11) NOT NULL DEFAULT 100, `maxhealth` int(11) NOT NULL DEFAULT 100, `food` int(11) NOT NULL DEFAULT 10, `maxfood` int(11) NOT NULL DEFAULT 10, `water` int(11) NOT NULL DEFAULT 10, `maxwater` int(11) NOT NULL DEFAULT 10 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; These are the crons to place in your cron files. I had mine running hourly. $db->query(sprintf('UPDATE `tami` SET `food` = GREATEST(0, `food` - %u) WHERE `food` > 0', $n3)); $db->query(sprintf('UPDATE `tami` SET `water` = GREATEST(0, `water` - %u) WHERE `water` > 0', $n3)); And thats it, thats as far as i ever got with it. Enjoy.
  10. Special offer for users who come from this site. Mail me on ID 1 with the message MWG and claim a free donator pack.
  11. yeah, trying to modernize like many sites. I added in the option ingame to disable it for people who had slow PCs or Internet, Mobiles on the other hand loads the site well giving the internet.
  12. All suggestions sorted. Login/Registration cleaned up. Screenshots added to the home page. Many other updates done.
  13. ~So my Siteย https://www.androidian.gaย is back up, Looking for players, Where should i start?

  14. This looks mental. I will give it a try later, But from the images looks like you put your heart into it, Nice job.
  15. I've had some issues with cons in the past I'd suggest you search the forum for cronless crons or timestamps.
  16. Download option showing when logged in and downloads are still working for me as of 10 mins ago.
  17. You need an account there and be signed in, you dont need to buy mccodes to sign up or download mods, just logged in.
  18. I did this on my last game.
  19. I gave it a try yesterday on php 5.6 and failed ๐Ÿ˜ž
  20. It looks good. Nice pirate theme and mobile friendly. I haven't any suggestions so keep what your doing.
  21. That is bootstrap lol. Its been bootstrap that has been the cause of most of the login/register layouts issues lol. I havent used it ingame so thats all good.
  22. Login/Register Page cleaned up.
  23. Oh. Fair enough lol. Brain fart. I've never heard it shortened before.
  24. NDA? I've not heard that before? What's that mean?
  25. I didn't give details as there isn't one lol As to people purchasing? I'm not in it for the money. I'm here for the users and not the cash. I've paid the last 2 years server costs out of my own money and probs will continue to do so. Money does help but it isn't what drives me, Users and activeness is the things that drive me.
×
×
  • Create New...