Jump to content
MakeWebGames

erus

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

erus's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Ajax chat for V2 not found a fix for that as yet but working on the problem as it annoys me too.
  2. Re: Energy regen for donators   the reason for this is because the cron is updating the energy by a division and not %age so if said user has 100 energy the cron would devide this by 6.5 = 15.38% per tick and user 2 has 170 energy this would also be devived by 6.5 = 26.15% per tick this is the part you need to look at and set your formula to energy=energy+(maxenergy/(6.5)) = divides the max enery of a user by 6.5 then adds it = different %age per user you could always try this energy=energy+(maxenergy/(100)*20)) not sure if that is right but it should give 20% to all users (I am not a coder but good at mathematics) forgot a ')'
  3. Re: Something happened to my Game change this $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, 0, 100, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')");   to this $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, 0, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); the number equate to this 1 (level), 0 (money), 0 (crystals), 0(donatordays), 1(user_level), 12(energy), 12(maxenergy), 100(will), 100(maxwill), 5(brave), 5(maxbrave), 100(hp), 100(maxhp), 1(location),
  4. Re: Odd attack problem Have i got a legal version hmmmm i think i have as i got it from mccodes.com lol kept the paypal ticket too but still got the error so i just scraped the exp gain formula and made my own lol
  5. Re: [V2] Staff_cities Help look 3 posts up from yours jeeppimp :lol:
  6. Re: streets (help) This is the one i altered for my site the steps have been boxed into a fieldset and the steps are taken one at a time also stopped it searching while in jail or hospital   <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); $h->endpage (); } print "<img src=/imgs/riot.gif> "; if ($_GET['action'] != 'scavenge') { $turns=$ir['turns']; print "<fieldset> <legend>Holy smokes!</legend> You should search for some serious shit dude. Maybe grab some money off the ground, or get some Experience... maybe even find a special item or two...? </fieldset> <fieldset>Start going! You have {$turns} turns left for today and will be topped up to 25 at 00:00 GMT.</fieldset> "; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Get Searching'></form>"; } else { $steps=abs((int) $_POST['steps']); for($i=0;$i<$steps;$i++) { if ($ir['turns'] < 1) { print("You do NOT have enough turns to search the streets any more. Come back at Midnight GMT. "); }else { $chance = rand(1,15); $db->query("UPDATE users SET turns=turns-1 where userid=$userid",$c); if ($chance == 1) { $amnt=rand(20,120); if($ir['money'] > $amnt) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>As you scavenge the streets you see a hobo; he asks you for<font color=green> \$$amnt </font>and you tell him to piss off. Then he proceeds to smack the shit out of you. He takes the <font color=red>\$$amnt </font>anyway. </fieldset> "; $db->query("UPDATE users SET money=money- {$amnt } where userid=$userid",$c); print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $ir['money']-=$amnt; $h->endpage(); exit; } else { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>As you walk the streets you see a hobo, he asks you for \$1 you tell him to piss off he smacks you over the head and looks in your wallet. Finding it almost empty he just runs off with it. </fieldset> "; $db->query("UPDATE users SET money=0 where userid=$userid",$c); print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $ir['money']=0; $h->endpage(); exit; } } if ($chance == 2) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>As you are walking down the road you find <font color=Green>$20</font>. But a gust of wind blows it from your hand. </fieldset> "; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 3) { $gained=rand(2,3)*$ir['level']; print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>You found a bag of cash on the side walk you open it up and find [b] <font color=green>\$$gained</font>[/b] was inside. </fieldset> "; $db->query("UPDATE users SET money=money+$gained where userid=$userid",$c); print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 7) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>You see a guy getting mugged, but you decide to keep walking. You don't want to be in his shoes anytime soon. </fieldset> "; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 4) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>While exploring the streets you found some cash, but a hobo came quickly behind you and whacked you over the head. You lurch in suprise and the hobo takes the cash and runs off. </fieldset>"; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 5) { $gain = rand(1,3); print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>While searching the streets you found <font color=green>[b]$gain[/b] Gold.</font> </fieldset>"; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid",$c); print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 6) { $gain = rand(2,5)*(floor($ir['level']/2)+1); print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>While searching the streets you found <font color=green>[b] \$$gain[/b]</font>. </fieldset> "; $db->query("update users set money=money+$gain where userid=$userid",$c); print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 8) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>Nothing here. Just a few drunk teenagers at the bus shelter. </fieldset> "; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 9) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>You see a small item on the ground, and decide to pick it up... <font color=Green>(first aid kit)</font></fieldset>"; $itemidexplore = 2; $db->query("INSERT INTO inventory VALUES('',5,$userid,1)",$c); print" "; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 10) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>Nothing here. Just a few drunk teenagers at the bus shelter. </fieldset> "; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 11) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>Nothing here. </fieldset>"; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 12) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>Nothing here. </fieldset>"; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 13) { $expcur=(($ir['exp']+$ir['exp_needed'])/100); $exp=(($expcur)*rand(1,10)); print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>You got in a scuffle with a tramp, and WON you gained <font color=Green>$exp EXP Points!!</font> </fieldset> "; $db->query("UPDATE users SET exp=exp+$exp WHERE userid=$userid",$c); print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 14) { print "<fieldset> <legend>[b] {$ir['turns'] }[/b]</legend>Nothing here. </fieldset>"; print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value='{$ir['turns']}'> <input type=submit value='Search Again'></form>"; $h->endpage(); exit; } if ($chance == 15) { $loseruser = $ir['userid']; event_add($ir['userid'],"You came accross a group of chavs on a street corner, they start hitting you until you fall to the floor.",$c); die ("You came accross a group of chavs on a street corner, <font color=red>they start hitting you until you fall to the floor.</font> <font color=Green>[b]Good news[/b]: You aren't dead </font><font color=red>[b]Bad News[/b]:You have to stop exploring and go into Recovery</font> "); $db->query("UPDATE users SET hospital='7' WHERE userid=$loseruser", $c); $db->query("UPDATE users SET hospreason='Head kicked in by a group of chavs' WHERE userid=$loseruser", $c); $h->endpage(); exit; } $ir['turns']--; } } $h->endpage (); if($ir['turns']==0) { print "<font color=Red>Sorry, all turns used. Please come back at 00.00 GMT!</font> "; } else { print " <form method=post action=street.php?action=scavenge><input type=hidden name=action value=scavenge><input type='text' name='steps' value=' {$ir['turns'] }'> <input type=submit value='Get Searching'></form>"; } } $h->endpage (); ?> '></form>"; } } $h->endpage (); ?>   hope someone finds it useful just never got round to making it insert the items correctly
  7. Re: Editing Donations   Would love a copy of your book of tricks silver lol where can i get a copy haha
  8. Re: monorail Does any body out there know of a way to make it so when you travel on the monorail it locks you out from playing the game for say city 1 = 5 minutes city 2 = 10 minutes city 3 = 15 minutes etc etc would love to have this in the game
  9. Re: would this be possible thanks danny for the reply. has anybody ever tried to use this or a similar script in the past please.
  10. would it be possible to add this to the McCodes header to stop AOL proxies by any chance.   if(strpos(strtoupper(@gethostbyaddr(getip())), "PROXY.AOL")) { die("<h1>AOL Proxy Detected</h1><hr>Sorry but the AOL browser is banned from MYSITE. Please use another browser like Firefox/IE"); }   just something i stumbled upon somewhere and made me think maybe ?? lol what do you guys and gals think
  11. Re: Odd attack problem I also have this problem on mine. but the users start the attack then get the message at the top stating that they have lost ALL thier exp because they ran from the fight also the if they did fight to the end they gained 0 exp
  12. Re: Ajax chat for V2 What did you need to do to fix it please as i would like others to work on it and make it better
  13. Re: Ajax chat for V2 I will look into it and see what i did wrong but i still think it is an addon worth toying with (when i get it up here right lol) forgot to say chmod the txt file to 777
  14. Re: Ajax chat for V2 can be seen working as instructed on http://urbanheist.com on the left hand menu under the heading of basic chat
  15. I have emailed Seanybob and he gave me permission to add here what i have done with his chat script. Hopefully someone else can look at it and maybe improve on what i have changed (I am not and do not profess to be a coder) via reading up and learning from various sites including this one.   <? //original script by seanybob [url="http://seanybob.net/"]http://seanybob.net/[/url] //butchered and altered slightly by Erus [url="http://brutalconflict.com"]http://brutalconflict.com[/url] //Please if you use this code (it is free) please leave the credits to seanybob session_start(); require "globals.php"; $_GET['viewall']=abs((int) $_GET['viewall']); if(isset($_POST['Submit'])) { print '<table width="100%" border="0" cellspacing="1" bordercolor="#000000" bgcolor="#333333"> <tr> <td width="400" bgcolor="#FFFFFF">'; $dataf = "shoutbox.txt"; $name = htmlentities($_POST['name'], ENT_QUOTES); $message = htmlentities($_POST['message'], ENT_QUOTES); $fo=fopen("$dataf","r"); $stuff=file_get_contents("$dataf"); fclose($fo); if (!$name) //word censors $message = str_replace("fuck","****",$message); $message = str_replace("bitch","****",$message); $message = str_replace("asshole","****",$message); $message = str_replace("cunt","****",$message); $message = str_replace("bullshit","****",$message); $message = str_replace("shit","****",$message); $comfile = file($dataf); $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "{$ir['username']}";$d="[img=donator.gif]"; } $gn=""; if ($message != "") { $file = fopen("$dataf","w"); $stuff2 = "<table width='90%' border='0' align='center' cellspacing='1' bgcolor='#080808'> <tr> <td width='20%' bgcolor='#080808'>{$ir['username']}</td><td width='80%'>[b]$message[/b]</td> </tr> </table><hr />"; $stuff3=$stuff2.$stuff; $write = fwrite($file,"$stuff3"); fclose($file); } ?> </td> </tr> </table><? } ?> <table width="100%" border="-" cellpadding="0" cellspacing="1" bgcolor="#080808"> <tr> <td width="20%" bgcolor="#080808">[i][b]<font color=white>User</font>[/b][/i] ::</td> <td width="80%">Shout</td> </tr> <tr> <table width="100%" border="-" cellpadding="0" cellspacing="1" bgcolor="#080808"> <td bgcolor="#080808"> <? if($_GET['viewall']==1) { include("shoutbox.txt"); } else { $a=file_get_contents("shoutbox.txt"); $b=explode("</table>",$a); $lasteleven=$b[0]."</table>".$b[1]."</table>".$b[2]."</table>".$b[3]."</table>".$b[4]."</table>".$b[5]."</table>".$b[6]."</table>".$b[7]."</table>".$b[8]."</table>"; print $lasteleven; } ?> </td> </tr> </table> <center> <table width="100%" border="0" cellspacing="1" bordercolor="#000000" bgcolor="#080808"> <tr> <td width="432" bgcolor="#080808"><form name="guestbook" action="" method="post"> [url="chat.php"]<font color=white>Refresh Now:</font>[/url] <textarea name="message" id="message"></textarea> </p> <input type="submit" name="Submit" value="Submit"> <input type="reset" name="Reset" value="Reset"> </p> </form></td> </tr> </table></center> <? $h->endpage(); ?>   As I said above make a blank text file (its not rocket science)   As I said above the code boxes I am not a coder yet and just learning. The main reason I have put this here is because I think that given the chance and a few good coders this could become a S*** hot add on for McCodes (but that is just my opinion we all have them) Hope some people find this useful and/or some can alter this and repost it. Erus
×
×
  • Create New...