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!

[RUNUO 2.0] These RatMens are Thieves !!

Gargouille

Sorceror
[RUNUO 2.0] These RatMens are Thieves !!

Here's a horde of RatMens... They are stronger, they go faster, and they work together to loot your players !!

Just [add horderat, best place would be the bottom of a deep forest...

The HordeRat item is the center of a 200 tiles territory in which a horde will spawn.
The spawn location takes care :
- not to be in guarded or town areas
- still be in a forest
- still be near a road

Now the rats are hidden, they just wait for a victim.

They all fight together, and after the battle, if a player is on the ground, they all going to stick corpse like glue, and loot it again and again...

After 3 minutes, they flee in the forest to prepare another ambush...

They keep all looted items in a bag, and when the rat carrying the bag die, another rat take the treasurebag...

So if you want to take back what they have loot to you, you must KILL THEM ALL !!!

Many things can esealy be changed in top of code.
That code has not issues reported yet.

[EDIT] Now a generic code wich allow to have several horde-types... Here with a HordeOfRats and a HordeOfOrcs
 

Attachments

  • HordeOfOrcs.cs
    8.3 KB · Views: 197
  • HordeOfRats.cs
    7.6 KB · Views: 207
  • HordeSystem.cs
    19.5 KB · Views: 221

Vorspire

Knight
Not only does it sound cool, it sounds really, REALLY funny...
I can imagine a bewildered player wandering, chopping wood and all of a sudden, 50 Ratmen jump on him, kill him in less than 5 seconds, strip the corpse and return to the mysterious darkness from which they came...
 

Thilgon

Sorceror
I agree with Vorspire, this sounds EXTREMELY funny!
The rats are a bit overpowered anyway :p
I can figure some theme-variations, by the way (human brigands, orcs, yet ratmens are the funniest), based on this :)

Very good job Garguille :D
 

Gargouille

Sorceror
THX ^^

First post edited, with a generic core and two differents hordes... always a little bit overpowered, cause players are a little bit overpowered too :p
 

Greystar

Wanderer
It is interesting and I'm surprised no one did it before. I'd personally use Brigands but that's just me. No what would be funnier then Ratmen doing this... Mongbats...
 

Gargouille

Sorceror
HordeSystem.cs edited

When do it generic, made an issue causing crash on delete, a stupid one , deleting during a foreach enumeration... Here the fix :
Code:
public override void OnDelete()
		{
			for(int i=0;i>m_Thieves.Count;i++)
			{
				if(m_Thieves[i] != null)
					m_Thieves[i].Delete();
			}
			
			/*foreach(Mobile thief in m_Thieves)
			{
				if(thief != null)thief.Delete();
			}*/
			
			base.OnDelete();
		}

But now its generic, the cleanup don't work anymore (when deleting the spawner, the critters don't...)
Don't know why... But I will.:D
 
I got this error

+ Thieving Rats/HordeSystem.cs:
CS0029: Line 191: Cannot implicitly convert type 'System.Collections.ArrayLi
st' to 'System.Collections.Generic.List<Server.Tile>'
 

Gargouille

Sorceror
Line 191 :
Code:
List<Tile> eable = m.GetTilesAt(point, false, false, true);

It works with a RunUO 2.0. So I guess that you use RunUO 1.0 which do not implement Collection.Generic.

In RunUO 1.0, the Map.GetTilesAt method should return ArrayList instead of List<T>...

Youc ould change it for something like that :
Code:
ArrayList eable = m.GetTilesAt(point, false, false, true);
					foreach (object obj in eable)
					{
						if(obj is Tile)
						{
							Tile tile = (tile)obj;
							result.Add(tile.ID);
						}
					}
 

test444

Wanderer
hello, something is wrong.. when i add hordespawner, it will dissaper after few secs... it will autodelete itself, dont know why....

what if the horde is killed, they are respawned?
 

Gargouille

Sorceror
When you add a spawner, it try to spawn the horde, and search for good locations... If it does not find one, the spawner is deleted.

The test for good location are : not in town or guardedregion, in a forest and near a road. The forest and road tests can be switch off by editing the code (easily).


And when the horde is totally killed, it respawn later.
 
Gargouille;802672 said:
Line 191 :
Code:
List<Tile> eable = m.GetTilesAt(point, false, false, true);

It works with a RunUO 2.0. So I guess that you use RunUO 1.0 which do not implement Collection.Generic.

In RunUO 1.0, the Map.GetTilesAt method should return ArrayList instead of List<T>...

Youc ould change it for something like that :
Code:
ArrayList eable = m.GetTilesAt(point, false, false, true);
					foreach (object obj in eable)
					{
						if(obj is Tile)
						{
							Tile tile = (tile)obj;
							result.Add(tile.ID);
						}
					}



I am using Runuo 2.0 and when I compile it i get that error.
 

Gargouille

Sorceror
Yes, you use RunUO 2.0 RC1 in which Map.GetTilesAt method returns an ArrayList.

I'm using RunUO 2.0 RC2.

Try that :
Code:
ArrayList eable = m.GetTilesAt(point, false, false, true);
					foreach (object obj in eable)
					{
						if(obj is Tile)
						{
							Tile tile = (tile)obj;
							result.Add(tile.ID);
						}
					}
 

dagger lad

Wanderer
This script is absolutely awesome. I am in the midst of setting up Brigands right now.

I am also wondering if this could be applied to a the Pirate Boat that chases script so that the Pirates could appear and then loot? Maybe Ill try that...

Thanks again.
 

Ki Frost

Sorceror
I could see someone slightly modifying this to use with the contagious zombies... Flesh eating little buggers that work in teams!! :eek: would be extremely funny and probably a little horrifying.

//Edit//

And instead of looting your stuff, they just rip apart your body... which would be awesome, cause then when you went to go get your stuff back you could literally see parts of your corpse scattered around the area by zombies that lost intrest in your body...
 
Top