Jump to content
MakeWebGames

Recommended Posts

Posted

So I had an idea for a mod, thought about coding it and selling it, but am short on time.

I decided to post my ideas here, and perhaps guide a community effort to make the mod.

This mod is a combination of the events Torn City used to run back in the day (when the Easter Bunny or Santa attacked) with the real life Human vs. Zombies game.

The basic idea:

Admin installs mod. Visits admin page, clicks enable button. 5-10 random people who click the city page are 'bitten by a wandering zombie', starting the plague - in addition, everyone who registers during the event is a zombie. Now these people are zombies. Every time they attack someone who is equal to or above their own level and win, they are presented with the normal three options (mug, hospitilize, leave) and a fourth - Bite person. Biting that person turns the attacked guy into a zombie as well.

After a specified amount of time, the event is over - everyone who is still a human gets a prize, and the 3 zombies with the most kills get prizes.

If you would like to contribute to this project, please conform to the variable names and page titles listed below to be consistent. I will post updates as new code is added, with credits.

If the moderators are able to, enable modifying posts on this thread. It's ridiculous that you would disable that in coding forums, I can't imagine your reasoning for doing so.

Database variables:

Table ----- variable

  • users ----- humanorzombie ( 0 = human, 1 = zombie)
  • users ----- zombiekills (default = 0, increases with each person they bite)
  • hvzstats ----- hvz (1 = enabled, 0 = disabled)
  • hvzstats ----- totzombies (running total of number of zombies)

 

hvzadmin.php

  • Enable function - sets hvzstats:hvz to 1
  • Disable function - sets hvzstats:hvz to 0, updates all users by resetting humanorzombie and zombiekills to 0
  • Finish Event function - gives a specified prize (cash or item) to remaining humans, and then to top 3 zombies, then runs the Disable function listed above
  • Turn into zombie - input userid, turns person into zombie
  • Turn into human - input userid, turns person into human

 

attack.php

  • Check if attacker is zombie. If so, check if target is equal to or above level of attacker. If so, add option BITE USER. If BITE USER clicked, target goes to hospital, target zombie status is updated, and attacker's zombiekills status updated.

 

register.php

  • Check if Humans vs Zombies is enabled. If so, new users are automatically zombies.

 

hvzlist.php

  • List of humans surviving. Filter by level, etc.
  • List of zombies, filter by total kills, etc.

 

explore.php

  • Checks if Humans vs zombies is enabled. If so, checks hvzstats:totzombies - if less than 10, roll a random number (say, 1-100). If > 80, user is now a zombie, and message displayed on screen 'You were bit by a passing zombie'.

 

Any other ideas to add to this mod? Let's hear em

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

Thanks guys :D

Hopefully people are interesting in throwing this together.

I'll start it off:

mysql

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

 

why don't you use boolean instead of int(1)

True. I was running out of time, and just made everything ints :P

Feel free to post modified mysql with them as booleans.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

Interesting idea, shouldn't be too difficult to rustle something up.

Edit attack.php where the options are add this

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

add this to a file calle attackbite.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

open up smenu.php and add this where you want

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

open staff.php add the case/break under the other case/breaks, and the function at the very bottom of the page above the $h->endpage();

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Add this to the top of the explore page

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

 

Interesting idea, shouldn't be too difficult to rustle something up.

Well done :D

I editted a couple typos, and changed a couple things in the code...

When biting someone, I made it so you don't get any experience, and your gang doesn't get any respect. It's made to be a separate event (although a game owner can easily change this back).

Excellent job though!

---Written by DissObey---

Edit attack.php - Where options are, add this:

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.

 

Edit smenu.php, add anywhere:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

edit staff.php - add the case/break under the other case/breaks, and the function at the very bottom of the page above the $h->endpage();

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

edit explore.php, add to top

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

Still needed to be coded:

hvzadmin.php

  • Finish Event function - gives a specified prize (cash or item) to remaining humans, and then to top 3 zombies, then runs the Disable function listed above
  • Turn into zombie - input userid, turns person into zombie
  • Turn into human - input userid, turns person into human

 

register.php

  • Check if Humans vs Zombies is enabled. If so, new users are automatically zombies.

 

hvzlist.php

  • List of humans surviving. Filter by level, etc.
  • List of zombies, filter by total kills, etc.
Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

In register.php add this after

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

still in register.php find the query that inserts the user add to the query

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

create a new file and call it hvzlist.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

hvzlist only shows the surviving humans, for my game i decided to use the hall of fame to show the top zombies.

create a new file named hvzadmin.php and add

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

If you already have done the previous staff edits then remove the function and case/break from staff.php. I moved it onto it's own file to keep the staff options together.

The edit user option is a simple cut down version of the staff_users feature, you can change the users "type" and also their zombie kills.

If you want staff to be able to see what status a player is on their profile page open viewuser.php and add where you want it to display

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

heh i even got thinking that if your a zombie instead of viewing your mails or forum posts content all you would see was "BRAINSSS!!!!!!!!!" or something like that until the event is over.

i haven't done the end event feature yet because another tables needs to be added which holds the settings like how many players to reward for each "side", and what the reward type would be, money, crystals, or item. Won't be that hard, perhaps rip apart the staff_crime file and customise it for hvz event.

I even went so far as to make a whole new theme for the event, if your using illusions theme changer mod you can add a little code that checks if the player is a zombie, if so update to the zombie theme, and on the hvzadmin.php page find the stop event and update everyone back to the regular theme when the event is closed.

open smenu.php and if you added the last code for the zombie settings remove it, instead add this anywhere you want it to appear.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

Awesome Dissobey :D

Here's the most up to date code, with a few additions by myself.

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.

 

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.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

Well, this mod is coming along. The last thing that needs to be coded is a finish event admin function.

I've tested all the code thus far (shown in my above post) on my site, and it works perfectly. It's entirely functional - if you add it now, it will work - we just need to get the finish event admin function coded

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

Haunted Dawg contributed this via pm:

Here Is the Cases:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Link:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Funcion:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

That's for the zombie's. the last admin function missing.

Not tested.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

I will so add this when the whole code is out. I'll personally re-code/code parts but it would be nice for my game.. :wink:

 

ZOMBIE PIRATES!

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

I was actually working on my mccode v2 to make it full human vs zombie.

But it was too much to edit so i took a break, this defo helps me out on alot of things.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

The finish event function works fine, but you might want to change the ASC to DESC otherwise it will give prizes to the zombies with the least number of bites.

Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

 

The finish event function works fine, but you might want to change the ASC to DESC otherwise it will give prizes to the zombies with the least number of bites.

I rewrote my own... Either one works I guess.

  • 4 months later...
Posted

Re: [mccode v2] Humans vs. Zombies EVENT mod

Lol, yes endo the whole code is in the fist page and ifyou cant get all of it try click on seanybobs pm link "(My Mods For Sale)" you can get it there :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...