
Nicholas
Members-
Posts
467 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Nicholas
-
that wouldnt work, i tried it already. if i changed the 1 to 0, the shoutbox would show up and it be even worst lol.
-
hi when i attack on my game it shows the header information like energy, will, brave, name, money, so on.... does anyone know how to make it so it doesnt show that information when you attack?
-
hi sorry about all the questions, i would do it myself but well there isnt only tutorials on how to do this one lol and its abit confusing for me... im wondering how to make it so when players donate they get there items automaticly credited. <? 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; require 'global_func.php'; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // check the payment_status is Completed if($payment_status != "Completed") { fclose ($fp);die(""); } if($db->num_rows($db->query("SELECT * FROM dps_accepted WHERE dpTXN='{$txn_id}'")) > 0) { fclose ($fp);die(""); } // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email if($receiver_email != $set['paypal']) { fclose ($fp);die(""); } // check that payment_amount/payment_currency are correct if($payment_currency != "USD") { fclose ($fp);die(""); } // parse for pack $packr=explode('|',$item_name); if(str_replace("www.","",$packr[0]) != str_replace("www.","",$_SERVER['HTTP_HOST'])) { fclose($fp); die(""); } if($packr[1] != "DP") { fclose($fp);die(""); } $pack=$packr[2]; if( $pack != 1 and $pack != 2 and $pack != 3 and $pack != 4 and $pack != 5) { fclose($fp);die(""); } if(($pack == 1 || $pack == 2 || $pack == 3) && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 4 && $payment_amount != "5.00") { fclose ($fp);die(""); } if($pack == 5 && $payment_amount != "10.00") {fclose ($fp);die(""); } // grab IDs $buyer=$packr[3]; $for=$buyer; // all seems to be in order, credit it. if($pack==1) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+5000,u.crystals=u.crystals+50, us.IQ=us.IQ+50,u.donatordays=u.donatordays+30 WHERE u.userid={$for}"); $d=30; $t="standard"; } else if($pack==2) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.crystals=u.crystals+100,u.donatordays=u.donatordays+30 WHERE u.userid={$for}"); $d=30; $t="crystals"; } else if($pack==3) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.IQ=us.IQ+120,u.donatordays=u.donatordays+30 WHERE u.userid={$for}"); $d=30; $t="iq"; } else if($pack==4) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+15000,u.crystals=u.crystals+75, us.IQ=us.IQ+80,u.donatordays=u.donatordays+55 WHERE u.userid={$for}"); $d=55; $t="fivedollars"; } else if($pack==5) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+35000,u.crystals=u.crystals+160, us.IQ=us.IQ+180,u.donatordays=u.donatordays+115 WHERE u.userid={$for}"); $d=115; $t="tendollars"; } // process payment event_add($for, "Your \${$payment_amount} Pack {$pack} Donator Pack has been successfully credited to you.", $c); $db->query("INSERT INTO dps_accepted VALUES('', {$buyer}, {$for}, '$t', unix_timestamp(), '$txn_id')"); } else if (strcmp ($res, "INVALID") == 0) { } } fclose ($fp); } ?> thats the ipn_donator.php file that makes it automaticly credits the users the pack when they have brought it... but my donator system is abit different and the mccodes v2 verison... so im wondering can anyone help me convert that file into giving out these items? if its possible, it would be great help :) Donator Pack 1 = item ID 1 = costs £2.00 Donator Pack 2 = item ID 2 = costs £3.00 Donator Pack 3 = item ID 3 = costs £7.50 Donator Pack 4 = item ID 4 = costs £10.00 Donator Pack 5 = item ID 5 = costs £17.50 Donator Pack 6 = item ID 6 = costs £25.00 Donator Pack 7 = item ID 7 = costs £30.00 Donator Pack 8 = item ID 8 = costs £40.00 Donator Pack 9 = item ID 9 = costs £50.00 Donator Pack 10 = item ID 10 = costs £60.00 Donator Pack 11 = item ID 88 = costs £75.00 1000 Crystals = item ID 18 = costs £3.00 2000 Crystals = item ID 19 = costs £4.00 3000 Crystals = item ID 20 = costs £6.00 4000 Crystals = item ID 21 = costs £7.50 5000 Crystals= item ID 22 = costs £10.00 10000 Crystals = item ID 99 = costs £15.00 25000 Crystals = item ID 122 = costs £25.00 1 Honors = item ID 80 = costs £1.00 5 Honors = item ID 81 = costs £4.00 10 Honors = item ID 82 = costs £7.50 25 Honors = item ID 83 = costs £15.00 50 Honors = item ID 83 = costs £20.00 Game Money = 1,000,000 = costs £1.00 5 Full Restores = item ID 12 = costs £2.00 10 Full Restores = item ID 12 = costs £3.50 25 Full Restores = item ID 12 = costs £5.00 5 Will Potions = item ID 13 = costs £1.50 10 Will Potions = item ID 13 = costs £2.50 25 Will Potions = item ID 13 = costs £4.50 1 Stat Pill = item ID 11 = costs £1.50 3 Stat Pill = item ID 11 = costs £4.00 5 Stat Pill = item ID 11 = costs £6.00 10 Stat Pill = item ID 11= costs £10.00
-
it worked like a charm mate CHEERS! you was a great help :)
-
umm... where abouts do you add these on header and voting pages?
-
hi does anyone know how to make it so you cant play the game until you voted. for example, you cant get on index, inventory, explore, jail, hospital, nothing... but voting page until you have voted for all voting sites? just wondering if you was possible since ive had quite few players just register play for like 5 minutes max and just go and never come back... reason why im asking is so, when new players come to the game and go i dont like this game after searching the game little bit, they have still voted and boosted my ranking up on the voting site board, if u know what i mean lol. hopefully someone can help me out :)
-
not sure if there is any errors, ive not tested it... but here try this one... back the other inventory up first lol. also you do want all the text #706e57 right? <?php include "globals.php"; $q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})"); print "<h3> <font color=white>Equipped Items</h3><hr />"; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width=100% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th> <font color=#706e57>Primary Weapon</th> <td> <font color=#706e57>"; if($equip[$ir['equip_primary']]['itmid']) { print $equip[$ir['equip_primary']]['itmname']."</td><td>[url='unequip.php?type=equip_primary'] <font color=#706e57>Unequip Item[/url]</td>"; } else { print " <font color='#706e57'>None equipped.</td><td> </td>"; } print "</tr> <tr> <th> <font color=#706e57>Secondary Weapon</th> <td> <font color=#706e57>"; if($equip[$ir['equip_secondary']]['itmid']) { print $equip[$ir['equip_secondary']]['itmname']."</td><td>[url='unequip.php?type=equip_secondary'] <font color=#706e57>Unequip Item[/url]</td>"; } else { print " <font color='#706e57'>None equipped.</td><td> </td>"; } print "</tr> <tr> <th> <font color=#706e57>Armor</th> <td> <font color=#706e57>"; if($equip[$ir['equip_armor']]['itmid']) { print $equip[$ir['equip_armor']]['itmname']."</td><td>[url='unequip.php?type=equip_armor'] <font color=#706e57>Unequip Item[/url]</td>"; } else { print " <font color=#706e57>None equipped.</td><td> </td>"; } print "</tr> </table><hr /> <h3> <font color=white>Inventory</h3><hr />"; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "[b] <font color=white>You have no items![/b]"; } else { print "[b] <font color=white>Your items are listed below.[/b] <table width=100% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <td class=\"h\"><font color=#706e57>Item</td> <td class=\"h\"><font color=#706e57>Sell Value</td> <td class=\"h\"><font color=#706e57>Total Sell Value</td> <td class=\"h\"><font color=#706e57>Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]<font color=white>{$lt}[/b]</td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td><font color=#706e57>\${$i['itmsellprice']}</td><td>"; print "<font color=#706e57>$".($i['itmsellprice']*$i['inv_qty']); print "</td><td> [[url='iteminfo.php?ID={$i[']<font color=#706e57>Info[/url]] [[url='itemsend.php?ID={$i[']<font color=#706e57>Send[/url]] [[url='itemsell.php?ID={$i[']<font color=#706e57>Sell[/url]] [[url='imadd.php?ID={$i[']<font color=#706e57>Add To Market[/url]]"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']<font color=#706e57>Use[/url]]"; } { print " [[url='dpuse.php?ID={$i[']<font color=#706e57>Open Donator Pack[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']<font color=#706e57>Equip as Weapon[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']<font color=#706e57>Equip as Armor[/url]]"; } print "</td></tr>"; } print "</table>"; print "[size="1"][b]<font color=#706e57>NB:[/b] Items with a small red [/size]<font color='red'>*</font>[size="1"] next to their name can be used as weapons in combat. Items with a small green [/size]<font color='green'>*</font>[size="1"] next to their name can be used as armor in combat.[/size]"; } $h->endpage(); ?>
-
RE: Nicholas add under $IP = $_SERVER['REMOTE_ADDR']; $IP = mysql_real_escape_string($IP);
-
Fix my script? Can YOU Find an error in this code?
Nicholas replied to Joshua's topic in Game Support
try this one m8. <?php $macropage="gym.php"; require "globals.php"; if($ir['hospital']) { die("<prb>This page cannot be accessed while in hospital.</prb>"); } $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour'); $_POST['amnt']=abs((int) $_POST['amnt']); if(!$ir['jail']) { print "<h1>Gym</font></h1><hr width='100%' align='left' />"; } else { print "<h1>Jail Gym</font></h1><hr width='100%' align='left' />"; } if($_POST['stat'] && $_POST['amnt']) { $stat=$statnames[$_POST['stat']]; if(!$stat) { die("<prb>This stat cannot be trained.</prb>"); } if($_POST['amnt'] > $ir['energy']) { print("<prb>You do not have enough energy to train that much.</font></prb><hr width='100%' align='left' />"); } else { $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/150); $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } } if($ir['jail']) { $gain/=2; } $db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid"); $db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid"); $inc=$ir[$stat]+$gain; $inc2=$ir['energy']-$_POST['amnt']; if($stat=="strength") { print "You start to lift some weights, You go heavier and heavier until You are out of energy. You have gained {$gain} strength by doing {$_POST['amnt']} sets of weights. You now have {$inc} strength and {$inc2} energy left.</font>"; } elseif($stat=="agility") { print "You Begin to run on the treadmill, You keep tapping the faster button till you fly off the damn thing!. You have gained {$gain} agility by doing {$_POST['amnt']} minutes of running. You now have {$inc} agility and {$inc2} energy left."; } elseif($stat=="guard") { print "You jump into the pool and begin swimming, you keep flapping your arms in the water like Michael Felps, you get a cramp and almost drown. You have gained {$gain} guard by doing {$_POST['amnt']} minutes of swimming. You now have {$inc} guard and {$inc2} energy left."; } elseif($stat=="labour") { print "You walk over to the front desk, and ask the manager If you can volunteer to help the gym out, He says unload the boxes In the back, You unload boxes until the gym closes You have gained {$gain} labour by unloading {$_POST['amnt']} boxes. You now have {$inc} labour and {$inc2} energy left."; } print "<hr />"; $ir['energy']-=$_POST['amnt']; $ir[$stat]+=$gain; } } $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); print "<table width='100%'><tr><td> You can train up to <prb>{$ir['energy']}</prb> times with your current energy.</td></tr></table> <hr width='100%' align='left' /> <table width='100%' class='table'> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Strength'></input> <th width='15%'><ph2>Strength:</ph2></th> <td width='15%'>{$ir['strength']}</td> <td width='10%'>(Rank {$ir['strank']})</td> <td width='40%'>Times to train: <input type='text' name='amnt' value='{$ir['energy']}' length='5'></input></td> <td width='20%'><input type='submit' value='Train!'></input></td> </form> </tr> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Agility'></input> <th width='15%'><ph2>Agility:</ph2></th> <td width='15%'>{$ir['agility']}</td> <td width='10%'>(Rank {$ir['agirank']})</td> <td width='40%'>Times to train: <input type='text' name='amnt' value='{$ir['energy']}'></input></td> <td width='20%'><input type='submit' value='Train!'></input></td> </form> </tr> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Guard'></input> <th width='15%'><ph2>Guard:</ph2></th> <td width='15%'>{$ir['guard']}</td> <td width='10%'>(Rank {$ir['guarank']})</td> <td width='40%'>Times to train: <input type='text' name='amnt' value='{$ir['energy']}'></input></td> <td width='20%'><input type='submit' value='Train!'></input></td> </form> </tr> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Labour'></input> <th width='15%'><ph2>Labour:</ph2></th> <td width='15%'>{$ir['labour']}</td> <td width='10%'>(Rank {$ir['labrank']})</td> <td width='40%'>Times to train: <input type='text' name='amnt' value='{$ir['energy']}'></input></td> <td width='20%'><input type='submit' value='Train!'></input></td> </form> </tr> </table> <hr width='100%' align='left' /> "; $h->endpage(); ?> -
this file has a error and i cant figure it out? can someone help?
Nicholas replied to Nicholas's topic in Game Support
i didnt say i made this lol. did i? So whos is this, and do you have there permission to post it? [warnbox]The member asked help on a problem , final verbal warning Danny be respectfull and helpfull towards members[/warnbox] its not the full mod, there is like 3-5 files connected to this mod. this was the only file that had a error on it. -
this file has a error and i cant figure it out? can someone help?
Nicholas replied to Nicholas's topic in Game Support
that was the reason lol thx include_once "globals.php"; dont get error on nither that files now, so hopefully it will work now. :) -
this file has a error and i cant figure it out? can someone help?
Nicholas replied to Nicholas's topic in Game Support
i didnt say i made this lol. did i? -
in cmarket.php put this under include "globals.php"; $_GET['ID'] = abs(@intval($_GET['ID'])); find this in header.php, login.php, register.php, authenticate.php, then finally in global_func.php find function stafflog_add. $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; and change it to this $IP = $_SERVER['REMOTE_ADDR']; $IP = mysql_real_escape_string($IP); not 100% sure this is right but i think this is will secure the forums. find this in forums.php which is usually found near You have been forum banned for {$ir['forumban']} days. $_GET['viewforum']=(int) $_GET['viewforum']; if($_GET['viewtopic'] and $_GET['act'] != 'quote') { $_GET['act']='viewtopic'; } if($_GET['viewforum']) { $_GET['act']='viewforum'; } if($_GET['reply']) { $_GET['act']='reply'; } if($_GET['empty']==1 && $_GET['code']=='kill' && $_SESSION['owner']) { replace it with this $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $_GET['reply'] = abs(@intval($_GET['reply'])); $_GET['quote'] = abs(@intval($_GET['quote'])); $_GET['empty'] = abs(@intval($_GET['empty'])); $_GET['topic'] = abs(@intval($_GET['topic'])); $_GET['post'] = abs(@intval($_GET['post'])); $_GET['act'] = isset($_GET['act']) && is_string($_GET['act']) ? strtolower(trim($_GET['act'])) : false; if($_GET['viewtopic'] and $_GET['act'] != 'quote') { $_GET['act']='viewtopic'; } if($_GET['viewforum']) { $_GET['act']='viewforum'; } if($_GET['reply']) { $_GET['act']='reply'; } if($_GET['empty']==1 && $_GET['code']=='kill' && $_SESSION['owner']) {
-
this file has a error and i cant figure it out? can someone help?
Nicholas replied to Nicholas's topic in Game Support
if i remove the include "globals.php"; on the file above that im having problems with i wont get the fatel error on the mod, but then i get the error on the mod up top again, any ideas why? -
this file has a error and i cant figure it out? can someone help?
Nicholas replied to Nicholas's topic in Game Support
lol damn now i get this error when i try and start the battle lol. Fatal error: Cannot redeclare money_formatter() (previously declared in /_____/_____/_____/global_func.php:2) in /_____/_____/_____/global_func.php on line 5 this mod is getting on my nerves now lol. google doesnt help much when trying to find out how to fix these fatal errors lol. if i edit money_formatter() in global_func.php, it wont how how much cash you got in menu part on left lol. so i have no idea what to do... -
this file has a error and i cant figure it out? can someone help?
Nicholas replied to Nicholas's topic in Game Support
damn thats right the stupid include "globals.php"; or require_once "globals.php"; i forgot to add that lol, i dont get the error anymore on the page, so hopefully this mod will work now :) thx The_Past, easy thing to forget i guess tho lol. -
Hi, can someone help me please? im getting this fatal error on line 2, i cant figure the error out, can anyone help me please? Fatal error: Call to a member function query() on a non-object in ---------- on line 2 <?php $bat1=sprintf("SELECT ready FROM battlearena WHERE batid=%u", 1); $bat1=$db->query($bat1); $ba1=$db->fetch_row($bat1); $bat2=sprintf("SELECT ready FROM battlearena WHERE batid=%u", 2); $bat2=$db->query($bat2); $ba2=$db->fetch_row($bat2); $bat3=sprintf("SELECT ready FROM battlearena WHERE batid=%u", 3); $bat3=$db->query($bat3); $ba3=$db->fetch_row($bat3); $bat4=sprintf("SELECT ready FROM battlearena WHERE batid=%u", 4); $bat4=$db->query($bat4); $ba4=$db->fetch_row($bat4); $bat5=sprintf("SELECT ready FROM battlearena WHERE batid=%u", 5); $bat5=$db->query($bat5); $ba5=$db->fetch_row($bat5); if($ba1['ready']==1) {$mop=1;} elseif($ba2['ready']==1) {$mop=2;} elseif($ba3['ready']==1) {$mop=3;} elseif($ba4['ready']==1) {$mop=4;} elseif($ba5['ready']==1) {$mop=5;} else{$mop=0;} if($mop==0){die("<font color=white>Battle Arena is not ready yet");} $it=sprintf("SELECT * FROM battlearena WHERE batid=%u", $mop); $it=$db->query($it); $bat=$db->fetch_row($it); $qa=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p1']); $qa=$db->query($qa); $a=$db->fetch_row($qa); $qb=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p2']); $qb=$db->query($qb); $b=$db->fetch_row($qb); $qc=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p3']); $qc=$db->query($qc); $c=$db->fetch_row($qc); $qd=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p4']); $qd=$db->query($qd); $d=$db->fetch_row($qd); $qe=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p5']); $qe=$db->query($qe); $e=$db->fetch_row($qe); $qf=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p6']); $qf=$db->query($qf); $f=$db->fetch_row($qf); $qg=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p7']); $qg=$db->query($qg); $g=$db->fetch_row($qg); $qh=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p8']); $qh=$db->query($qh); $h=$db->fetch_row($qh); $qi=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p9']); $qi=$db->query($qi); $i=$db->fetch_row($qi); $qj=sprintf("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=%u", $bat['p10']); $qj=$db->query($qj); $j=$db->fetch_row($qj); $wa=sprintf("SELECT * FROM items WHERE itmid=%u", $a['equip_primary']); $wa=$db->query($wa); $aa=$db->fetch_row($wa); $wb=sprintf("SELECT * FROM items WHERE itmid=%u", $b['equip_primary']); $wb=$db->query($wb); $bb=$db->fetch_row($wb); $wc=sprintf("SELECT * FROM items WHERE itmid=%u", $c['equip_primary']); $wc=$db->query($wc); $cc=$db->fetch_row($wc); $wd=sprintf("SELECT * FROM items WHERE itmid=%u", $d['equip_primary']); $wd=$db->query($wd); $dd=$db->fetch_row($wd); $we=sprintf("SELECT * FROM items WHERE itmid=%u", $e['equip_primary']); $we=$db->query($we); $ee=$db->fetch_row($we); $wf=sprintf("SELECT * FROM items WHERE itmid=%u", $f['equip_primary']); $wf=$db->query($wf); $ff=$db->fetch_row($wf); $wg=sprintf("SELECT * FROM items WHERE itmid=%u", $g['equip_primary']); $wg=$db->query($wg); $gg=$db->fetch_row($wg); $wh=sprintf("SELECT * FROM items WHERE itmid=%u", $h['equip_primary']); $wh=$db->query($wh); $hh=$db->fetch_row($wh); $wi=sprintf("SELECT * FROM items WHERE itmid=%u", $i['equip_primary']); $wi=$db->query($wi); $ii=$db->fetch_row($wi); $wj=sprintf("SELECT * FROM items WHERE itmid=%u", $j['equip_primary']); $wj=$db->query($wj); $jj=$db->fetch_row($wj); $pa=sprintf("SELECT * FROM items WHERE itmid=%u", $a['equip_armor']); $pa=$db->query($pa); $aaa=$db->fetch_row($pa); $pb=sprintf("SELECT * FROM items WHERE itmid=%u", $b['equip_armor']); $pb=$db->query($pb); $bbb=$db->fetch_row($pb); $pc=sprintf("SELECT * FROM items WHERE itmid=%u", $c['equip_armor']); $pc=$db->query($pc); $ccc=$db->fetch_row($pc); $pd=sprintf("SELECT * FROM items WHERE itmid=%u", $d['equip_armor']); $pd=$db->query($pd); $ddd=$db->fetch_row($pd); $pe=sprintf("SELECT * FROM items WHERE itmid=%u", $e['equip_armor']); $pe=$db->query($pe); $eee=$db->fetch_row($pe); $pf=sprintf("SELECT * FROM items WHERE itmid=%u", $f['equip_armor']); $pf=$db->query($pf); $fff=$db->fetch_row($pf); $pg=sprintf("SELECT * FROM items WHERE itmid=%u", $g['equip_armor']); $pg=$db->query($pg); $ggg=$db->fetch_row($pg); $ph=sprintf("SELECT * FROM items WHERE itmid=%u", $h['equip_armor']); $ph=$db->query($ph); $hhh=$db->fetch_row($ph); $pi=sprintf("SELECT * FROM items WHERE itmid=%u", $i['equip_armor']); $pi=$db->query($pi); $iii=$db->fetch_row($pi); $pj=sprintf("SELECT * FROM items WHERE itmid=%u", $j['equip_armor']); $pj=$db->query($pj); $jjj=$db->fetch_row($pj); if($a['hp']>0){$k=array(b, c, d, e, f, g, h, i, j);} if($b['hp']>0){$l=array(a, c, d, e, f, g, h, i, j);} if($c['hp']>0){$m=array(a, b, d, e, f, g, h, i, j);} if($d['hp']>0){$n=array(a, b, c, e, f, g, h, i, j);} if($e['hp']>0){$o=array(a, b, c, d, f, g, h, i, j);} if($f['hp']>0){$p=array(a, b, c, d, e, g, h, i, j);} if($g['hp']>0){$q=array(a, b, c, d, e, f, h, i, j);} if($h['hp']>0){$r=array(a, b, c, d, e, f, g, i, j);} if($i['hp']>0){$s=array(a, b, c, d, e, f, g, h, j);} if($j['hp']>0){$t=array(a, b, c, d, e, f, g, h, i);} if($a['hp']<1){unset($l[0], $m[0], $n[0], $o[0], $p[0], $q[0], $r[0], $s[0], $t[0]);} if($b['hp']<1){unset($k[0], $m[1], $n[1], $o[1], $p[1], $q[1], $r[1], $s[1], $t[1]);} if($c['hp']<1){unset($k[1], $l[1], $n[2], $o[2], $p[2], $q[2], $r[2], $s[2], $t[2]);} if($d['hp']<1){unset($k[2], $l[2], $m[2], $o[3], $p[3], $q[3], $r[3], $s[3], $t[3]);} if($e['hp']<1){unset($k[3], $l[3], $m[3], $n[3], $p[4], $q[4], $r[4], $s[4], $t[4]);} if($f['hp']<1){unset($k[4], $l[4], $m[4], $n[4], $o[4], $q[5], $r[5], $s[5], $t[5]);} if($g['hp']<1){unset($k[5], $l[5], $m[5], $n[5], $o[5], $p[5], $r[6], $s[6], $t[6]);} if($h['hp']<1){unset($k[6], $l[6], $m[6], $n[6], $o[6], $p[6], $q[6], $s[7], $t[7]);} if($i['hp']<1){unset($k[7], $l[7], $m[7], $n[7], $o[7], $p[7], $q[7], $r[7], $t[8]);} if($j['hp']<1){unset($k[8], $l[8], $m[8], $n[8], $o[8], $p[8], $q[8], $r[8], $s[8]);} if($a['hp']>0){$randaa=array_rand($k); $randa=$k[$randaa];} if($b['hp']>0){$randbb=array_rand($l); $randb=$l[$randbb];} if($c['hp']>0){$randcc=array_rand($m); $randc=$m[$randcc];} if($d['hp']>0){$randdd=array_rand($n); $randd=$n[$randdd];} if($e['hp']>0){$randee=array_rand($o); $rande=$o[$randee];} if($f['hp']>0){$randff=array_rand($p); $randf=$p[$randff];} if($g['hp']>0){$randgg=array_rand($q); $randg=$q[$randgg];} if($h['hp']>0){$randhh=array_rand($r); $randh=$r[$randhh];} if($i['hp']>0){$randii=array_rand($s); $randi=$s[$randii];} if($j['hp']>0){$randjj=array_rand($t); $randj=$t[$randjj];} if($a['hp']>0) {$aattack=(int) ($aa['weapon']*$a['strength']/(${$randa}['guard']*1.5)*(rand(8000,12000)/10000)-${$randa}{$randa}{$randa}['armor']);$aluck=rand(60,100); if($aattack<${$randa}['maxhp']/6){$aattack=rand(${$randa}['maxhp']/6, ${$randa}['maxhp']/2)-${$randa}{$randa}{$randa}['armor'];}} if($b['hp']>0) {$battack=(int) ($bb['weapon']*$b['strength']/(${$randb}['guard']*1.5)*(rand(8000,12000)/10000)-${$randb}{$randb}{$randb}['armor']);$bluck=rand(60,100); if($battack<${$randb}['maxhp']/6){$battack=rand(${$randb}['maxhp']/6, ${$randb}['maxhp']/2)-${$randb}{$randb}{$randb}['armor'];}} if($c['hp']>0) {$cattack=(int) ($cc['weapon']*$c['strength']/(${$randc}['guard']*1.5)*(rand(8000,12000)/10000)-${$randc}{$randc}{$randc}['armor']);$cluck=rand(60,100); if($cattack<${$randc}['maxhp']/6){$cattack=rand(${$randc}['maxhp']/6, ${$randc}['maxhp']/2)-${$randc}{$randc}{$randc}['armor'];}} if($d['hp']>0) {$dattack=(int) ($dd['weapon']*$d['strength']/(${$randd}['guard']*1.5)*(rand(8000,12000)/10000)-${$randd}{$randd}{$randd}['armor']);$dluck=rand(60,100); if($dattack<${$randd}['maxhp']/6){$dattack=rand(${$randd}['maxhp']/6, ${$randd}['maxhp']/2)-${$randd}{$randd}{$randd}['armor'];}} if($e['hp']>0) {$eattack=(int) ($ee['weapon']*$e['strength']/(${$rande}['guard']*1.5)*(rand(8000,12000)/10000)-${$rande}{$rande}{$rande}['armor']);$eluck=rand(60,100); if($eattack<${$rande}['maxhp']/6){$eattack=rand(${$rande}['maxhp']/6, ${$rande}['maxhp']/2)-${$rande}{$rande}{$rande}['armor'];}} if($f['hp']>0) {$fattack=(int) ($ff['weapon']*$f['strength']/(${$randf}['guard']*1.5)*(rand(8000,12000)/10000)-${$randf}{$randf}{$randf}['armor']);$fluck=rand(60,100); if($fattack<${$randf}['maxhp']/6){$fattack=rand(${$randf}['maxhp']/6, ${$randf}['maxhp']/2)-${$randf}{$randf}{$randf}['armor'];}} if($g['hp']>0) {$gattack=(int) ($gg['weapon']*$g['strength']/(${$randg}['guard']*1.5)*(rand(8000,12000)/10000)-${$randg}{$randg}{$randg}['armor']);$gluck=rand(60,100); if($gattack<${$randg}['maxhp']/6){$gattack=rand(${$randg}['maxhp']/6, ${$randg}['maxhp']/2)-${$randg}{$randg}{$randg}['armor'];}} if($h['hp']>0) {$hattack=(int) ($hh['weapon']*$h['strength']/(${$randh}['guard']*1.5)*(rand(8000,12000)/10000)-${$randh}{$randh}{$randh}['armor']);$hluck=rand(60,100); if($hattack<${$randh}['maxhp']/6){$hattack=rand(${$randh}['maxhp']/6, ${$randh}['maxhp']/2)-${$randh}{$randh}{$randh}['armor'];}} if($i['hp']>0) {$iattack=(int) ($ii['weapon']*$i['strength']/(${$randi}['guard']*1.5)*(rand(8000,12000)/10000)-${$randi}{$randi}{$randi}['armor']);$iluck=rand(60,100); if($iattack<${$randi}['maxhp']/6){$iattack=rand(${$randi}['maxhp']/6, ${$randi}['maxhp']/2)-${$randi}{$randi}{$randi}['armor'];}} if($j['hp']>0) {$jattack=(int) ($jj['weapon']*$j['strength']/(${$randj}['guard']*1.5)*(rand(8000,12000)/10000)-${$randj}{$randj}{$randj}['armor']);$jluck=rand(60,100); if($jattack<${$randj}['maxhp']/6){$jattack=rand(${$randj}['maxhp']/6, ${$randj}['maxhp']/2)-${$randj}{$randj}{$randj}['armor'];}} if($aattack>${$randa}['maxhp']) {$aattack=rand(${$randa}['maxhp']/4, ${$randa}['maxhp']);} if($battack>${$randb}['maxhp']) {$battack=rand(${$randb}['maxhp']/4, ${$randb}['maxhp']);} if($cattack>${$randc}['maxhp']) {$cattack=rand(${$randc}['maxhp']/4, ${$randc}['maxhp']);} if($dattack>${$randd}['maxhp']) {$dattack=rand(${$randd}['maxhp']/4, ${$randd}['maxhp']);} if($eattack>${$rande}['maxhp']) {$eattack=rand(${$rande}['maxhp']/4, ${$rande}['maxhp']);} if($fattack>${$randf}['maxhp']) {$fattack=rand(${$randf}['maxhp']/4, ${$randf}['maxhp']);} if($gattack>${$randg}['maxhp']) {$gattack=rand(${$randg}['maxhp']/4, ${$randg}['maxhp']);} if($hattack>${$randh}['maxhp']) {$hattack=rand(${$randh}['maxhp']/4, ${$randh}['maxhp']);} if($iattack>${$randi}['maxhp']) {$iattack=rand(${$randi}['maxhp']/4, ${$randi}['maxhp']);} if($jattack>${$randj}['maxhp']) {$jattack=rand(${$randj}['maxhp']/4, ${$randj}['maxhp']);} $rawa=rand(1,100); $rawb=rand(1,100); $rawc=rand(1,100); $rawd=rand(1,100); $rawe=rand(1,100); $rawf=rand(1,100); $rawg=rand(1,100); $rawh=rand(1,100); $rawi=rand(1,100); $rawj=rand(1,100); if($_session['plz']==10) {$z="";} if($a['hp']>1) { if(${$randa}['hp']<1){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($aluck>$rawa) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $aattack, ${$randa}['userid']); $db->query($qry); ${$randa}['hp']=${$randa}['hp']-$aattack; if(${$randa}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randa}['username'];} if($_session['plz']==2) {$lw3=${$randa}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$a['username']} hit {${$randa}['username']} with his {$aa['itmname']} doing {$aattack} damage ({${$randa}['hp']})</font> ";} else{$z.="{$ns}. {$a['username']} tried to hit {${$randa}['username']} but missed ({${$randa}['hp']})</font> ";}} } if($b['hp']>1) { if(${$randb}['hp']<1){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($bluck>$rawb) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $battack, ${$randb}['userid']); $db->query($qry); ${$randb}['hp']=${$randb}['hp']-$battack; if(${$randb}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randb}['username'];} if($_session['plz']==2) {$lw3=${$randb}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$b['username']} hit {${$randb}['username']} with his {$bb['itmname']} doing {$battack} damage ({${$randb}['hp']})</font> ";} else{$z.="{$ns}. {$b['username']} tried to hit {${$randb}['username']} but missed ({${$randb}['hp']})</font> ";}} } if($c['hp']>1) { if(${$randc}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($cluck>$rawc) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $cattack, ${$randc}['userid']); $db->query($qry); ${$randc}['hp']=${$randc}['hp']-$cattack; if(${$randc}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randc}['username'];} if($_session['plz']==2) {$lw3=${$randc}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$c['username']} hit {${$randc}['username']} with his {$cc['itmname']} doing {$cattack} damage ({${$randc}['hp']})</font> ";} else{$z.="{$ns}. {$c['username']} tried to hit {${$randc}['username']} but missed ({${$randc}['hp']})</font> ";}} } if($d['hp']>1) { if(${$randd}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($dluck>$rawd) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $dattack, ${$randd}['userid']); $db->query($qry); ${$randd}['hp']=${$randd}['hp']-$dattack; if(${$randd}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randd}['username'];} if($_session['plz']==2) {$lw3=${$randd}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$d['username']} hit {${$randd}['username']} with his {$dd['itmname']} doing {$dattack} damage ({${$randd}['hp']})</font> ";} else{$z.="{$ns}. {$d['username']} tried to hit {${$randd}['username']} but missed ({${$randd}['hp']})</font> ";}} } if($e['hp']>1) { if(${$rande}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($eluck>$rawe) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $eattack, ${$rande}['userid']); $db->query($qry); ${$rande}['hp']=${$rande}['hp']-$eattack; if(${$rande}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$rande}['username'];} if($_session['plz']==2) {$lw3=${$rande}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$e['username']} hit {${$rande}['username']} with his {$ee['itmname']} doing {$eattack} damage ({${$rande}['hp']})</font> ";} else{$z.="{$ns}. {$e['username']} tried to hit {${$rande}['username']} but missed ({${$rande}['hp']})</font> ";}} } if($f['hp']>1) { if(${$randf}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($fluck>$rawf) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $fattack, ${$randf}['userid']); $db->query($qry); ${$randf}['hp']=${$randf}['hp']-$fattack; if(${$randf}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randf}['username'];} if($_session['plz']==2) {$lw3=${$randf}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$f['username']} hit {${$randf}['username']} with his {$ff['itmname']} doing {$fattack} damage ({${$randf}['hp']})</font> ";} else{$z.="{$ns}. {$f['username']} tried to hit {${$randf}['username']} but missed ({${$randf}['hp']})</font> ";}} } if($g['hp']>1) { if(${$randg}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($gluck>$rawg) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $gattack, ${$randg}['userid']); $db->query($qry); ${$randg}['hp']=${$randg}['hp']-$gattack; if(${$randg}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randg}['username'];} if($_session['plz']==2) {$lw3=${$randg}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$g['username']} hit {${$randg}['username']} with his {$gg['itmname']} doing {$gattack} damage ({${$randg}['hp']})</font> ";} else{$z.="{$ns}. {$g['username']} tried to hit {${$randg}['username']} but missed ({${$randg}['hp']})</font> ";}} } if($h['hp']>1) { if(${$randh}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($hluck>$rawh) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $hattack, ${$randh}['userid']); $db->query($qry); ${$randh}['hp']=${$randh}['hp']-$hattack; if(${$randh}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randh}['username'];} if($_session['plz']==2) {$lw3=${$randh}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$h['username']} hit {${$randh}['username']} with his {$hh['itmname']} doing {$hattack} damage ({${$randh}['hp']})</font> ";} else{$z.="{$ns}. {$h['username']} tried to hit {${$randh}['username']} but missed ({${$randh}['hp']})</font> ";}} } if($i['hp']>1) { if(${$randi}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($iluck>$rawi) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $iattack, ${$randi}['userid']); $db->query($qry); ${$randi}['hp']=${$randi}['hp']-$iattack; if(${$randi}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randi}['username'];} if($_session['plz']==2) {$lw3=${$randi}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$i['username']} hit {${$randi}['username']} with his {$ii['itmname']} doing {$iattack} damage ({${$randi}['hp']})</font> ";} else{$z.="{$ns}. {$i['username']} tried to hit {${$randi}['username']} but missed ({${$randi}['hp']})</font> ";}} } if($j['hp']>1) { if(${$randj}['hp']<0){}else{ $_session['nsp']=$_session['nsp']+='1';$ns=$_session['nsp']; if($jluck>$rawj) { $qry=sprintf("UPDATE users SET hp=hp-%d WHERE userid=%d", $jattack, ${$randj}['userid']); $db->query($qry); ${$randj}['hp']=${$randj}['hp']-$jattack; if(${$randj}['hp']<1) {$_session['plz']=$_session['plz']-='1'; $dl="<font color=red>";}else{$dl="";} if($_session['plz']==0) {$lw2=${$randj}['username'];} if($_session['plz']==2) {$lw3=${$randj}['username']; $_session['plz']='1';} $z.="{$ns}.{$dl} {$j['username']} hit {${$randj}['username']} with his {$jj['itmname']} doing {$jattack} damage ({${$randj}['hp']})</font> ";} else{$z.="{$ns}. {$j['username']} tried to hit {${$randj}['username']} but missed ({${$randj}['hp']})</font> ";}} } if($a['hp']>1 && $b['hp']<1 && $c['hp']<1 && $d['hp']<1 && $e['hp']<1 && $f['hp']<1 && $g['hp']<1 && $h['hp']<1 && $i['hp']<1 && $j['hp']<1) {$lw=$a['username'];$over=1;} elseif($a['hp']<1 && $b['hp']>1 && $c['hp']<1 && $d['hp']<1 && $e['hp']<1 && $f['hp']<1 && $g['hp']<1 && $h['hp']<1 && $i['hp']<1 && $j['hp']<1) {$lw=$b['username'];$over=2;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']>1 && $d['hp']<1 && $e['hp']<1 && $f['hp']<1 && $g['hp']<1 && $h['hp']<1 && $i['hp']<1 && $j['hp']<1) {$lw=$c['username'];$over=3;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']<1 && $d['hp']>1 && $e['hp']<1 && $f['hp']<1 && $g['hp']<1 && $h['hp']<1 && $i['hp']<1 && $j['hp']<1) {$lw=$d['username'];$over=4;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']<1 && $d['hp']<1 && $e['hp']>1 && $f['hp']<1 && $g['hp']<1 && $h['hp']<1 && $i['hp']<1 && $j['hp']<1) {$lw=$e['username'];$over=5;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']<1 && $d['hp']<1 && $e['hp']<1 && $f['hp']>1 && $g['hp']<1 && $h['hp']<1 && $i['hp']<1 && $j['hp']<1) {$lw=$f['username'];$over=6;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']<1 && $d['hp']<1 && $e['hp']<1 && $f['hp']<1 && $g['hp']>1 && $h['hp']<1 && $i['hp']<1 && $j['hp']<1) {$lw=$g['username'];$over=7;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']<1 && $d['hp']<1 && $e['hp']<1 && $f['hp']<1 && $g['hp']<1 && $h['hp']>1 && $i['hp']<1 && $j['hp']<1) {$lw=$h['username'];$over=8;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']<1 && $d['hp']<1 && $e['hp']<1 && $f['hp']<1 && $g['hp']<1 && $h['hp']<1 && $i['hp']>1 && $j['hp']<1) {$lw=$i['username'];$over=9;} elseif($a['hp']<1 && $b['hp']<1 && $c['hp']<1 && $d['hp']<1 && $e['hp']<1 && $f['hp']<1 && $g['hp']<1 && $h['hp']<1 && $i['hp']<1 && $j['hp']>1) {$lw=$j['username'];$over=10;} if($over>0) { $htt=sprintf("SELECT userid, hp FROM users WHERE userid=%d OR userid=%d OR userid=%d OR userid=%d OR userid=%d OR userid=%d OR userid=%d OR userid=%d OR userid=%d OR userid=%d", $bat['p1'], $bat['p2'], $bat['p3'], $bat['p4'], $bat['p5'], $bat['p6'], $bat['p7'], $bat['p8'], $bat['p9'], $bat['p10']); $htt=$db->query($htt); $qry=sprintf("UPDATE users SET ghonor=ghonor+%d WHERE username='%s'", 3, $lw); $db->query($qry); $qry=sprintf("UPDATE users SET ghonor=ghonor+%d WHERE username='%s'", 2, $lw2); $db->query($qry); $qry=sprintf("UPDATE users SET ghonor=ghonor+%d WHERE username='%s'", 1, $lw3); $db->query($qry); $lwi=sprintf("SELECT userid FROM users WHERE username='%s'", $lw); $lwi=$db->query($lwi); $lwid=$db->fetch_row($lwi); $az=sprintf("SELECT userid FROM users WHERE bet='%d'", $lwid['userid']); $az=$db->query($az); $bz=$db->num_rows($az); if($bz>0) {$hw=(int)($bat['p1b']+$bat['p2b']+$bat['p3b']+$bat['p4b']+$bat['p5b']+$bat['p6b']+$bat['p7b']+$bat['p8b']+$bat['p9b']+$bat['p10b']); $fw=(int)(($bat['p1b']+$bat['p2b']+$bat['p3b']+$bat['p4b']+$bat['p5b']+$bat['p6b']+$bat['p7b']+$bat['p8b']+$bat['p9b']+$bat['p10b'])/$bz); $qry=sprintf("UPDATE users SET crystals=crystals+%d WHERE bet='%d'", $fw, $lwid['userid']); $db->query($qry);} $qry=sprintf("UPDATE users SET bet=0 WHERE bet=%d OR bet=%d OR bet=%d OR bet=%d OR bet=%d OR bet=%d OR bet=%d OR bet=%d OR bet=%d OR bet=%d", $bat['p1'], $bat['p2'], $bat['p3'], $bat['p4'], $bat['p5'], $bat['p6'], $bat['p7'], $bat['p8'], $bat['p9'], $bat['p10']); $db->query($qry); while($se=$db->fetch_row($az)){event_add($se['userid'], "You have recieved {$fw} knifes for winning the bet in the battlearena.",$c);} while($ht=$db->fetch_row($htt)){if($ht['hp']<1) {$qry=sprintf("UPDATE users SET hospital=60, hospreason='Beaten badly in the battlearena', hp=0 WHERE userid=%u", $ht['userid']); $db->query($qry);}} $qry=sprintf("UPDATE battlearena SET p1=0, p2=0, p3=0, p4=0, p5=0, p6=0, p7=0, p8=0, p9=0, p10=0, p1b=0, p2b=0, p3b=0, p4b=0, p5b=0, p6b=0, p7b=0, p8b=0, p9b=0, p10b=0, lastwinner='%s', lastwinner2='%s', lastwinner3='%s', log='%s', bets='%d', split='%d', ready=0 WHERE batid='%u'", $lw, $lw2, $lw3, $z, $hw, $bz, $mop); $db->query($qry); echo sprintf("<font color=white>The battle has started. Go [url='battlearena.php?action=watch&a=%d']Here[/url] to watch", $mop); die(""); } else { include "attack3.php"; } ?>
-
mccode-v2 Honor Awards - Modified by HarryB
Nicholas replied to HarryB's topic in Free Modifications
table? harry said it wasnt meant to be `list` int(11) so does anyone know what its meant to be? CREATE TABLE `honorawards` ( `userid` int(11) NOT NULL default '0', `list` int(11) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -
hi, i have tried looking for this, but cant figure out what its called. im wondering... how do you make it so the NPC's stats are based upon the attackers stats? does anyone know?
-
cheers, it works. i was just getting tired of players changing their names every like 30 minutes lol. i lost track who was who lol.
-
dont use that last bit of the code tho lol, use the one out of the config.php file.
-
hi im wondering... does anyone know how to make it so it costs say $1,000,000 to change the players name? } function name_change() { global $ir,$c,$userid,$h; print "<h3><font color=white>Name Change</h3> <font color=white>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 "<font color=white>You did not enter a new name. [url='preferences.php?action=namechange']> <font color=white>Back[/url]"; } else { $_POST['newname']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['newname']); $db->query("UPDATE users SET username='{$_POST['newname']}' WHERE userid=$userid"); print "<font color=white>Username changed!"; } thats the function for the change username, can anyone edit it so it costs you 1,000,000 to change your name please? it be very greatful. i have acturally tried searching to see if its already been posted but i cant find it.
-
Re: energy stuff help i think i figured out why its giving double the energy and etc, do u think the crons can run twice every 5 minutes? if so, does anyone know how to stop it running twice at all?
-
Re: [REVIEW REQUEST] Criminals-Nightmare and wait, i do have check.php and checkem.php lol.
-
Re: [REVIEW REQUEST] Criminals-Nightmare lol thx... but at least your telling me truthfully. and i know i need to change some text, due to person who made my layout spelt my game name wrong lol. i will be getting a unique login and register soon or later. but i need donators to get that lol.