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!

Evolution Mercenary

sadoul

Wanderer
Evolution Mercenary

This is basically a spinoff of Evolution Dragon but added alot. Thanks to Raelis for the help, and permission to take some of his dragon script. I made this a month or so back but I have no time to finish it. There is a lot to do on it. I'm just releasing it because some of you could alter it a little to fit your server. Plus it's still a fun script. Basically it's a human that evolves in stages. Letting you dress him in the last stages. The damage, etc. is all the same as a dragon. However, if you want it for your server I would edit some of the damages if I were you. As a human this mob is a lot more powerful than the evo dragon because he can swing faster. No mating or feeding.

His commands:

help - tells the player his commands
restyle - lets you style the mercenary's hair
mount - lets you mount him
dismount - lets you dismount him
stats - brings up his stats
undress - undress him

example: Sadoul restyle (if the mercenary's name was Sadoul)

What he does. Basically you train him just like the evolution dragon. At stage 6 he is reborn (naked) and you can dress him, and wield him with your artifacts,etc. It always sets the items movable false so if the mercenary dies, they dont lose their artifacts IF HE IS BONDED.

POST ALL BUGS HERE...Also, feel free to improve on it and post it. I just don't have the time right now to finish him, or script a lot.

Fixed:
-Fixed where he would destroy his mount if you undressed him while mounted.
-Fixed where it would crash server if the mercenary's master was null.
-Read http://www.runuo.com/forum/showthread.php?p=319593#post319593 to fix AnimalTrainer or just download and replace.
-Fixed where it would delete the ethymount on death.

Have fun,
Sadoul
 

Attachments

  • AnimalTrainer.cs
    10.2 KB · Views: 939
  • Evolution Mercenary.zip
    13.4 KB · Views: 1,577

Mad Clown

Wanderer
First off...I'm Loving these Evo scripts you guys are doing. I have one question though, how would I go about making it so they are only bonded at later stages?
 

Virgil

Wanderer
Kinda played around with this one a bit but ran into some problems. Not sure if I really have time to work through them. But the commands you say do not work. Not sure if thats how your supposed to trigger them. I didn't see them as an option in the command list.

Fist off, if you say help, it brings up the RunUO help menue,

All other commands when spoken don't seem to work. If I'm doing something odd, please let me know..
 

Raelis

Sorceror
Virgil said:
Kinda played around with this one a bit but ran into some problems. Not sure if I really have time to work through them. But the commands you say do not work. Not sure if thats how your supposed to trigger them. I didn't see them as an option in the command list.

Fist off, if you say help, it brings up the RunUO help menue,

All other commands when spoken don't seem to work. If I'm doing something odd, please let me know..


You must say the mercenary's name, then the command
Ex: "Bill restyle"
 

sadoul

Wanderer
Mad Clown

Mad Clown here is what you would do. In the EvoMercDeed where it spawns the mercenary. This
Code:
				EvoMerc merc = new EvoMerc();

         			merc.Map = from.Map; 
         			merc.Location = from.Location; 

				merc.Controled = true;

				merc.ControlMaster = from;

				merc.IsBonded = true;

erase: merc.IsBonded = true;

then open EvoMerc.cs and whatever stage you want where it's declaring all the stuff like
Code:
		this.VirtualArmor = va;

just add this:            this.IsBonded = true;
 

Virgil

Wanderer
Ok, I think this is great and is a well needed thing so I am really going to see what I can do with this.. Just off hand, kinda want to beable to arm this guy and dress him as I see fit, so I may tweak it here and there rather then waiting for him to reach a certain stage..

I did run across one bug though. While your Mercenary is mounted, if you say for example, "Bob undress", he undresses but the mount he was on vanishes.
 

sadoul

Wanderer
Cool Virgil thanks for the bug I'll look into it. If you want to tweak his dress stage it's very very easy. In his OnDragDrop method right here just change the this.Stage > 1 and it'll let you dress him anytime.
Code:
		public override bool OnDragDrop( Mobile from, Item dropped )
		{
			PlayerMobile player = from as PlayerMobile;
										
			if ( player != null )
			{
				if ( this.Stage > 5 )
				{

However, he'll still try to dress himself so you will have to go to each stage and delete the code where I made his uniform for the first 4 stages.
 

Virgil

Wanderer
Hmmm, one thing.. Been trying to dress this guy but won't let me drag and drop anything on him. Is there a command to do this? Also, are you only able to put artifacts on him or are you able to give him what equipment you desire?

Was kinda thinking maybe looking into the possibility of tweaking it so that at level 1 he can wear just clothing, level 2 leather armour... you get the idea.

NOTE: Never mind on the equiping thing. Should have paid more attention to the drag and drop. :p sorry, I'll keep playing around though. I think its a really great script!
 

sadoul

Wanderer
Bug Fix

Here is to fix the undress dismount bug. On line 255 in the speech command part.
Change this
Code:
					if (!( item is Container ) && item.Layer != Layer.FacialHair && item.Layer != Layer.Hair )
					{
						item.Movable = true;
						from.AddToBackpack( item );
					}

To this:
Code:
					if (!( item is Container ) && item.Layer != Layer.FacialHair && item.Layer != Layer.Hair && !( item is IMountItem ) )
					{
						item.Movable = true;
						from.AddToBackpack( item );
					}

All I added was this: && !( item is IMountItem ) ) so when it checks each bag in the backpack, dont take it off if it's a mount.

Virgil: Once he reaches stage 6, you can put anything you want on him if it's Clothing, Armor, or Weapon. You could modify the OnDragDrop method so you can drop anything. I was going to do it later but I don't have the time anymore.
 

Virgil

Wanderer
Ok, couple things I've noticed, not sure if they are intentional..

When your Merc first goes to attack something, he seems to perform a special move or something.. Where is this located in the script? Looked all over but can't seem to find where that is occuring..

Next, I think this should be an easy fix, but when you do a "Stats" and look up the skills, it does not display all of his combat skills. Not sure if this is a UO design, it does appear I could probably enter in the remaining information there but I'll have to play around with it some.

As it shows now:

Wrestling
Tactics
Magic Resistance
Anatomy
Poisoning
 

Draxus

Wanderer
Awsome Idea... this is what I have been looking for in a merc base system... I use the Evo Dragons... and will def use this... I havent noticed any bugs yet, but I'll keep ya posted Thx


Edit:
Idea- Why not have mating?? I think it would be kinda funny to have the Mercs "Lay eggs" hehe

I'm also curious as to that effect they do just before they attack... what exactly is that they are doing?? I looked through the scripts but didn't see anything on it :confused: Maybe I overlooked it??
 

Virgil

Wanderer
Where do you find where it tells the number that matches the skills? Such as in the example:

AddHtmlLocalized( 153, 186, 160, 18, 1044087, LabelColor, false, false ); // Tactics
AddHtml( 320, 186, 35, 18, FormatSkill( c, SkillName.Tactics ), false, false );


Where 1044087 is the number in relation to the skill Tactics?

Is there a list somewhere?
 

Draxus

Wanderer
Ok, I noticed one bug. It crashed my server... I'm sure its not something that will happen often but when a players releases the Merc.. and it JUST SO HAPPENS to lvl from 5 to 6... the shard crashes, I just happened on this messing around with it... I'm guessing its because at lvl 6 the merc is trying to take on its owners name in the title such as..."Merios, Servent of Calémir"

Heres my crash log
PHP:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Mobiles.EvoMerc.OnGaveMeleeAttack(Mobile defender)
   at Server.Items.BaseWeapon.OnHit(Mobile attacker, Mobile defender)
   at Server.Items.BaseSword.OnHit(Mobile attacker, Mobile defender)
   at Server.Items.BaseWeapon.OnSwing(Mobile attacker, Mobile defender)
   at Server.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)

Its not something major, mainly because I am sure a player won't release their merc just before its about to lvl to its final stage :rolleyes:
But I would just like to point it out just incase
 

Raelis

Sorceror
Draxus said:
Ok, I noticed one bug. It crashed my server... I'm sure its not something that will happen often but when a players releases the Merc.. and it JUST SO HAPPENS to lvl from 5 to 6... the shard crashes, I just happened on this messing around with it... I'm guessing its because at lvl 6 the merc is trying to take on its owners name in the title such as..."Merios, Servent of Calémir"

Heres my crash log
PHP:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Mobiles.EvoMerc.OnGaveMeleeAttack(Mobile defender)
   at Server.Items.BaseWeapon.OnHit(Mobile attacker, Mobile defender)
   at Server.Items.BaseSword.OnHit(Mobile attacker, Mobile defender)
   at Server.Items.BaseWeapon.OnSwing(Mobile attacker, Mobile defender)
   at Server.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)

Its not something major, mainly because I am sure a player won't release their merc just before its about to lvl to its final stage :rolleyes:
But I would just like to point it out just incase


All you'd have to to is put this code in where it has it setting it's title to it's controler's name

if ( ControlMaster != null )
 

sadoul

Wanderer
Bug Fix

Fixed the bug where it crashes if master is null.

I changed this on line 1043:

Code:
	this.Title = ", Servant of " + this.ControlMaster.Name + "";

To this:

Code:
	if ( this.ControlMaster != null )
	{
		this.Title = ", Servant of " + this.ControlMaster.Name + "";
	}

Thanks Draxus. Also, the special move he does is the same as the dragon. It's the Breath method, around line 1285 and 1307. Except I think I changed it to a different effect. I think I tried changing it to the whirlwind graphic but I never finished working with it.

Virgil: Yes, I never finished the stats thing. It's what you were talking about with the internalized numbers. I just never finished it. Sorry man.
 

Virgil

Wanderer
Question here...

Been playing around with this a bunch. Did my tweaking to fit more my taste. I know many like to have this ultimate warrior going out and doing all the fighting for you, but I perfer a more lower then you type aid.

So, I tuned him down a ton... Now here is where the problem comes in..

With how the current script is, your mercenary is starting out doing around 11 to 17 damage to whatever he attacks. However, they as they are now are not set to be equipped until they reach a higher level..

One they do reach that higher level they are doing around, 26 to 32 damage.

This is what I am assuming...

Now, since I lowered him down a bit, he is not doing high amount of damage. Beging level does from 2 to 10 damage.. This I was assuming he would do with just his hands, but reguardless of what weapon they have, he still does that much damage.

So... Not really sure the point in equiping them unless its just for show. Something I am doing wrong? Even tested this with makign a weapon that did 100 damage and still he was only hitting for around 10..
 

pauln375

Sorceror
Quick question

Did I miss something in here somewhere I love tis script but what happens when a player wants to log off for a while or sometimes a day or so how do they keep there merc or do they have to restart next time ?
 
Top