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!

OSI based Hirable NPCs

psz

Administrator
OSI Based Hirable NPCs

Summary:
A series of NPCs you can hire to train with, to protect you, or to just wander around with. These are all found on OSI.

Description:
Based on bobsmart's final version of BaseHire.cs (The working version), these are the NPCs I created that he added to his worldfile, as well as some newer ones I found on OSI afterwards.

They are:

Bard
Beggar
Figher
Mage
Paladin (Does not use Paladin Spells... Unverified on OSI)
Ranger
Sailor
Thief

Their stats are based on the stats from the AOS Strategy Guide by Prima.
As per OSI, they cannot be command to drop gold/items. Also as per OSI, when they die, they have a set amount of gold on them, but all weapons, armour, clothing, etc disapears.

This set includes the basehire.cs file created by bobsmart.

*NOTE* Even after running the RebuildCategorization command, these will *NOT* show up in the add menu.

Installation:
Unzip the file into your Scripts\Custom\Mobiles\Hirables folder (If you do not have this folder, create it)

To use in game with [add or a spawner, the NPCs are known as the following:

Bard (Melee version): HireBard
Bard (Archer version): HireBardArcher
Beggar: HireBeggar
Figher: HireFighter
Mage: HireMage
Paladin: HirePaladin
Ranger (Melee version): HireRanger
Ranger (Archer version): HireRangerArcher
Sailor: HireSailor
Thief: HireThief
 

Attachments

  • Hirables.zip
    13.8 KB · Views: 775

nerun

Sorceror
A player can Hire any of those hirelings and say all kill too kill another player, and the hireling do not become Criminal... players are using it to kill players in the mines without become criminals or murderers... i think this is wrong...
 

psz

Administrator
I'll take a look at it if/when I get a chance... Probably nothing more than needing to see how pets are handled in similar situations, and setting it in the BaseHire.
 

psz

Administrator
nix4 said:
Do these guys still obey the Drop All Command...thus dropping the money you paid them with?

I posted a fix for this in the bugs forum. I'll repost it here.

This is in BaseAI.cs
Code:
// Don't let any BaseHire mobile drop their possessions
if( m_Mobile is BaseHire )
{
m_Mobile.Say( 1042494 ); // I shall not drop my possessions!
m_Mobile.ControlTarget = null;
m_Mobile.ControlOrder = OrderType.None;
return true;
}

It goes after
Code:
public virtual bool DoOrderDrop()
{
if ( m_Mobile.Summoned )
return true;

and before

Code:
m_Mobile.DebugSay( "I drop my stuff for my master" );

Container pack = m_Mobile.Backpack;

if ( pack != null )
 

nix4

Wanderer
Hrmm..this is a fix however the Hireling DO grab stuff thats loot and this would prevent players from taking their gold after payment but wouldnt stop the Hireling from grabbing loot.

What about the code where they recieve payment. Right after they become tame, have the gold they recieve be removed from their pack.
 

psz

Administrator
Code:
        public virtual bool Payday( BaseHire m ) 
        { 
            m_Pay = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactics].Value; 
            m_Pay += (int)m.Skills[SkillName.Macing].Value + (int)m.Skills[SkillName.Swords].Value; 
            m_Pay += (int)m.Skills[SkillName.Fencing].Value + (int)m.Skills[SkillName.Archery].Value; 
            m_Pay += (int)m.Skills[SkillName.MagicResist].Value + (int)m.Skills[SkillName.Healing].Value; 
            m_Pay += (int)m.Skills[SkillName.Magery].Value + (int)m.Skills[SkillName.Parry].Value;
		m_Pay /= 35; 
		m_Pay += 1;
            return true; 
        }


There.
 
H

hudel

Guest
Nice idea. I'll try them on my homeshard. :)
One Question: Are the changes that you explained in the Thread included in the DL-file?
 

Grae

Wanderer
No big deal or anything, but I have also noticed that some of the Hireables, the ones that wear armour don't wear thier Armour Leggings, be it Platemail or Studded Leather. Instead they are wearing thier default shortpants or a skirt (if female).

Code:
 [Constructable] 
        public Hirepaladin()
        { 
            SpeechHue = Utility.RandomDyedHue(); 
            Hue = Utility.RandomSkinHue(); 

            if ( this.Female = Utility.RandomBool() ) 
            { 
                Body = 0x191; 
                Name = NameList.RandomName( "female" ); 

		[b]switch ( Utility.Random ( 2 ) )
		{
			case 0: AddItem( new Skirt ( Utility.RandomNeutralHue() ) ); break;
			case 1: AddItem( new Kilt ( Utility.RandomNeutralHue() ) ); break;
		}[/b]
            } 
            else 
            { 
                Body = 0x190; 
                Name = NameList.RandomName( "male" ); 
                [b]AddItem( new ShortPants( Utility.RandomNeutralHue() ) ); [/b]
            }

You left in some code that should'nt be there. To make them wear their Leggings correctly I made these adjustments. From above remove the Bolded to look like below.

Code:
 public HirePaladin()
        { 
            SpeechHue = Utility.RandomDyedHue(); 
            Hue = Utility.RandomSkinHue(); 

            if ( this.Female = Utility.RandomBool() ) 
            { 
                Body = 0x191; 
                Name = NameList.RandomName( "female" ); 
            } 
            else 
            { 
                Body = 0x190; 
                Name = NameList.RandomName( "male" ); 
            }

This needs to be done to all that wear armour (ie. hirefighter, hirepaladin, hireranger, hirerangerarcher). Like I said no big deal.

Keep up the good work.

Regards,
Grae
 
Top