Jump to content
MakeWebGames

Danny696

Members
  • Posts

    2,632
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Danny696

  1. Re: [mccode v2] Attack :) i edeited this a bit called it Lazy Fight And made it a simple one click fight that cost $500 to do and it will not destory the gangs when they get to 0 respect heres my version of the code: all this file lazyfight.php <?php $menuhide=0; $atkpage=1; include "globals.php"; $user_class=$ir; $q=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $attack_person=$db->fetch_row($q); $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$user_class['equip_primary']}"); $user_class1=$db->fetch_row($qo); $q1=$db->query("SELECT i.* FROM items i WHERE i.itmid={$user_class['equip_armor']}"); $user_class2=$db->fetch_row($q1); $weapon= "{$user_class1['itmname']}"; if(mysql_num_rows($qo) == 0) { $weapon="Fists"; } $eq=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$attack_person['equip_primary']})"); if(mysql_num_rows($eq) == 0) { $wep="Fists"; } else { $cnt=0; while($r=$db->fetch_row($eq)) { $enweps[]=$r; $cnt++; } $weptouse=rand(0,$cnt-1); $wep=$enweps[$weptouse]['itmname']; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $gq=$db->query("SELECT * FROM gangs WHERE gangID={$attack_person['gang']}"); $ga=$db->fetch_row($gq); $error = ($enperc < 25) ? "You need to have at least 25% of your energy if you want to attack someone." : $error; $error = ($user_class['jail'] > 0) ? "You can't attack someone if you are in jail." : $error; $error = ($user_class['hospital'] > 0) ? "You can't attack someone if you are in the hospital." : $error; $error = ($_GET['ID'] == "") ? "You didn't choose someone to attack." : $error; $error = ($_GET['ID'] == $userid) ? "You can't attack yourself." : $error; $error = ($attack_person['location'] != $user_class['location']) ? "You must be in the same city as the person you are attacking. Duh." : $error; $error = ($attack_person['username'] == "") ? "That person doesn't exist." : $error; $error = ($attack_person['hospital'] > 0) ? "You can't attack someone that is in the hospital." : $error; $error = ($attack_person['jail'] > 0) ? "You can't attack someone that is in jail." : $error; $error = ($ir['money'] < 500) "You Need At Least $500 To Do A Lazy Fight." : $error; print " [url='index.php']Go Back to Home[/url] "; ?><div id="main " style="a"><center><?PHP if (isset($error)){ echo ($error); $h->endpage(); exit; } if ($user_class['energy'] >= $user_class['maxenergy']/4) { $user_class['energy']-= floor($user_class['maxenergy']/4); $me=floor($user_class['maxenergy']/4); $db->query("UPDATE users SET energy=energy- {$me} WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } $yourhp = $user_class['hp']; $theirhp = $attack_person['hp']; $damagestat = number_format($user_class['strength']) ; $itstat = $user_class1['weapon']; $damplu = $damagestat * ($itstat*100); $ratio=($user_class['level']*100)/($attack_person['level']*100); print "<center>Lazy Fight <font color=yellow>The fight Ratio is ".$ratio."%</font> You are in a Battle with ".$attack_person['username']." </center>"; echo " You come in with your ".$weapon." With a Strenght of ".$damplu." "; $wait = ($user_class['agility'] > $attack_person['agility']) ? 1 : 0; $hospital = 600; $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$attack_person['equip_primary']})"); $r1=$db->fetch_row($qo); $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$attack_person['equip_primary']})"); $r2=$db->fetch_row($qo); $damage = (int) (($user_class1['weapon']*$user_class['strength']/($attack_person['guard']/1.5))); $theirdamage = (int) (($r1['weapon']*$attack_person['strength']/($user_class['guard']/1.5))); while($yourhp > 0 && $theirhp > 0){ $damage = ($damage < 1) ? 1 : $damage; $theirdamage = ($theirdamage < 1) ? 1 : $theirdamage; if($wait == 0){ $yourhp = $yourhp - $theirdamage; echo "<font color=red>".$attack_person['usename']."Takes their turn to swing at you!</font> "; echo $attack_person['username']. " hit you for " .number_format($theirdamage). " damage using their ".$wep.". "; } else { $wait = 0; } if($yourhp > 0) { $damage = (int) (($user_class1['weapon']*$user_class['strength']/($attack_person['guard']/1.5))); $damage = ($damage < 1) ? 1 : $damage; $theirhp = $theirhp - $damage; echo "<font color=green>You swing at them!</font> "; echo "You hit " .$attack_person['username']. " for " . number_format($damage) . " damage using your ".$weapon.". "; } if($theirhp <= 0){ // attacker won $winner = $user_class['ID']; $theirhp = 0; $moneywon = floor($attack_person['money'] /10); $expwon = 150 - (25 * ($user_class['level'] - $attack_person['level'])); $expwon = ($expwon < 0) ? 0 : $expwon; $hosptime=20; $hospreason = "Attacked by ".$user_class['username']."" ; $newexp = $expwon + $user_class['exp']; $newmoney = $user_class['money'] + $moneywon; $result = $db->query("UPDATE `users` SET `exp` = '".$newexp."', money = '".$newmoney."' WHERE `userid`='".$user_class['userid']."'"); $newmoney = $attack_person['money'] - $moneywon; $result = $db->query("UPDATE `users` SET `hp`= 1,`hospital` ='".$hosptime."', `money` = '".$newmoney."', `hospreason` = '".$hospreason."' WHERE `userid`='".$attack_person['userid']."'"); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',".$user_class['userid'].",".$attack_person['userid'].",'won',unix_timestamp(),".$moneywon.",'$atklog');"); event_add($attack_person['userid'], "You were hospitalized by ".$user_class['username']." for 20 minutes."); $final ="<center>You hospitalized " .$attack_person['username']. ". You gain $expwon exp and stole $".$moneywon." from " .$attack_person['username']. ". </center>"; $db->query("UPDATE users SET money=money-250 WHERE userid=$userid"); $pwnd =""; $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$user_class['gang']} AND warDECLARED={$attack_person['gang']}) OR (warDECLARED={$user_class['gang']} AND warDECLARER={$attack_person['gang']})"); if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT-2 WHERE gangID={$attack_person['gang']}"); $ga['gangRESPECT']-=2; $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT+2 WHERE gangID={$user_class['gang']}"); $pwnd =" You earnt 2 respect for your gang!"; } $bots=array(96,94,5,97,98,99,142,138,138,140,141,146,143,144,145);//Your Battle Tent Bots $moneys=array(96 =>5000,94 =>5000,5 => 500,97 => 5000, 98 => 500, 99 => 10000, 142 => 1500,138 =>10000,140 =>10000,141 =>10000,146 =>20000,143 =>15000,144 =>15000,145 =>15000); if(in_array($attack_person['userid'],$bots)) { $gain=$moneys[$attack_person['userid']]; $db->query("UPDATE users SET money=money+$gain WHERE userid=$userid",$c); $finalbot =""; $finalbot =" Congrats, for beating the Challenge Bot {$attack_person['username']}, you have earnt \$$gain!"; } } if($yourhp <= 0){ // defender won $winner = $attack_person['ID']; $yourhp = 0; $moneywon = floor($user_class['money'] /10); $expwon = 100 - (25 * ($attack_person['level'] - $user_class['level'])); $expwon = ($expwon < 0) ? 0 : $expwon; $hosplost = "Lost to ".$attack_person['username']."" ; $hosptime=20; $newexp = $expwon + $attack_person['exp']; $newmoney = $attack_person['money'] + $moneywon; $result = $db->query("UPDATE `users` SET `exp` = '".$newexp."', money = '".$newmoney."' WHERE `userid`='".$attack_person['userid']."'"); $newmoney = $user_class['money'] - $moneywon; $result = $db->query("UPDATE `users` SET `hp`= 1,`hospital` ='".$hosptime."' ,`money` = '".$newmoney."', `hospreason` = '".$hosplost."' WHERE `userid`='".$user_class['userid']."'"); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',".$attack_person['userid'].",".$user_class['userid'].",'won',unix_timestamp(),".$moneywon.",'$atklog');"); $final = $attack_person2 . " beat you and stole $".$moneywon." from you."; $pwnd =""; $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$user_class['gang']} AND warDECLARED={$attack_person['gang']}) OR (warDECLARED={$user_class['gang']} AND warDECLARER={$attack_person['gang']})"); if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT+2 WHERE gangID={$attack_person['gang']}"); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT-2 WHERE gangID={$user_class['gang']}"); $pwnd =" You lost 2 respect for your gang!"; } } } echo "$final"; echo "$pwnd "; echo "$finalbot"; $h->endpage(); ?></div></center>   in viewuser.php find [[url='attack.php?ID={$r[']Attack[/url]] and after add: [[url='lazyattack.php?ID={$r[']Lazy Attack Cost $500[/url]]
  2. Re: Attack Script made by us one that works Hopefully. what was the last mod that you pulled together to make? :mrgreen:
  3. Re: Things A Flight Attendent Would'n't Say. *bumped* On the left you will see the Grand Canyon On the Right You will See me And a Parachout
  4. Re: Count Backwards :D This Needs To Be *Bumped* 4874
  5. Re: I need help with a Mod i made ok do u see anything else wrong? *bumped*
  6. Re: Never Ending Story Major Asburn was married to Yin Pain but he was having a gay affair with Herb Avore this was going on while Yin Pain was also haveing an affair with Herb Avore.
  7. Re: How did your RPG gaming start? i staretd on envy the game then advetiser got me on other games
  8. Re: 3 Word Game of chlamydia but
  9. Re: Guess the next poster im not sam hahaha :-P :evil: i vote for _SaMz_ next
  10. Re: THIS OR THAT? PHPBB c or c++
  11. Re: Counting (nr game) 1299 :evil:
  12. Re: [McCodes V2] Streets Mod yes so it would be $db->query("UPDATE users ADD turns+5 WHERE turns < 100")
  13. Re: I need help with a Mod i made woops i posted the wrong code heres the proper 1 <?php session_start(); require "globals.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(); get_mine(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); switch($_GET['action']) { case 'street1': street_1(); break; case 'mine1sub': street_1_sub(); break; case 'street2': street_2(); break; case 'street2sub': street_2_sub(); break; case 'street3': street_3(); break; case 'street3sub': street_3_sub(); break; case 'street4': street_4(); break; case 'street4sub': street_4_sub(); break; case 'street5': street_5(); break; case 'streete5sub': street_6_sub(); break; case 'mine6': mine_6(); break; case 'street6sub': street_6_sub(); break; default: street_index(); break; } function street_index() { global $ir,$c,$userid; print "<center>You are currently scavenging the streets.You Can Find Everytihn Here Items, Money Or Experience Maby Even A Special Item Your street level is {$ir['street_level']} and you have {$ir['street_exp']}/{$ir['street_needed']} mining experience </center>"; print "<center> <u>Street Levels</u> [[url='streets.php?action=street1']Level 1 streets[/url]] [[url='streets.php?action=street2']Level 10 streets[/url]] [[url='streets.php?action=street3']Level 20 streets[/url]] [[url='streets.php?action=street4']Level 30 streets[/url]] [[url='streets.php?action=street5']Level 40 streets[/url]] [[url='streets.php?action=street6']Level 50 streets[/url]] } if ($ir['jailtime'] > 0){ print "<center>You See Some Bins Outside Your Cell You Rember Where They Are So You Can Visit When You Get Out Of [b]Jail[/b]</center>"; print "<center>Go Back To <a href='jail.php'>Jail</center>"; exit; } if ($ir['hospital'] > 0){ print "<center>You See A Bin Next To You Bed And Start To Look In It Then The Nurse Come's In And Sedates You</center>"; print "<center>Go Back To <a href='hospital.php'>Hospital</center>"; exit; { if ($ir['turns'] < 1) { print("You do not have enough steps to scavenge the streets any more. Come back at newday. "); } function streets_1() }else { $chance = rand(1,4); $db->query("UPDATE users SET turns=turns-1 where userid={$userid}"); function streets_2() }else { $chance = rand(1,6); $db->query("UPDATE users SET turns=turns-1 where userid={$userid}"); function streets_3() }else { $chance = rand(1,9); $db->query("UPDATE users SET turns=turns-1 where userid={$userid}"); function streets_4() }else { $chance = rand(1,12); $db->query("UPDATE users SET turns=turns-1 where userid={$userid}"); function streets_5() }else { $chance = rand(1,15); $db->query("UPDATE users SET turns=turns-1 where userid={$userid}"); if ($chance == 1) { $amnt=rand(50,200); if($ir['money'] > $amnt) { print "As you scavenge the streets you see a hobo; he asks you for \$$amnt and you tell him to piss off. Then he proceeds to smack the shit out of you. He takes the \$$amnt anyway. "; $db->query("UPDATE users SET money=money- {$amnt } where userid=$userid",$c); $ir['money']-=$amnt; } else { print "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. "; $db->query("UPDATE users SET money=0 where userid=$userid",$c); $ir['money']=0; } } if ($chance == 2) { print "Nothing here. "; } if ($chance == 3) { $expgained=rand(20,90)*$ir['street_level']; $gained=rand(20,90)*$ir['level']; print "You found a bag of cash on the side walk you open it up and find [b] \$$gained[/b] was inside. "; $db->query("UPDATE users SET money=money+$gained where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 4) { $hosptime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonhosp = 'Stepped on a land mine while scavenging.'; $db->query("UPDATE users SET hospital=$hosptime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); event_add($ir['userid'],"You stepped on a land mine while exploring. Do be a bit more careful next time...",$c); die ("You stepped on a land mine. [b]Good news[/b]: You aren't dead [b]Bad News[/b]:You have to stop exploring and go into Hospital "); } if ($chance == 5) { $expgained=rand(20,90)*$ir['street_level']; $gain = rand(5,20); print "While searching the streets you found [b]$gain[/b] crystals."; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 6) { $expgained=rand(20,90)*$ir['street_level']; $gain = rand(50,100)*(floor($ir['level']/2)+1); print "While searching the streets you found [b] \$$gain[/b]. "; $db->query("update users set money=money+$gain where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 7) { print "You see a guy getting mugged, but you decide to keep walking. You don't want to be in his shoes anytime soon. "; } if ($chance == 8) { $jailtime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonjail = 'Got Lured By The Police.'; $db->query("UPDATE users SET jail=$jailtime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET jailreason='$reasonjail' WHERE userid=$loseruser",$c); event_add($ir['userid'],"You Got Lured By The Police. [b]Loser[/b]",$c); die ("You Find A Bag Of Crystals...It Was A Lure By The Police Looks Like Jail Time For You. "); } if ($chance == 9) { $expgained=rand(20,90)*$ir['street_level']; print "You see a small item on the ground, and decide to pick it up... wonder what it is? (Hint, look in your inventory lol)"; $itemidexplore = 40; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print" "; $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 10) { $expgained=rand(20,90)*$ir['street_level']; print "You see a syringe on the ground, and decide to pick it up. Looks deadly enough..."; $itemidexplore = 16; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 11) { $expgained=rand(20,90)*$ir['street_level']; $gain = $ir['turns']/7 print "You Gain [b] \$$gain[/b] Steps. "; $db->query("update users set steps=steps+$gain where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 12) { print "Nothing here. "; } if ($chance == 13) { $expgained=rand(20,90)*$ir['street_level']; $expcur=(($ir['exp']+$ir['exp_needed'])/100); $exp=(($expcur)*rand(1,5)); print "You got in a scuffle with a bum, and WON you gained some EXP!! (Go have a look!) "; $db->query("UPDATE users SET exp=exp+$exp WHERE userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 14) { print "Nothing here. "; } if ($chance == 15) { print "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."; } $ir['turns']--; print"you have [b] {$ir['turns'] }[/b] steps left "; } } if($ir['turns']==0) { print "Sorry, all turns used! Go Back<a href='index.php'>Home</center>Go "; } 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='scavenge'></form>"; } } $h->endpage; ?> }
  14. Re: [mccode v2] Lottery does the momey go to their bank or thier hand?
  15. Re: I need help with a Mod i made and the MySql bits:   ALTER TABLE `users` ADD `street_level` int(11) NOT NULL DEFAULT 1; ALTER TABLE `users` ADD `street_exp` int(11) NOT NULL DEFAULT 0; ALTER TABLE `users` ADD `street_needed` int(11) NOT NULL DEFAULT 100 ;
  16. Re: I need help with a Mod i made ill post the code i just dont relii want people useing it untill i fully release it here it is <?php ///////////////////////////////////////////////////////// pleaese do not remove This Mode Coded By Hitman ///////////////////////////////////////////////////////// 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(); get_street(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); switch($_GET['action']) { case 'street1': street_1(); break; case 'street1sub': street_1_sub(); break; case 'street2': street_2(); break; case 'street2sub': street_2_sub(); break; case 'street3': street_3(); break; case 'street3sub': street_3_sub(); break; case 'street4': street_4(); break; case 'street4sub': street_4_sub(); break; case 'street5': street_5(); break; case 'streete5sub': street_6_sub(); break; case 'street6': street_6(); break; case 'street6sub': street_6_sub(); break; default: street_index(); break; if ($ir['jail'] > 0){ print "<center>You See Some Bins Outside Your Cell You Rember Where They Are So You Can Visit When You Get Out Of [b]Jail[/b]</center>"; print "<center>Go Back To <a href='jail.php'>Jail</center>"; exit; } if ($ir['hospital'] > 0){ print "<center>You See A Bin Next To You Bed And Start To Look In It Then The Nurse Come's In And Sedates You</center>"; print "<center>Go Back To <a href='hospital.php'>Hospital</center>"; exit; { if ($ir['turns'] < 1) { print("You do not have enough steps to scavenge the streets any more. Come back at newday. "); }else { function street_index() { global $ir,$c,$userid; print "<center>You are currently scavenging the streets.You Can Find Everytihn Here Items, Money Or Experience Maby Even A Special Item Your street level is {$ir['street_level']} and you have {$ir['street_exp']}/{$ir['street_needed']} mining experience </center>"; print "<center> <u>Street Levels</u> [[url='streets.php?action=street1']Level 1 streets[/url]] [[url='streets.php?action=street2']Level 10 streets[/url]] [[url='streets.php?action=street3']Level 20 streets[/url]] [[url='streets.php?action=street4']Level 30 streets[/url]] [[url='streets.php?action=street5']Level 40 streets[/url]] [[url='streets.php?action=street6']Level 50 streets[/url]] print "<center> <u>This Mod Was Made By Hitman</u> } function streets_1() $chance = rand(1,4); $db->query("UPDATE users SET turns = turns - 1 WHERE userid = ".$userid.""); function streets_2() $chance = rand(1,6); $db->query("UPDATE users SET turns = turns - 1 WHERE userid = ".$userid.""); function streets_3() $chance = rand(1,9); $db->query("UPDATE users SET turns = turns - 1 WHERE userid = ".$userid.""); function streets_4() $chance = rand(1,12); $db->query("UPDATE users SET turns = turns - 1 WHERE userid = ".$userid.""); function streets_5() $chance = rand(1,15); $db->query("UPDATE users SET turns = turns - 1 WHERE userid = ".$userid.""); if ($chance == 1) { $amnt=rand(50,200); if($ir['money'] > $amnt) { print "As you scavenge the streets you see a hobo; he asks you for \$$amnt and you tell him to piss off. Then he proceeds to smack the shit out of you. He takes the \$$amnt anyway. "; $db->query("UPDATE users SET money=money- {$amnt } where userid=$userid",$c); $ir['money']-=$amnt; } else { print "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. "; $db->query("UPDATE users SET money=0 where userid=$userid",$c); $ir['money']=0; } } if ($chance == 2) { print "Nothing here. "; } if ($chance == 3) { $expgained=rand(20,90)*$ir['street_level']; $gained=rand(20,90)*$ir['level']; print "You found a bag of cash on the side walk you open it up and find [b] \$$gained[/b] was inside. "; $db->query("UPDATE users SET money=money+$gained where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 4) { $hosptime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonhosp = 'Stepped on a land mine while scavenging.'; $db->query("UPDATE users SET hospital=$hosptime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); event_add($ir['userid'],"You stepped on a land mine while exploring. Do be a bit more careful next time...",$c); die ("You stepped on a land mine. [b]Good news[/b]: You aren't dead [b]Bad News[/b]:You have to stop exploring and go into Hospital "); } if ($chance == 5) { $expgained=rand(20,90)*$ir['street_level']; $gain = rand(5,20); print "While searching the streets you found [b]$gain[/b] crystals."; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 6) { $expgained=rand(20,90)*$ir['street_level']; $gain = rand(50,100)*(floor($ir['level']/2)+1); print "While searching the streets you found [b] \$$gain[/b]. "; $db->query("update users set money=money+$gain where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 7) { print "You see a guy getting mugged, but you decide to keep walking. You don't want to be in his shoes anytime soon. "; } if ($chance == 8) { $jailtime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonjail = 'Got Lured By The Police.'; $db->query("UPDATE users SET jail=$jailtime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET jailreason='$reasonjail' WHERE userid=$loseruser",$c); event_add($ir['userid'],"You Got Lured By The Police. [b]Loser[/b]",$c); die ("You Find A Bag Of Crystals...It Was A Lure By The Police Looks Like Jail Time For You. "); } if ($chance == 9) { $expgained=rand(20,90)*$ir['street_level']; print "You see a small item on the ground, and decide to pick it up... wonder what it is? (Hint, look in your inventory lol)"; $itemidexplore = 40; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print" "; $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 10) { $expgained=rand(20,90)*$ir['street_level']; print "You see a syringe on the ground, and decide to pick it up. Looks deadly enough..."; $itemidexplore = 16; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 11) { $expgained=rand(20,90)*$ir['street_level']; $gain = $ir['turns']/7 print "You Gain [b] \$$gain[/b] Steps. "; $db->query("update users set steps=steps+$gain where userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 12) { print "Nothing here. "; } if ($chance == 13) { $expgained=rand(20,90)*$ir['street_level']; $expcur=(($ir['exp']+$ir['exp_needed'])/100); $exp=(($expcur)*rand(1,5)); print "You got in a scuffle with a bum, and WON you gained some EXP!! (Go have a look!) "; $db->query("UPDATE users SET exp=exp+$exp WHERE userid=$userid",$c); $db->query("UPDATE users SET street_exp=street_exp+$expgained where userid=$userid",$c); } if ($chance == 14) { print "Nothing here. "; } if ($chance == 15) { print "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."; } $ir['turns']--; print"you have [b] {$ir['turns'] }[/b] steps left "; } } if($ir['turns']==0) { print "Sorry, all turns used! "; } 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='scavenge'></form>"; } } $h->endpage; ?> }
  17. Re: I need help with a Mod i made i have editied it slitly hopefully iw ill work
  18. Re: [McCodes V2] Streets Mod i will be postign a streets mod soon not sure if it will be a payed or free mod yet
  19. Re: I need help with a Mod i made line 64 is $chance = rand(1,4);
  20. Re: I need help with a Mod i made hey man dont blame me im 13 and have learnt some php from reading php so when i spent over 2 hours coding i think im gonna make some mistakes dont u :oops: :cry: and i only made 2 mistakes :-P
  21. Re: I need help with a Mod i made ok i will try that and tell u wat happens if it works i will post the mod on here
  22. Re: I need help with a Mod i made ty i fixed it now it wasnt 'jailtime' it was just 'jail' now i have another prob the error is Parse error: syntax error, unexpected T_STRING in /home/pirateba/public_html/streets2.php on line 65 line 65 is: $db->query("UPDATE users SET turns=turns-1 where userid=$userid",$c);
  23. i have a code i just made it took about 2~3 hours to fully make for a website they have uploaded it and it doesn't work the error is: Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/pirateba/public_html/streets2.php on line 35 and on line 35 is: if ($ir['jailtime'] => 1){ any help??
  24. Re: [McCodes V2] Streets Mod thank you for the replies
  25. Re: [Mccodes V2] Streets go on mccodes website and freebies its there
×
×
  • Create New...