seanybob Posted April 1, 2009 Posted April 1, 2009 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 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open attack.php Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. After that add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Create attackbite.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open explore.php Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. After that, add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open register.php Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace that line with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Create file hvzlist.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
seanybob Posted April 1, 2009 Author Posted April 1, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Create file hvzadmin.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open smenu.php Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Right before it, add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open viewuser.php Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Before it add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Before it add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Opium Posted April 1, 2009 Posted April 1, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Nice work, 4 people coming together to make a nicely coded mod. Well done. :wink: Quote
MyGunWars Posted April 1, 2009 Posted April 1, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Nice Mod Quote
MyGunWars Posted April 1, 2009 Posted April 1, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Is This Right In attack.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
seanybob Posted April 1, 2009 Author Posted April 1, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Is This Right In attack.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. no, try this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
MyGunWars Posted April 1, 2009 Posted April 1, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] ok Quote
War_Hero Posted April 2, 2009 Posted April 2, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Very well thought out and coded mod. I've yet to try it out, but I'm pretty sure it's great. :) It's nice to see a different idea that strays away from the gangster/hitman approach. Quote
Dazza Posted April 5, 2009 Posted April 5, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] BUMP because I love it I installed this a few days ago and Iv been mad busy to look into it but I found: The 'Bite them' link doesnt display when a user is attacked (Another user was unsure were this went until seany shown them, mine is definetly in the right place). It works if I go direct via URL to the attackbite.php page When the event is started, it doesnt make X amount of random people a zombie. The little snippit of code added to viewuser.php displays the wrong amount of kills i.e I had 3 kills so it said I had 3 kills in my profile, but another zombie user had 0 yet it displayed that they had 3 kills. This is all Iv found so far, people that know me will confirm Im mad busy so once I get a min I'll fix these 'bugs' and post up the cure. Another well done for everyone that chipped in on this mod Quote
DISTORTED Posted April 7, 2009 Posted April 7, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] anyone got this for V2 Quote
Sethenor Posted April 7, 2009 Posted April 7, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] This sounds pretty cool nice one peeps Quote
rulerofzu Posted April 7, 2009 Posted April 7, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] This sounds pretty cool nice one peeps :-D the v1.0 means version 1.0 of the mod not mccodes v1 you can run this on mccodes v2 Quote
seanybob Posted April 8, 2009 Author Posted April 8, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] The 'Bite them' link doesnt display when a user is attacked (Another user was unsure were this went until seany shown them, mine is definetly in the right place). It works if I go direct via URL to the attackbite.php page Show the code where you placed it - in my test game, it showed up just fine. Hm... When the event is started, it doesnt make X amount of random people a zombie. 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; The little snippit of code added to viewuser.php displays the wrong amount of kills i.e I had 3 kills so it said I had 3 kills in my profile, but another zombie user had 0 yet it displayed that they had 3 kills. 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> ";} Quote
gurpreet Posted April 8, 2009 Posted April 8, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] The 'Bite them' link doesnt display when a user is attacked (Another user was unsure were this went until seany shown them, mine is definetly in the right place). It works if I go direct via URL to the attackbite.php page Show the code where you placed it - in my test game, it showed up just fine. Hm... When the event is started, it doesnt make X amount of random people a zombie. 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; The little snippit of code added to viewuser.php displays the wrong amount of kills i.e I had 3 kills so it said I had 3 kills in my profile, but another zombie user had 0 yet it displayed that they had 3 kills. 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> ";} $ztestnum=$db->num_rows($db->query("SELECT * FROM hvzstats")); print"Tell Seanybob the number: " . $ztestnum; outputted 1 My bite them link doesn't show up either: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
seanybob Posted April 8, 2009 Author Posted April 8, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] My bite them link doesn't show up either: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 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. Quote
gurpreet Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Had to have the extra () GReat mod guys, i'd give +100 if I could. Quote
seanybob Posted April 9, 2009 Author Posted April 9, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] is this bug fixed? When the event is started, it doesnt make X amount of random people a zombie. Once all these listed bugs are fixed, I'll post an updated version. Quote
Dazza Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Yup seany it works not :D Quote
gurpreet Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Uhm, is it sposed to be the first 10 people to login once i start the event become a zombie? cos that happened. Quote
Dazza Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Yup seany it works not :D Im sure I typed something else :? Was ment to say, yes it works find Quote
seanybob Posted April 10, 2009 Author Posted April 10, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Uhm, is it sposed to be the first 10 people to login once i start the event become a zombie? cos that happened. It has a random factor. It's possible. Quote
Strats Posted April 11, 2009 Posted April 11, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Sean, You should make it so once someone is bitten they can't be bitten again. It would make everyone compete more lol Quote
gurpreet Posted April 12, 2009 Posted April 12, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Also, you could add in you can only bite once every hour or something, you lose your hunger for blood...I started this event 3 days ago and someone has over 250 bites. Quote
Strats Posted April 12, 2009 Posted April 12, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Yea my sisters lol Brought all them crystals and used to do that haha Quote
seanybob Posted April 13, 2009 Author Posted April 13, 2009 Re: [mccode v2] Humans vs. Zombies EVENT mod [done, v1.0] Sean, You should make it so once someone is bitten they can't be bitten again. It would make everyone compete more lol 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? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.