RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

A Contagious Zombie

tommenquar

Sorceror
this is giving me an error. not entirely sure how to copy and paste the error into the forums here but ill try and copy it the best i can.

Error:
+Engines/AI/Creature/BaseCreature.cs
CS0127 Line 1226: since server.mobiles.basecreature.OnDamage(Int, Server mobile, bool)' returns void, a return keyword must be followed by an object expression

I am running on RunUO 2.0 Final

I have tried to repeat the process and still that is the only error that gives me a problem. Also if anyone can tell me how to copy and past my errors onto the forums that would be great as well.

Thanks for helping out a noob server owner

-Tommenquar
 

Thagoras

Sorceror
Could you post your BaseCreature.cs? I'm also thinking, that if you're getting an error in OnDamage you may have pasted the mod in the wrong place. Be sure to use the [ code ] tags when posting code. This code shouldn't have affected OnDamage, but we can still find out what's causing the error.
 

tommenquar

Sorceror
this is my custom basecreature.cs I am not sure how to make it look like everyone else for I'm a not really familiar how to use advanced features on forums. i am a noob on message boards.

Anyways i hope we can get this working. seems like a really cool script.
 

Attachments

  • BaseCreature.cs
    125.2 KB · Views: 11

Thagoras

Sorceror
Code tags is the # symbol at the top of the reply box. It looks like [ code ] [ /code ] (minus the spaces) when it's added to the reply. You can add it manually too.

Anyway, your basecreature.cs is exactly as I guessed. You need to remove the contageous zombie modifications you made, and then reapply them to the OnBeforeDeath module (function), which is around line 4000 in your script.

it looks like this

Code:
		public override bool OnBeforeDeath()

just scroll to the bottom of that module and right before this line,

Code:
			return base.OnBeforeDeath();

insert the contageous zombie code.
 

deides

Traveler
Iinstalled this system (love the idea!!!) and it compiles without errors - however the zombies do not replicate themselves when they kill something. So I looked at athe code (I am no programmer), and noticed that itincluded && map == Felucca - doesthis mean that it owuld only work in Fel? I removed that part, and also included a using.server.custom in basecreature just to make sure that wasnt the problem. I will test now.
 

Thagoras

Sorceror
That is correct. If you remove the references to felucca, they will work anywhere. That was merely put into place to protect the server from a population explosion of Zombies. In the first posts, Spooky Robert points out how these can get pretty thick and an administrator may wish to have them located on some remote area where they can't get out of control.

The problem is they will attack anything...and frequently win. THEY may have no spawner but other critters do, so in a sense, they feed off these spawners.
 

Pure Insanity

Sorceror
Has no one made a global cure for this yet? Or even something you could take to prevent form becoming infected. Or even just a command to kill off the infection. Seems something like this would need some preventative measures like this in place.
 

deides

Traveler
well, one of those two things worked. zombies are now going rampant on the shard!

i spawned them on the defunct magincia island. no way for them to replicate and go to themainland, is there?
 

Thagoras

Sorceror
well, one of those two things worked. zombies are now going rampant on the shard!

i spawned them on the defunct magincia island. no way for them to replicate and go to the main land, is there?
Only way for them to get to the main land would be if a player (or something controlled by the player) were to get infected and die on the main land. Even with limiting it to an island (or a dungeon, as I initially did) I always felt it was a possibility of going rampant server wide, which is why I had the Felucca limitation.

Has no one made a global cure for this yet? Or even something you could take to prevent form becoming infected. Or even just a command to kill off the infection. Seems something like this would need some preventative measures like this in place.
I suppose one could make an edit to BaseCreature. Like add a bool variable saying if they can be infected or not (default false). Then the infection would be fixed to only go as far as the spawner of that type of creature. Or you could also make it default true and then have to get 'vaccinated'. Then again, you'd also have to edit the PlayerMobile...but, as the infection only spreads when you die, the only advice to players could be "Don't die!".

And as far as global command, I believe this should work:
[global remove where zombiex

Thank you James! You frequently come up with ways to improve things I hadn't thought of.
 

deides

Traveler
hmm... I added the zombies to the shard, but ever since I did I am having CLIENT-side crashes! My runuo server is fine, but once login with my owner, I can play about 2 minutes before the client crashes. I only added this script and the magincia redecorate (which did not work).

I've never had a client-crash before, could it be the zombies? clientversion is 7.0.7.1

edit. i used the global command to remove the infection, and will see if lcient is stable after that

*edit 2 : Removed all zombies from shard, and now client no longer crashes!!! Note, I did not do anythign to the zombies, and itdidnt matter if there were zombies on the screen or not (i could be in another facet and still crash after 2 minutes or so). Server was fine, only client crashed.

*edit 3 sorry for this, i played for 2 horus and crashed again. must be something else in the client/server. sorry for the scare!
 

Thagoras

Sorceror
If you posted your crash log, we might be able to figure it out. Perhaps it's something that the zombies did which added to the crash.
 

Kreamy

Wanderer
hahah this is awsome!!...

but one question.. if i were to make all of trammel zombies will it crash my shit?

either way i like it haha
 

DarkRanger89

Wanderer
Ok umm..... I got a funny question. Would anyone know why my corpses keep vanishing right after the zombiex kills it? I put in all the distro changes I was supposed to.
 

Thagoras

Sorceror
Which corpses vanish? Players? BaseCreatures?

The script is made so that the creature, that the Zombiex "kills", becomes a Zombiex too. Otherwise the area around the zombies will be covered with corpses. The script is also made (and hopefully this part functions properly) so that the inventory and equipment of the killed player/basecreature transfers to the zombie...thus making it essential to kill the zombie to get your stuff back (and making becoming a zombie make more sense).

If you don't like the way this functions, you can remove the edits in the Corpse.cs in the BeginDecay module.
 

Pure Insanity

Sorceror
Kreamy;859694 said:
hahah this is awsome!!...

but one question.. if i were to make all of trammel zombies will it crash my shit?

either way i like it haha

If you was going to do that, I'd suggest you clear the entire map of any spawner located on it. If not they will just forever increase at a rapid rate. You don't want something like this feeding off spawners, just never ends well.
 

DarkRanger89

Wanderer
Thagoras;867207 said:
Which corpses vanish? Players? BaseCreatures?

The script is made so that the creature, that the Zombiex "kills", becomes a Zombiex too. Otherwise the area around the zombies will be covered with corpses. The script is also made (and hopefully this part functions properly) so that the inventory and equipment of the killed player/basecreature transfers to the zombie...thus making it essential to kill the zombie to get your stuff back (and making becoming a zombie make more sense).

If you don't like the way this functions, you can remove the edits in the Corpse.cs in the BeginDecay module.

I love the way it works. It's just everything the zombie kills, vanishes. THe body falls over like it's dead and then disappears when it hits the ground. I tested it on a wide range of targets and in a few different locations. The bodies vanish before becoming other zombies.
 

Thagoras

Sorceror
Ok, not exactly sure why that's happening. It works fine on my server, but then, I've made a few modifications.

just trying something. Find this line in both the PlayerMobile.cs and BaseCreature.cs in the edits you made. The line will be right after this.Delete(); in the basecreature and zomb.Str = this.Str + (int)dstr; in the playermobile.
Code:
new Zombiex();

and change it to
Code:
zomb.MoveToWorld (this.Location, this.Map);

Also, in the basecreature, move that this.Delete(); line AFTER the new change. No reason to chance a null reference exception.

I'm just guessing on this, by the way...can't think of anything else that might cause this.
 

DarkRanger89

Wanderer
Thagoras;867375 said:
Ok, not exactly sure why that's happening. It works fine on my server, but then, I've made a few modifications.

just trying something. Find this line in both the PlayerMobile.cs and BaseCreature.cs in the edits you made. The line will be right after this.Delete(); in the basecreature and zomb.Str = this.Str + (int)dstr; in the playermobile.
Code:
new Zombiex();

and change it to
Code:
zomb.MoveToWorld (this.Location, this.Map);

Also, in the basecreature, move that this.Delete(); line AFTER the new change. No reason to chance a null reference exception.

I'm just guessing on this, by the way...can't think of anything else that might cause this.

I tried those edites and still the same problem. Can't create new Zombiex's by infection. Corpse's just vanish.
 
Top