seanybob
Members-
Posts
666 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by seanybob
-
Ah, that solved that problem. I didn't have javascript enabled for mwg forums, so the 'select all' thing wasn't working - now that's done. 40 at a time is much more reasonable than 1 at a time. Thanks
-
Incidentally, is this board still active? And secondly, my mailbox is apparently full. I have 573 messages in it, and there is no mass delete button. I cannot send or receive mail until I clear my mail box it appears, but I am unwilling to go through and delete 573 messages by hand. Does this mean I should create a second account for the sole purpose of sending and receiving messages? Or perhaps an admin has a mass delete button handy? ;)
-
Assuming this is mccodes, just add an if statement checking user level: if($ir['user_level']==1) die("<font color=blue>This Game Is Underconstruction Check Back In 1-2 Hours.</font>");
-
Heya Fellow CE (or is it MWG now?) members! I have returned. Been spending way too much time in c++, lisp, and assorted other vulgar programming languages as of late, and decided to get back into some php. Looking forwards to contributing to the success of this forum again. It looks likes it has undergone many changes for the better during my 'furlough'. Incidentally, all you older members that remember me, let's catch up - send me a pm so I can hear what you've been up to ;)
-
Re: [mccodes v2] Casino Mod Package [$75] I actually am still around, just rarely check the forums. You can get in touch with me by the email '[email protected]'
-
Re: [MCCODES v2] Trivia Quiz Creator Interesting idea. But unfortunately, not a good addition to any game as-is. All a user has to do is make 4 'side' accounts, and he can get the correct answers to every quiz rapidly. Then he can use them on his main account, or share them with others. A way to combat this is to require people to be a certain level that takes a few weeks to achieve, or to pay a significant amount of money for access to the quiz.
-
[mc-codes] [ $40 ] High Score Flash Arcade with 341 Games!!!
seanybob replied to Sim's topic in Paid Modifications
Re: [mc-codes] [ $40 ] High Score Flash Arcade with 341 Games!!! I believe so. However, it's still not secured against anybody with a minimal amount of 'ethical' hacking experience. -
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Link? And gurpreet, would you post your attack.php (or just the code surrounding the relevant portion)? -
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] This should already be in effect, if I understand you... zombies can only bite humans, and when they do bite a human that human turns into a zombie - so they cannot bite that person again. Did I misunderstand? -
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] It has a random factor. It's possible. -
Re: I need help with a Mod i made You no longer need to worry about the MC Craps version, use mne! :P Hahaha Just yesterday I had a guy ask me to check your 'secure forums' that he installed on his site. Within 2 minutes I had access to the head admin's account.
-
Re: [mccodes] Board Game [$15] Eh actually, never mind. Lol. Don't feel like doing the work. Be happy to help you with it yourself via IM though if you decide to try to code it yourself.
-
Re: [mccodes] Board Game [$15] Hey Iso, Would you like me to update the script to show the person on the board? I'd make you that trade - you give me the mod, I'll give you the code to show the person's position on the image ;)
-
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] is this bug fixed? Once all these listed bugs are fixed, I'll post an updated version. -
Re: I need help with a Mod i made First off, you have a floating } at the end of your file. I imagine it's missing from the switch case... 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; Where's the end bracket for this? o.0
-
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] so gurpeet, something is wrong with this conditional... if ($ir['humanorzombie'] == 1 && $odata['level'] >= $ir['level'] && $odata['humanorzombie']==0) Not sure if extra parentheticals are needed to change order of operations... if (($ir['humanorzombie'] == 1 && $odata['level']) >= ($ir['level'] && $odata['humanorzombie']==0)) $ir is a global variable that should be set. $odata should be set right before this code, since you are outputting $odata['username']. Try outputting each of the 4 variables in the if statement, let me know what the output is. Chances are one of them are null for some reason. -
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Show the code where you placed it - in my test game, it showed up just fine. Hm... Again, worked in my test game. Possible reason for error is that there is not a row inserted in the hvzstats table. Put this at the top of a page (say, explore.php) and let me know what it outputs: $ztestnum=$db->num_rows($db->query("SELECT * FROM hvzstats")); print"Tell Seanybob the number: " . $ztestnum; You're right. The line of code in question is this: if($r['humanorzombie'] == 1) { $zomb="<font color='red'>Zombie</font>";$kills= "Kills: <font color='red'> {$ir['zombiekills']}</font> ";} Should be if($r['humanorzombie'] == 1) { $zomb="<font color='red'>Zombie</font>";$kills= "Kills: <font color='red'> {$r['zombiekills']}</font> ";} -
Re: Wanting to purchase a few mods For you, $40. :) It's not the arcade that does that, but an error in the coding for the cookies in the mccodes game engine. Does the built in 'remember me' function work for anyone's site? I may be wrong, but I don't think so... I'd be happy to head a community effort to solve bug (or just rewrite the javascript that establishes the cookie).
-
Re: Wanting to purchase a few mods I'll give ya a deal for the poker/blackjack mods. Link in my sig to preview them.
-
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] no, try this: [b]What do you want to do with {$odata['username']} now?[/b] <form action='attackwon.php?ID={$_GET['ID']}' method='post'><input class='textbox' type='submit' value='Mug Them' /></form> <form action='attackbeat.php?ID={$_GET['ID']}' method='post'><input class='textbox' type='submit' value='Hospitalize Them' /></form> <form action='attacktake.php?ID={$_GET['ID']}' method='post'><input class='textbox' type='submit' value='Leave Them' /></form>"; if ($ir['humanorzombie'] == 1 && $odata['level'] >= $ir['level'] && $odata['humanorzombie']==0) { echo '<form action="attackbite.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Bite Them" /></form>'; } } $dert=$db->query("SELECT * FROM ladder WHERE ladderID=$userid"); $you=$db->fetch_row($dert); $dert=$db->query("SELECT * FROM ladder WHERE ladderID={$odata['userid']}"); $them=$db->fetch_row($dert); if($you && $them) { print"<form action='attackladder.php?ID={$_GET['ID']}' method='post'><input class='textbox' type='submit' value='Ladder Attack Them' /></form>"; } -
Re: V2 Estate.php Fix? To be honest, I just briefly looked at the file, but I imagine the program may be fixed by: Find if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } After it add else if($np['hWILL'] == $mp['hWILL']) { print "You already have that house!"; }
-
Re: [mccode v2] Humans vs. Zombies EVENT mod I rewrote my own... Either one works I guess.
-
mccode-v2 Humans vs. Zombies EVENT mod [done, v1.0]
seanybob replied to seanybob's topic in Free Modifications
Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Create file hvzadmin.php <?php include "sglobals.php"; switch($_GET['action']) { case 'edituser': edit_user_begin(); break; case 'edituserform': edit_user_form(); break; case 'editusersub': edit_user_sub(); break; case 'event_finish': finish_event_hvz(); break; case 'hvz': hvz_settings(); break; default: print "Error: This script requires an action."; break; } function finish_event_hvz() { global $db, $ir, $h, $set; $zom=$db->query("SELECT * FROM hvzstats"); $hvz=$db->fetch_row($zom); if($hvz['hvz'] !=1) { print'The event was not enabled.'; $h->endpage(); die(); } if(!$_GET['t']) { $tothum=$db->num_rows($db->query("SELECT userid FROM users WHERE humanorzombie=0")); print" <h3>Prize for surviving humans ($tothum total):</h3> <form action=hvzadmin.php?action=event_finish&t=z method=post> Cash: <input type=text name=hcash> Crystals: <input type=text name=hcrystals> Item: ".itemhvz_dropdown('hitem')." <input type=submit value='Submit - move on to Zombie prizes'> </form> "; } if($_GET['t']=='z') { $rr=$db->query("SELECT * FROM users WHERE humanorzombie=0"); while($rt=$db->fetch_row($rr)) { $hcash=abs(intval($_POST['hcash'])); $hcrystals=abs(intval($_POST['hcrystals'])); $hitem=abs(intval($_POST['hitem'])); $db->query("UPDATE users SET crystals=crystals+$hcrystals,money=money+$hcash,new_mail=new_mail+1 WHERE userid={$rt['userid']}"); if($hitem>0){$db->query("INSERT INTO inventory VALUES('',$hitem,{$rt['userid']},1)",$c) or die(mysql_error());} $subj='Prize for Humans versus Zombies event.'; if($hcash>0){$catxt=" $".number_format($hcash);}else{$catxt=" no cash";} if($hcrystals>0){$crtxt=" ".number_format($hcrystals)." crystals";}else{$crtxt=" no crystals";} if($hitem>0){$citxt=" a special item. Be sure to check your inventory";}else{$citxt=" no item";} $msg="Congratulations! For surviving throughout the humans vs. zombies event, you have received a prize of $catxt, $crtxt, and $citxt!"; $db->query("INSERT INTO mail VALUES ('',0,0,{$rt['userid']},unix_timestamp(),'$subj','$msg')"); } $z1=$db->fetch_row($db->query("SELECT userid,username,zombiekills FROM users WHERE zombiekills>0 AND humanorzombie=1 ORDER BY zombiekills DESC Limit 1")); $z2=$db->fetch_row($db->query("SELECT userid,username,zombiekills FROM users WHERE zombiekills>0 AND humanorzombie=1 ORDER BY zombiekills DESC Limit 1,1")); $z3=$db->fetch_row($db->query("SELECT userid,username,zombiekills FROM users WHERE zombiekills>0 AND humanorzombie=1 ORDER BY zombiekills DESC Limit 2,1")); print" <h3>Prize for zombies with most bites:</h3> <form action=hvzadmin.php?action=event_finish&t=f method=post> [b]First place ({$z1['username']} - {$z1['zombiekills']} kills)[/b] <input type=hidden name=z1userid value={$z1['userid']}> Cash: <input type=text name=zcash1> Crystals: <input type=text name=zcrystals1> Item: ".itemhvz_dropdown('zitem1')." [b]Second place ({$z2['username']} - {$z2['zombiekills']} kills)[/b] <input type=hidden name=z2userid value={$z2['userid']}> Cash: <input type=text name=zcash2> Crystals: <input type=text name=zcrystals2> Item: ".itemhvz_dropdown('zitem2')." [b]Third place ({$z3['username']} - {$z3['zombiekills']} kills)[/b] <input type=hidden name=z3userid value={$z3['userid']}> Cash: <input type=text name=zcash3> Crystals: <input type=text name=zcrystals3> Item: ".itemhvz_dropdown('zitem3')." <input type=submit value='Submit & End Event'> </form> "; } if($_GET['t']=='f') { $zuserid1=abs(intval($_POST['z1userid'])); if($zuserid1>0) { $zcash1=abs(intval($_POST['zcash1'])); $zcrystals1=abs(intval($_POST['zcrystals1'])); $zitem1=abs(intval($_POST['zitem1'])); $db->query("UPDATE users SET crystals=crystals+$zcrystals1,money=money+$zcash1,new_mail=new_mail+1 WHERE userid=$zuserid1"); if($zitem1>0){$db->query("INSERT INTO inventory VALUES('',$zitem1,$zuserid1,1)",$c) or die(mysql_error());} $subj='Prize for Humans versus Zombies event.'; if($zcash1>0){$catxt=" $".number_format($zcash1);}else{$catxt=" no cash";} if($zcrystals1>0){$crtxt=" ".number_format($zcrystals1)." crystals";}else{$crtxt=" no crystals";} if($zitem1>0){$citxt=" a special item. Be sure to check your inventory";}else{$citxt=" no item";} $msg="Congratulations! For biting the most people as a zombie, you have received a prize of $catxt, $crtxt, and $citxt!"; $db->query("INSERT INTO mail VALUES ('',0,0,$zuserid1,unix_timestamp(),'$subj','$msg')"); } $zuserid2=abs(intval($_POST['z2userid'])); if($zuserid2>0) { $zcash2=abs(intval($_POST['zcash2'])); $zcrystals2=abs(intval($_POST['zcrystals2'])); $zitem2=abs(intval($_POST['zitem2'])); $db->query("UPDATE users SET crystals=crystals+$zcrystals2,money=money+$zcash2,new_mail=new_mail+1 WHERE userid=$zuserid2"); if($zitem2>0){$db->query("INSERT INTO inventory VALUES('',$zitem2,$zuserid2,1)",$c) or die(mysql_error());} $subj='Prize for Humans versus Zombies event.'; if($zcash2>0){$catxt=" $".number_format($zcash2);}else{$catxt=" no cash";} if($zcrystals2>0){$crtxt=" ".number_format($zcrystals2)." crystals";}else{$crtxt=" no crystals";} if($zitem2>0){$citxt=" a special item. Be sure to check your inventory";}else{$citxt=" no item";} $msg="Congratulations! For biting the 2nd most people as a zombie, you have received a prize of $catxt, $crtxt, and $citxt!"; $db->query("INSERT INTO mail VALUES ('',0,0,$zuserid2,unix_timestamp(),'$subj','$msg')"); } $zuserid3=abs(intval($_POST['z3userid'])); if($zuserid3>0) { $zcash3=abs(intval($_POST['zcash3'])); $zcrystals3=abs(intval($_POST['zcrystals3'])); $zitem3=abs(intval($_POST['zitem3'])); $db->query("UPDATE users SET crystals=crystals+$zcrystals3,money=money+$zcash3,new_mail=new_mail+1 WHERE userid=$zuserid3"); if($zitem3>0){$db->query("INSERT INTO inventory VALUES('',$zitem3,$zuserid3,1)",$c) or die(mysql_error());} $subj='Prize for Humans versus Zombies event.'; if($zcash3>0){$catxt=" $".number_format($zcash3);}else{$catxt=" no cash";} if($zcrystals3>0){$crtxt=" ".number_format($zcrystals3)." crystals";}else{$crtxt=" no crystals";} if($zitem3>0){$citxt=" a special item. Be sure to check your inventory";}else{$citxt=" no item";} $msg="Congratulations! For biting the 3rd most people as a zombie, you have received a prize of $catxt, $crtxt, and $citxt!"; $db->query("INSERT INTO mail VALUES ('',0,0,$zuserid3,unix_timestamp(),'$subj','$msg')"); } $db->query("UPDATE users SET humanorzombie=0, zombiekills=0"); $db->query("UPDATE hvzstats SET totzombies=0, hvz=0"); print"Prizes given, event finished."; } } function edit_user_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing User Zombie Status</h3> You can edit any aspect of this user. <form action='hvzadmin.php?action=edituserform' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='Edit User' /></form> OR enter a user ID to edit: <form action='hvzadmin.php?action=edituserform' method='post'> User: <input type='text' name='user' value='0' /> <input type='submit' value='Edit User' /></form>"; } function edit_user_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $d=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $itemi=$db->fetch_row($d); print "<h3>Editing User {$itemi['username']}</h3> <form action='hvzadmin.php?action=editusersub' method='post'> <input type='hidden' name='userid' value='{$_POST['user']}' /> Zombie Bites: <input type='text' name='zombiekills' value='{$itemi['zombiekills']}' /> Type: <select name='humanorzombie' type=dropdown><option value='0'>Human</option><option value='1'>Zombie</option>"; print "</select> <input type='submit' value='Edit User' /></form>"; } function edit_user_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['humanorzombie'])) { $go=1; } if(!isset($_POST['zombiekills'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['user']=$_POST['userid']; edit_user_form(); } else { $_POST['zombiekills']=abs((int) $_POST['zombiekills']); $_POST['humanorzombie']=abs((int) $_POST['humanorzombie']); $oq=$db->query("SELECT * FROM users WHERE userid={$_POST['userid']}"); $rm=$db->fetch_row($oq); if ($rm['humanorzombie'] ==0 && $_POST['humanorzombie'] ==1) { $db->query("UPDATE hvzstats SET totzombies=totzombies+1"); } if ($rm['humanorzombie'] ==1 && $_POST['humanorzombie'] ==0) { $db->query("UPDATE hvzstats SET totzombies=totzombies-1"); } $db->query("UPDATE users SET zombiekills='{$_POST['zombiekills']}', humanorzombie={$_POST['humanorzombie']} WHERE userid={$_POST['userid']}"); stafflog_add("Edited user {$_POST['username']} zombie status"); print "Edited user zombie status"; } } function hvz_settings() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } $_GET['status'] = abs((int) $_GET['status']); if($_GET['status'] == '1') { $db->query("UPDATE hvzstats SET totzombies=0, hvz=1"); stafflog_add("Started Zombie Event."); echo "Zombie event started. [url='staff.php']Go Back[/url]"; $h->endpage(); exit; } else if($_GET['status'] == '0') { $db->query("UPDATE users SET humanorzombie=0, zombiekills=0 WHERE humanorzombie=1 || zombiekills>0"); $db->query("UPDATE hvzstats SET totzombies=0, hvz=0"); stafflog_add("Stopped Zombie Event."); echo "The zombie event has been started. [url='staff.php']Go Back[/url]"; $h->endpage(); exit; } } $h->endpage(); function itemhvz_dropdown($ddname="item",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $ret.="<option value=''>None</option>"; $q=$db->query("SELECT * FROM items ORDER BY itmname ASC"); while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmid']}'"; $ret.=">{$r['itmname']}</option>"; } $ret.="\n</select>"; return $ret; } ?> Open smenu.php Find print "<hr />[b]Logs[/b] Right before it, add print"<hr /> <font color=#33CC33>[b]Zombie Event[/b]</font> > [url='hvzadmin.php?action=hvz&status=1']Start Zombie Event[/url] > [url='hvzadmin.php?action=event_finish']Finish Zombie Event (w/ prizes)[/url] > [url='hvzadmin.php?action=hvz&status=0']Stop Zombie Event (no prizes)[/url] > [url='hvzadmin.php?action=edituser']Edit Zombie Status[/url] "; Open viewuser.php Find User Level: $userl Before it add $ztext Find if($r['donatordays']) { $r['username'] = "<font color=red>{$r['username']}</font>";$d="[img=donator.gif]"; } Before it add $zom=$db->query("SELECT * FROM hvzstats"); $hvz=$db->fetch_row($zom); if($ir['user_level'] > 1) { if($hvz['hvz'] ==1) { if($r['humanorzombie'] == 1) { $zomb="<font color='red'>Zombie</font>";$kills= "Kills: <font color='red'> {$ir['zombiekills']}</font> ";} if($r['humanorzombie'] == 0) { $zomb="<font color='#33CC33'>Human</font>"; } $ztext= "Status: $zomb $kills"; } } -
Written by Dissobey and Seanybob. Contributions made by various members (Haunted Dawg, POG1) This is v1.0 If any bugs are found, or new ideas suggested, they may be added to the mod (resulting in, naturally, the version number being updated). If you like this free mod, check out some of the other free/paid mods I have at my website What is this mod? This mod will enable zombies to attack your town. It turns some users into zombies immediately, and everyone they bite turns into a zombie. As time progresses, the humans that are left will get fewer and fewer, and only the strongest will survive. When the event is ended by the admin, the humans who are left surviving get a specified prize, and the zombies with the most kills get prizes. Now without further ado... the code: mysql ALTER TABLE `users` ADD `humanorzombie` INT( 1 ) NOT NULL DEFAULT '0', ADD `zombiekills` INT( 11 ) NOT NULL DEFAULT '0'; CREATE TABLE `hvzstats` ( `hvz` INT( 1 ) NOT NULL DEFAULT '0', `totzombies` INT( 11 ) NOT NULL DEFAULT '0' ) ENGINE = MYISAM INSERT INTO `hvzstats` (`hvz`, `totzombies`) VALUES (0, 0); Open attack.php Find <form action='attacktake.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Leave Them' /></form>"; After that add if ($ir['humanorzombie'] == 1 && $odata['level'] >= $ir['level'] && $odata['humanorzombie']==0) { echo '<form action="attackbite.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Bite Them" /></form>'; } Create attackbite.php <?php $atkpage=1; include "globals.php"; $_GET['ID']=abs((int) $_GET['ID']); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); $od=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); if($_SESSION['attackwon'] != $_GET['ID']) { print "Cheaters don't get anywhere."; $h->endpage(); exit; } if($db->num_rows($od)) { $r=$db->fetch_row($od); if($r['hp'] == 1) { print "What a cheater u are."; } else { print "You move forward to bite {$r['username']}. You take a huge chunk out of {$r['username']}'s left arm. You watch as they turn over, and begin moaning 'BRAINSSSSSSSSS!!' - The transformation is complete, they became a zombie."; $hosptime=rand(10,20); $db->query("UPDATE users SET zombiekills=zombiekills+1, attacking=0 WHERE userid=$userid"); $db->query("UPDATE hvzstats SET totzombies=totzombies+1"); $db->query("UPDATE users SET humanorzombie=1, hp=1, hospital=$hosptime, hospreason='Bit by the zombie known as <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bit you and turned you into a zombie.",$c,'combat'); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-2,'$atklog');"); $_SESSION['attackwon']=0; } } else { print "You beat Mr. non-existant!"; } $h->endpage(); ?> Open explore.php Find include "globals.php"; After that, add $zom=$db->query("SELECT * FROM hvzstats"); $hvz=$db->fetch_row($zom); if($hvz['hvz'] ==1) { if($hvz['totzombies'] < 10 && $ir['humanorzombie'] ==0) { $randzomb=(int) rand(1,100); $randthaught=(int) rand(1,5); if($randthaught == 1) { $thaught="Did i leave the oven on?"; } else if($randthaught == 2) { $thaught="I wonder what my gravestone will read.."; } else if($randthaught == 3) { $thaught="I'm too young to die!! Can't somebody help me?!?!?!"; } else if($randthaught == 4) { $thaught="MMM Brains..."; } else if($randthaught == 5) { $thaught="Time to visit my ex... >:]"; } if($randzomb > 80) { print "[b]You've been bitten by a wandering zombie[/b], the last rational thought you have before tuning into a zombie is: $thaught."; $db->query("UPDATE users SET humanorzombie=1 WHERE userid=$userid"); $db->query("UPDATE hvzstats SET totzombies=totzombies+1"); $h->endpage(); exit; } } } Find [url='userlist.php']User List[/url] Replace with [url='userlist.php']User List[/url] "; $zom=$db->query("SELECT * FROM hvzstats"); $hvz=$db->fetch_row($zom); if($hvz['hvz'] ==1) { print"[url='hvzlist.php']Humans vs. Zombie list[/url] "; } print" Open register.php Find $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); Replace that line with $zom2=$db->query("SELECT * FROM hvzstats"); $hvz=$db->fetch_row($zom2); if($hvz['hvz'] ==1) { $zom=1; } else { $zom=0; } $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup, humanorzombie) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP', $zom)"); Create file hvzlist.php <?php include "globals.php"; $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'userid'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; $which = $_GET['hz']; if($which=='Humans') { $type=0; $txt='Humans'; } else { $type=1; $txt='Zombies'; } print "<h3>List of $txt</h3> [url='?hz=Humans']Humans[/url] | [url='?hz=Zombies']Zombies[/url] "; $cnt=mysql_query("SELECT userid, humanorzombie FROM users WHERE humanorzombie=$type",$c); $membs=mysql_num_rows($cnt); $pages=(int) ($membs/50)+1; if($membs % 100 == 0) { $pages--; } print "Pages: "; for($i=1;$i<=$pages;$i++) { $pst=($i-1)*50; print "<a href='hvzlist.php?st=$pst&by=$by&ord=$ord'>"; if($pst == $st) { print "<font color='#33cc33'>"; } print $i; if($pst == $st) { print "</font>"; } print "</a> "; if($i % 25 == 0) { print " "; } } print " Order By: [url='hvzlist.php?hz=$txt&st=$st&by=userid&ord=$ord']User ID[/url] | [url='hvzlist.php?hz=$txt&st=$st&by=username&ord=$ord']Username[/url] | [url='hvzlist.php?hz=$txt&st=$st&by=level&ord=$ord']Level[/url] | [url='hvzlist.php?hz=$txt&st=$st&by=money&ord=$ord']Money[/url] | [url='hvzlist.php?hz=$txt&st=$st&by=zombiekills&ord=$ord']People Bitten[/url] [url='hvzlist.php?hz=$txt&st=$st&by=$by&ord=asc']Ascending[/url] | [url='hvzlist.php?hz=$txt&st=$st&by=$by&ord=desc']Descending[/url] "; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON u.gang=g.gangID WHERE u.humanorzombie=$type ORDER BY $by $ord LIMIT $st,50"); $no1=$st+1; $no2=$st+50; print "Showing $txt $no1 to $no2 by order of $by $ord. <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>ID</th><th>Name</th><th>Money</th><th>Level</th><th>Online</th><th>Hospital?</th> <th>Jail?</th>"; if($type==1) { print"<th>People Bitten</th>"; } print"</tr>"; while($r=$db->fetch_row($q)) { $d=""; if($r['donatordays']) { $r['username'] = "<font color='".$r['name_color']."'>".$r['username']."</font>";$d="[img=/Images/donator.gif]"; } print "<tr><td>{$r['userid']}</td><td>[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']} $d[/url]</td><td>\${$r['money']}</td><td>{$r['level']}</td><td>"; if($r['laston'] >= time()-15*60) { print "<font color=#33cc33>[b]Online[/b]</font>"; } else { print "<font color=red>[b]Offline[/b]</font>"; } print "</td><td>"; if($r['hospital'] >= 1) { print "<font color=red>[b]Yes[/b]</font>"; } else { print "<font color=#33cc33>[b]No[/b]</font>"; } print "</td><td>"; if($r['jail'] >= 1) { print "<font color=red>[b]Yes[/b]</font>"; } else { print "<font color=#33cc33>[b]No[/b]</font>"; } print "</td>"; if($type==1) { print"<td><font color=red>[b]<center>{$r['zombiekills']}</center>[/b]</font></td>"; } print"</tr>"; } print "</table>"; $h->endpage(); ?>
-
Re: [mccode v2] Humans vs. Zombies EVENT mod finished it, posting it now