
2Pacalypse
Members-
Posts
63 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by 2Pacalypse
-
Re: Cron Jobs You need to use this format in advanced cron tab: curl [url]http://gameurl.dom/cron_????.php?code=yourskittycode[/url]
-
Re: Energy Bar too long? Do a check on their current energy, and the energy it takes to cook the food, then do a little equation like (energy - energy needed) and if it <0 then don't llet it happen. And if the equation =>0 then let ti go through ;) That would stop negative energy :D
-
Re: [ANY] Army(ish) Banner FREE Try to crop around the rifle a bit more. looks like it has dandruff and flaked everywhere lol
-
[REVIEW] Organized Gangstas - Please review!!
2Pacalypse replied to joker313's topic in Browsergames
Re: [REVIEW] Organized Gangstas - Please review!! Can't see myself going back to it lol Sorry. Everything is messy, etc etc -
Re: [REVIEW] Korporate Thugz! 1 post per 50 views ? :( 2 are mines :(
-
Re: [REVIEW] Korporate Thugz! Oh, it's that brilliant it deserves its own copyright patent ;) lol
-
Re: [REVIEW] Korporate Thugz! My COPY?
-
Re: [REVIEW] Korporate Thugz! No one?
-
Starting new Game Engine (massive features) - Need feedback
2Pacalypse replied to Sim's topic in General
Re: Starting new Game Engine (massive features) - Need feedback To be realy picky... I hate games with Guard/Agility... it should be Defense/Speed lol -
Hello Criminal Existence users! Title: Korporate Thugz Site URL: http://www.kthugz.com You can also login to http://forum.kthugz.com with the same details you used to register with the game Let me know what you think! Please also grade it using: Look/Layout- /10 Playability- /10 General Mark- /10 :D Thank you my dears
-
Re: Questions about languages. 1. How old are you? 14 2. Which country do you live in? Northern Ireland 3. How many and which languages do you speak? 3 - English, Spanish, French 4. Where did you learn them? School & College
-
Re: Help Header Problem Why does your site bring me to youporn.com? :|
-
Re: [V2] Mug feature with Stats! Oh yeah my mistake. Just in my index.php I have declared the variable thing for $muggain & $mugloss Thanks for the fix!
-
Re: Making a perfect demo account! Guessing you put that in header, haven't a clue how to do thatbut it looks good
-
Re: Making a perfect demo account! Because that's nearly exactly the same, except more general and uses an ID lol I found it easier to use the username, because most demo accounts have the username, 'demo'. Which makes it dead easy to use! Also I'm sure if anyone wanted to change the message to "This feature is disabled" they would work out roughly how to do that themselves :roll:
-
Before we start: I didn't make the Mug script - it was a "freebie" on mccodes.com! Credits: 75% to mccode for making the Hackpc/mug script 25% to 2Pacalypse for adding stuffs Basically this makes it so as players can essentially steal other players money and claim it for themselves! I have added a feature which keeps a record of how many times someone has mugged another player, how much money they have made from muggings and finally, how much they have lost from muggings! Here's the basic mug.php: <?php session_start(); include "globals.php"; include "mug.config.php"; global $db_config; $in = abs((int) $_GET['ID']); if(!$in) { print "Error - no valid player ID to mug specified."; $h->endpage(); exit; } $q = $db->query("SELECT * FROM `users` WHERE userid = {$in}", $c); if(!$db->num_rows($q)) { print "Error - player ID specified does not exist."; $h->endpage(); exit; } $r = $db->fetch_row($q); if(in_array($in, $db_config['prohibited'])) { print "Error - this player cannot be mugged."; $h->endpage(); exit; } if($r['user_level'] == 0 && $db_config['nomug']) { print "Error - NPCs cannot muggeded."; $h->endpage(); exit; } if($in == $userid) { print "Error - you cannot mugged yourself don't be crazy!"; $h->endpage(); exit; } if($r['fedjail']) { print "Error - this player is banned and cannot be mugged"; $h->endpage(); exit; } if($ir['brave'] < $db_config['bravecost']) { print "Error - you need {$db_config['bravecost']} nerve to mug someone."; $h->endpage(); exit; } $rsf = rand(1,100); $exga = rand($db_config['minexp'],$db_config['maxexp']); if($rsf <= $db_config['chance']) { $db->query("UPDATE users SET exp=exp+{$exga}, brave=brave-{$db_config['bravecost']} WHERE userid={$userid}", $c); $stole=(int) (rand($r['money']/20,$r['money']/30)); if ($stole<0) {$stole=0;} if ($stole>0) { $db->query("UPDATE users SET money=money+{$stole} WHERE userid={$userid}", $c); $db->query("UPDATE users SET mugs=mugs+1 WHERE userid={$userid}", $c); $db->query("UPDATE users SET muggain=muggain+{$stole} WHERE userid={$userid}", $c); $db->query("UPDATE users SET money=money-{$stole} WHERE userid={$in}", $c); $db->query("UPDATE users SET mugloss=mugloss+{$stole} WHERE userid={$in}", $c); } event_add($in, "[url='viewuser.php?u=$userid']{$ir['username']}[/url] mugged you for \$$stole! Click [url='mug.php?ID={$userid}']here[/url] to try to take your revenge!", $c); print "You succesfully mugged {$r['username']} and stole \$$stole."; } else { $db->query("UPDATE users SET brave=brave-{$db_config['bravecost']} WHERE userid={$userid}", $c); print "You failed to mug {$r['username']}."; } $h->endpage(); ?> mug.config.php <?php $db_config = array ( 'prohibited' => array(), //Add player IDs to this array who you want to be protected from mugging. 'nomug' => TRUE, //Set this to true to block NPC's from being mugged. 'bravecost' => 10, //Set this to the amount of brave you want mugging to cost. 'minexp' => 0, //Set this to the minimum EXP (figure, not %age) that you want a user to gain from a successful mug. 'maxexp' => 350, //Set this to the maximum EXP (figure, not %age) that you want a user to gain from a successful mug. 'chance' => 85, //Set this to the % chance of a successful mug. Must be a positive integer >= 1. ); ?> Now all you have to do is.... go to your phpmyadmin & run these commands: ALTER TABLE users ADD mugs int(11) NOT NULL default 0 ALTER TABLE users ADD muggain int(11) NOT NULL default 0 ALTER TABLE users ADD mugloss int(11) NOT NULL default 0 Finally, to display these stats go to index.php and add this: <tr> <td class="h" colspan="2">[b]Mugging Info[/b]</td> </tr> <tr> <td colspan="2">[b]Successful Muggings:[/b] {$ir['mugs']}</td> </tr> <tr> <td>[b]Money Gained:[/b] {$muggain}</td><td>[b]Money Lost:[/b] {$mugloss}</td> </tr> Have a good day!
-
Re: Making a perfect demo account! Good point, but some mightn't mind certain areas being changed & that is only for one page. It's different for the likes of item markets, sendcash, etc
-
Re: Making a perfect demo account! preferences.php would look something like: <?php include "globals.php"; switch($_GET['action']) { case 'passchange2': do_pass_change(); break; case 'passchange': pass_change(); break; case 'namechange2': do_name_change(); break; case 'namechange': name_change(); break; case 'picchange2': do_pic_change(); break; case 'picchange': pic_change(); break; case 'forumchange2': do_forum_change(); break; case 'forumchange': forum_change(); break; case 'sigchange2': do_sig_change(); break; case 'sigchange': sig_change(); break; default: prefs_home(); break; } function prefs_home() { global $db,$ir,$c,$userid,$h; print "<h3>Preferences</h3> [url='preferences.php?action=passchange']Password Change[/url] [url='preferences.php?action=namechange']Name Change[/url] [url='preferences.php?action=sigchange']Signature Change[/url] [url='preferences.php?action=picchange']Display Pic Change[/url] [url='preferences.php?action=forumchange']Forum Info Change[/url] "; } function pass_change() { global $ir,$c,$userid,$h; if ($ir['username']==demo) { print "Demo account cannot change passwords!!"; } else { print "<h3>Password Change</h3><form action='preferences.php?action=passchange2' method='post'>Current Password: <input type='password' name='oldpw' /> New Password: <input type='password' name='newpw' /> Confirm: <input type='password' name='newpw2' /> <input type='submit' value='Change PW' /></form>"; } } function do_pass_change() { global $db,$ir,$c,$userid,$h; if ($ir['username']==demo) { print "Demo account cannot change passwords!!"; } elseif(md5($_POST['oldpw']) != $ir['userpass']) { print "The current password you entered was wrong. [url='preferences.php?action=passchange']> Back[/url]"; } else if($_POST['newpw'] !== $_POST['newpw2']) { print "The new passwords you entered did not match! [url='preferences.php?action=passchange']> Back[/url]"; } else { $db->query("UPDATE users SET userpass=md5('{$_POST['newpw']}') WHERE userid=$userid"); print "Password changed!"; } } function name_change() { global $ir,$c,$userid,$h; if ($ir['username']==demo) { print "Demo account cannot change name!"; } else { print "<h3>Name Change</h3> Please note that you still use the same name to login, this procedure simply changes the name that is displayed. <form action='preferences.php?action=namechange2' method='post'> New Name: <input type='text' name='newname' /> <input type='submit' value='Change Name' /></form>"; } } function do_name_change() { global $db,$ir,$c,$userid,$h; if($_POST['newname'] == "") { print "You did not enter a new name. [url='preferences.php?action=namechange']> Back[/url]"; } else { $_POST['newname']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['newname']); $db->query("UPDATE users SET username='{$_POST['newname']}' WHERE userid=$userid"); print "Username changed!"; } } function pic_change() { global $ir,$c,$userid,$h; if ($userid==9) { print "Demo account cannot edit their picture!"; } else { print "<h3>Pic Change</h3> Please note that this must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation. Any images that are not 150x150 will be automatically resized <form action='preferences.php?action=picchange2' method='post'> New Pic: <input type='text' name='newpic' value='{$ir['display_pic']}' /> <input type='submit' value='Change Name' /></form>"; } } function do_pic_change() { global $db,$ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); $db->query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid"); print "Pic changed!"; } } function forum_change() { global $ir,$c,$userid,$h; if ($ir['username']==demo) { print "Demo account cannot change forum info!!"; } else { print "<h3>Forum Info Change</h3> Please note that the avatar must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation. Any avatars that are not 100x100 will be automatically resized <form action='preferences.php?action=forumchange2' method='post'> Avatar: <input type='text' name='forums_avatar' value='{$ir['forums_avatar']}' /> Signature (you may use BBcode): <textarea rows=10 cols=50 name='forums_signature'>{$ir['forums_signature']}</textarea> <input type='submit' value='Change Info' /></form>"; } } function do_forum_change() { global $db,$ir,$c,$userid,$h; $_POST['forums_avatar']=str_replace(array("<", ">"), array("<", ">"), $_POST['forums_avatar']); $db->query("UPDATE users SET forums_avatar='{$_POST['forums_avatar']}', forums_signature='{$_POST['forums_signature']}' WHERE userid=$userid"); print "Forum Info changed!"; } function sig_change() { global $ir,$c,$userid,$h; if ($ir['username']==demo) { print "Demo account cannot change signature!!"; } else { print "<h3>Signature Change</h3> <form action='preferences.php?action=sigchange2' method='post'> Signature (you may use BBcode): <textarea class=textbox rows=10 cols=50 name='sig'>{$ir['sig']}</textarea> <input class=textbox type='submit' value='Change Signature ' /></form>"; } } function do_sig_change() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET sig='{$_POST['sig']}' WHERE userid=$userid"); print "Signature changed!"; } $h->endpage(); ?>
-
At first I thought "better not have a demo account", because of how easy it is to change the password on an account, also how unsafe it could be to give the account any decent number of points without abusers transferring to other accounts. Then I though, right, 2Pacalypse, stop being lazy! Sort it out! So I thought of a foolproof way to keep the demo acconut from changing usernames, passwords, transferring items/money/points, even selling things. It's incredibly simple. - Create an acconut with the username 'demo' - Paste these few lines in your sendcash.php, preferences.php, etc etc global $ir,$c,$userid,$h; if ($ir['username']==demo) { print "Demo account cannot (change passwords, etc)!!"; } else { ---NORMAL BODY HERE!--- } Simple eh? Will post some examples now
-
Ok, I'm more ore less a useless coder, but I thought this would be a simple enough task, all I wanted to do was change the damage made by players. What I intended to do was bring up the weapon power & armor.. power.. or both players and make an equation for the damage done by each of them However this turned out to be quite nasty! I got the weapon & armor 'power' and divided the strength/defense by 100 and multiply it by weapon/armor power! Then added the original strength/guard. Anyway... can someone please help out with this. I've doen what I can but totally lost now :( <?php $menuhide=1; $atkpage=1; include "globals.php"; $_GET['ID'] == (int) $_GET['ID']; //get opponent data $o=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $oppattack=$db->fetch_row($o); $oppabbr=($q['gender']=="Male") ? "his" : "her"; //get my data $m=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$userid}"); $myattack=$db->fetch_row($m); $myabbr=($m['gender']=="Male") ? "his" : "her"; //check if someone else is attacking that person $check=$db->query("SELECT * FROM users WHERE attacking={$_GET['ID']} AND userid!=$userid"); $checkit=mysql_num_rows($check); if ($checkit>0) { $att=$db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); print "Someone is already attacking that person. Try again later. [url='index.php']Back[/url]"; $h->endpage(); exit; } //additional checks if(!$_GET['ID']){ print "Excuse me. Looking for something? [url='index.php']Back[/url]"; $h->endpage(); exit; }else if($_GET['ID'] == $userid){ print "Only the crazy attack themselves. [url='index.php']Back[/url]"; $h->endpage(); exit; }else if ($myattack['hospital'] > 0){ print "You can't fight when you're in hospital. [url='index.php']Back[/url]"; $h->endpage(); exit; }else if ($oppattack['daysold'] < 2){ print "This Person Is Less Than 2 Days Old, Give 'Em A Chance [url='index.php']Back[/url]"; $h->endpage(); exit; }else if ($_SESSION['attacklost'] == 1){ print "Only the losers attack when they've already lost. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; $h->endpage(); exit; }else if ($myattack['location'] != $oppattack['location']){ print "You can only attack someone in the same location! [url='index.php']Back[/url]"; $h->endpage(); exit; } if($oppattack['hp'] <= 1){ print "This player is unconscious. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }else if($oppattack['hospital']){ print "This player is in hospital. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }else if($myattack['hospital']){ print "While in hospital you can't attack. [url='hospital.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }else if($oppattack['jail']){ print "This player is in jail. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }else if($myattack['jail']){ print "While in jail you can't attack. [url='jail.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }else if($oppattack['travelling']){ print "That player is travelling. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }else if($oppattack['fedjail']){ print "That player is in Federal Jail. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$myattack['equip_primary']}, {$myattack['equip_secondary']})"); if($db->num_rows($mw) > 0){ while($r=$db->fetch_row($mw)){ if($r['itmid']==$myattack['equip_primary']) { print "[b]Are you sure you want to attack this person?[/b] "; } print " [url='?ID={$_GET[']Yes![/url] "; } }else{ print "You have no weapon to fight with. [url='index.php']Back[/url]"; } if($_GET['wepid']){ //checks user for enough energy if($_SESSION['attacking']==0 && $myattack['attacking'] == 0){ if ($myattack['energy'] >= $myattack['maxenergy']/4){ $myattack['energy']-= floor($myattack['maxenergy']/4); $me=floor($myattack['maxenergy']/4); $db->query("UPDATE users SET energy=energy- {$me} WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; }else{ print "You can only attack someone when you have 25% energy [url='index.php']Back[/url]"; $h->endpage(); exit; } } //Ensures the weapon chosen is owned by the player if($_GET['wepid'] != $myattack['equip_primary'] && $_GET['wepid'] != $myattack['equip_secondary']){ print "Not your weapon... You lost all exp for that [url='index.php']> Home[/url]"; $db->query("UPDATE users SET exp=0 where userid=$userid",$c); die(""); } print " Attack Log. "; $i=1; for($i=1;$i<100;$i++) { $vars['hpperc']=round($myattack['hp']/$myattack['maxhp']*100); $vars['hpopp']=100-$vars['hpperc']; $vars2['hpperc']=round($oppattack['hp']/$oppattack['maxhp']*100); $vars2['hpopp']=100-$vars2['hpperc']; if($oppattack['hp'] <= 0) { $oppattack['hp']=0; $_SESSION['attackwon']=$_GET['ID']; $db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}",$c); print " Your opponent is unconscious. [b]What do you want to do with {$oppattack['username']} now?[/b] <form action='attackwon.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Mug Them' /></form> <form action='attackbeat.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Hospitalize Them' /></form> <form action='attacktake.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Leave Them' /></form>"; print " "; exit; }else{ //make it random $skit= mt_rand(int 80000, int 120000); //Select My Weapon/Armor details $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); $w1p=$db>query("SELECT weapon FROM items WHERE itmid={$myattack['equip_primary']}"); $qo2=$db->query("SELECT i.* FROM items i WHERE i.itmid={$myattack['equip_armor']}"); $r2=$db->fetch_row($qo2); //attackers armor $a1p=$db->query("SELECT armor FROM items WHERE itmid={$myattack['equip_armor']}"); //attacks overall guard $atkgrd=((($myattack['guard'])/100)*($a1p) +($myattack['guard']); //Select Their Weapon/Armor details $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$oppattack['equip_armor']}"); $oarmor=$db->fetch_single($q3); //opponents final guard $opgrd=((($oarmor)/100)*($oppattack['guard'])); $q4=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$oppattack['equip_primary']}, {$oppattack['equip_secondary']})"); if(mysql_num_rows($q4) == 0){ $wep="Fists"; $defratio=0.000000000001; }else{ $cnt=0; while($r=$db->fetch_row($q4)) { $enweps[]=$r; $cnt++; } $weptouse=rand(0,$cnt-1); $wep=$enweps[$weptouse]['itmname']; if(mysql_num_rows($qo2) == 0){ $defratio=($enweps[$weptouse]['weapon']*($oppattack['strength']+$oppattack['agility']))/($myattack['guard']+$myattack['agility']); }else{ $defratio=($enweps[$weptouse]['weapon']*($oppattack['strength']+$oppattack['agility']))/($r2['armor']*($myattack['guard']+$myattack['agility'])); } } //calculate attack if($oarmor == 0){ $attratio=(((($r1['weapon'])/100)*($myattack['strength']))-($oppattack['guard'])+($myattack['strength']); }else{ $attratio=(((($r1['weapon'])/100)*($myattack['strength']))-(($oarmor)/100)*($oppattack['guard'])+($myattack['strength'])); } if ($attratio > 1) { if ($attratio > 1000000) { $attdamage = 1000000; }else{ $attdamage=$attratio*($attratio*500); $attdamage=rand(($attdamage/4),$attdamage); } $db->query("UPDATE users SET hp=hp-$attdamage WHERE userid={$_GET['ID']}",$c); $oppattack['hp']-=$attdamage; $ns=$i; //print attack results print" {$i}. Using your {$r1['itmname']} you hit {$oppattack['username']} doing $attdamage damage \n"; $_SESSION['attackdmg']+=$attdamage; $_SESSION['attacklog'].="{$i}. Using {$myabbr} {$r1['itmname']} {$myattack['username']} hit {$oppattack['username']} doing $attdamage damage \n"; }else{ $attdamage = 0; $ns=$i; print " {$ns}. You tried to hit {$oppattack['username']} you but missed \n"; $_SESSION['attacklog'].="{$ns}. You tried to hit {$oppattack['username']} but missed \n"; } //calculate defense if ($defratio > 1) { if ($defratio > 1000000) { $defdamage = 1000000; }else{ $defdamage=$defratio*($defratio*500); $oppdamage=rand(($defdamage/2),$defdamage); } $db->query("UPDATE users SET hp=hp-$oppdamage WHERE userid=$userid",$c); $myattack['hp']-=$oppdamage; $ns=$i+1; print " {$ns}. Using $oppabbr $wep {$oppattack['username']} hit you doing $oppdamage damage \n"; $_SESSION['attacklog'].="{$ns}. Using $oppabbr $wep {$oppattack['username']} hit {$myattack['username']} doing $oppdamage damage ({$oppattack['hp']}) \n"; }else{ $oppdamage = 0; $ns=$i+1; print " {$ns}. {$oppattack['username']} tried to hit you but missed \n"; $_SESSION['attacklog'].="{$ns}. {$oppattack['username']} tried to hit {$myattack['username']} but missed \n"; } if($myattack['hp'] <= 0) { $od=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); if($db->num_rows($od)) { $r=$db->fetch_row($od); print "You lost to {$r['username']}"; $expgain=abs(($ir['level']-$r['level'])^3); $expgainp=$expgain/$ir['exp_needed']*100; $hosptime=20; print " and lost $expgainp% EXP!"; $db->query("UPDATE users SET hp=1,exp=exp-$expgain, attacking=0, hospital=$hosptime,hospreason='Lost to <a href=\'viewuser.php?u={$r['userid']}\'>{$r['username']}</a>' WHERE userid=$userid"); $db->query("UPDATE users SET exp=0 WHERE exp<0"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] attacked you and lost.",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'lost',unix_timestamp(),0,'$atklog');"); $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$ir['gang']} AND warDECLARED={$r['gang']}) OR (warDECLARED={$ir['gang']} AND warDECLARER={$r['gang']})"); if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT+1 WHERE gangID={$r['gang']}"); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT-1 WHERE gangID={$ir['gang']}"); print " You lost 1 respect for your gang!"; } }else{ print "You lost to Mr. Non-existant! =O"; } print " <a href='index.php>Go Back.</a></br>'"; exit; } print ' '; } $i=$i+1; if($i >= 99) { print"<center><h1><font color='red'>STALEMATE!</h1> <h2>This fight is going nowhere you may as well go home!</h2> [url='index.php']> Back[/url]</center>"; $_SESSION['attacking']=0; $myattack['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); $h->endpage(); event_add($odata['userid'],"[url='viewuser.php?u=$userid']{$myattack['username']}[/url] Tried to beat you but stalemated.",$c); event_add($myattack['userid']," You Tried to beat [url='viewuser.php?u={$odata[']{$odata['username']}[/url] but stalemated.",$c); exit; } } } $h->endpage(); ?>
-
Re: [any] Kool name That fucks up the.......... links though In mailbox if you are sending a mail you must put <font color=pink>Mister Reciever</font> or else it doesn't work. It's better to do this sort of thing in header.php, something like $username=$ir['username'] then down where the name should be displayed, print "<font color='pink'>$username</font>"; This can be found on userlist and stafflist i think
-
Hi, just spent a little while yesterday making out this page. It's an airport (monorail) for MCCode V2. Although... it doesn't work lol If anyone can help me get it working, I'd greatly appreciate it and if you can fix it up so it works, you're more than welcome to edit and use it yourself! Here it is <?php include "globals.php"; switch($_GET['city']) { case 'portadown': portadown(); break; case 'london': london(); break; case 'washington': washington(); break; case 'paris': paris(); break; case 'berlin': berlin(); break; case 'vegas': vegas(); break; case 'kathmandu': kathmandu(); break; } print " <table class='table' width='65%' cellpadding='2'> <tr> <th>City</th><th>Level</th><th>Cost</th><th>Travel</th> </tr> <tr> <td>Portadown</td><td>1</td><td>/$1,000</td><td>[url='airport.php?city=portadown']Go[/url]</td> </tr> <tr> <td>London</td><td>5</td><td>/$3,000</td><td>[url='airport.php?city=london']Go[/url]</td> </tr> <tr> <td>Washington</td><td>10</td><td>/$5,000</td><td>[url='airport.php?city=washington']Go[/url]</td> </tr> <tr> <td>Paris</td><td>20</td><td>/$7,500</td><td>[url='airport.php?city=paris']Go[/url]</td> </tr> <tr> <td>Berlin</td><td>30</td><td>/$10,000</td><td>[url='airport.php?city=berlin']Go[/url]</td> </tr> <tr> <td>Las Vegas</td><td>40</td><td>/$12,500</td><td>[url='airport.php?city=vegas']Go[/url]</td> </tr> <tr> <td>Kathmandu</td><td>50</td><td>/$15,000</td><td>[url='airport.php?city=vegas']Go[/url]</td> </tr> "; function portadown() { if ($ir['level'] > 0 and $ir['money'] >999) { $db->query("UPDATE users SET money=money-1000,location=1 WHERE userid=$userid"); print "You paid /$1,000 to travel to Portadown"; } elseif ($ir['level'] < 1) { print "You are not high enoguh level to go here!"; } elseif ($ir['money'] < 1000) { print "You don't have enough money to cover the ticket"; } } function london() { if ($ir['level'] > 4 and $r['money'] >2999) { $db->query("UPDATE users SET money=money-3000,location=2 WHERE userid=$userid"); print "You paid /$3,000 to travel to London"; } elseif (($ir['level']) < 5) { print "You are not high enough level to go here!"; } elseif ($r['money'] < 3000) { print "You don't have enough money to cover the ticket"; } } function washington() { if ($ir['level'] > 9 and $ir['money'] >4999) { $db->query("UPDATE users SET money=money-5000,location=3 WHERE userid=$userid"); print "You paid /$5,000 to travel to Washington"; } elseif ($ir['level'] < 10) { print "You are not high enoguh level to go here!"; } elseif ($ir['money'] < 5000) { print "You don't have enough money to cover the ticket"; } } function paris() { if ($ir['level'] > 19 and $ir['money'] >7499) { $db->query("UPDATE users SET money=money-7500,location=4 WHERE userid=$userid"); print "You paid /$7,500 to travel to Paris"; } elseif ($ir['level'] < 20) { print "You are not high enoguh level to go here!"; } elseif ($ir['money'] < 7500) { print "You don't have enough money to cover the ticket"; } } function berlin() { if ($ir['level'] > 29 and $ir['money'] >9999) { $db->query("UPDATE users SET money=money-10000,location=5 WHERE userid=$userid"); print "You paid /$10,000 to travel to Berlin"; } elseif ($ir['level'] < 30) { print "You are not high enough level to go here!"; } elseif ($ir['money'] < 10000) { print "You don't have enough money to cover the ticket"; } } function vegas() { if ($ir['level'] > 39 and $ir['money'] >12499) { $db->query("UPDATE users SET money=money-12500,location=6 WHERE userid=$userid"); print "You paid /$12,500 to travel to Las Vegas"; } elseif ($ir['level'] < 40) { print "You are not high enough level to go here!"; } elseif ($ir['money'] < 12500) { print "You don't have enough money to cover the ticket"; } } function kathmandu() { if ($ir['level'] > 49 and $ir['money'] >14999) { $db->query("UPDATE users SET money=money-15000,location=7 WHERE userid=$userid"); print "You paid /$12,500 to travel to Kathmandu This is a very cold place!"; } elseif ($ir['level'] < 50) { print "You are not high enough level to go here!"; } elseif ($ir['money'] < 15000) { print "You don't have enough money to cover the ticket"; } } $h->endpage(); ?>