unblest

Member
This is incredible! gonna test it out asap
Post automatically merged:

in SquireTargets.cs, it needs to be
change Contains to ContainsKey:
else if ( Discordance.m_Table.ContainsKey( targ ) )
 
Last edited:
It crashes my server on startup. I will try to figure why it crashes. As it tries to load, the red errors popup and ServUO crashes. There is not chance to see the errors, and it does not make a crash log. Which is the same thing the old squire system files do...
 
Beware this version of squires are quite powerful compared from original version you might wanna tone it down if anyone's going to use it!
C#:
        [Constructable]
        public Squire() : base( AIType.AI_Paladin, FightMode.Closest, 10, 1, 0.2, 0.4 )
        {
            SpeechHue = Utility.RandomDyedHue();
            Nickname = "Master";
            SNickname = "Squire";
            
            IsBonded = true;
            ControlSlots = 3;
            
            m_AutoUseHealthPotion = true;
            m_AutoUseCurePotion = true;
            m_AutoHealSelf = true;
            m_AutoHealMaster = true;
            m_AutoHealOther = true;
            m_AutoPickupAmmo = true;
            m_DesperateMasterRun = true;
            
            SetStr( 700, 800 );
            SetDex( 200, 250 );
            SetInt( 300, 350 );
            
            SetSkill( SkillName.Wrestling, 20.0, 30.0 );
            SetSkill( SkillName.Anatomy, 20.0, 30.0 );
            SetSkill( SkillName.Tactics, 20.0, 30.0 );
            SetSkill( SkillName.Swords, 20.0, 30.0 );
            SetSkill( SkillName.Macing, 20.0, 30.0 );
            SetSkill( SkillName.Fencing, 20.0, 30.0 );
            SetSkill( SkillName.Archery, 20.0, 30.0 );
            SetSkill( SkillName.MagicResist, 20.0, 30.0 );
            SetSkill( SkillName.Chivalry, 20.0, 30.0 );
            SetSkill( SkillName.Bushido, 20.0, 30.0 ); //Rafa Added
            SetSkill( SkillName.Necromancy, 20.0, 30.0 ); //Rafa Added

            SetResistance( ResistanceType.Physical,50, 60 );
            SetResistance( ResistanceType.Fire, 50, 60 );
            SetResistance( ResistanceType.Cold, 50, 60 );
            SetResistance( ResistanceType.Poison, 50, 60 );
            SetResistance( ResistanceType.Energy, 50, 60 );
            
            Skills.Cap = 50000;
            StatCap = 2000;
Post automatically merged:

Also be sure to override getter methods for HitsMax, StamMax, ManaMax if you're going to give them with these stat boosts
Post automatically merged:

and also add || item is BaseTalisman in squire.cs line if you're planning to give them
 
Last edited:
Fixed some stuffs and added a functionality.

squiretargets.cs : changed Contains method to call ContainsKey so it compiles now
ss_innkeeper.cs and roomattendant.cs : they correctly take gold from bank
squiregump.cs : fixed where a text would overflow gump window
squire.cs :
added usable auto use vampiric embrace (only GMs can set this to true for now)
increased Ankh detect range from 2 to 8 (although Squires don't require any kind of reagent including tithe)
fixed bug where the squire was supposed to say amount of gold he tithed but didn't
 

Attachments

  • RoomAttendant.cs
    35.8 KB · Views: 12
  • Squire.cs
    201.3 KB · Views: 16
  • SS_InnKeeper.cs
    9.7 KB · Views: 12
  • SquireGump.cs
    101.4 KB · Views: 14
  • SquireTargets.cs
    73.2 KB · Views: 22
Updated some stuffs on my own
with the addition to the above, added auto loot feature that loots stuffs from corpses and ground. See the pic below.
autoloot.gif
Auto loot only picks up gold and treasure maps
TODO: add pickup reagents option

and added option to only loot gold and treasure maps when looting with the command "loot all" and "grab all"

Also updated the gump
Cap 2020-03-31 02-55-26-773.jpg
Post automatically merged:

I also have a question to ask. I tried like code below so when the squire picks up stackable items they actually stack in squire's back pack, but couldn't get it done. Can anybody tell me how to do this?
C#:
if (item.Stackable)
{
    Drop(this, Point3D.Zero);
}
Post automatically merged:

Forgot to mention you have to modify corpses.cs to make auto loot from corpses work. Instruction is written in squire.cs file.
 

Attachments

  • Squire System.zip
    99.2 KB · Views: 34
Last edited:
Updated some stuffs on my own
with the addition to the above, added auto loot feature that loots stuffs from corpses and ground. See the pic below.
View attachment 14995
Auto loot only picks up gold and treasure maps
TODO: add pickup reagents option

and added option to only loot gold and treasure maps when looting with the command "loot all" and "grab all"

Also updated the gump
View attachment 14996
Post automatically merged:

I also have a question to ask. I tried like code below so when the squire picks up stackable items they actually stack in squire's back pack, but couldn't get it done. Can anybody tell me how to do this?
C#:
if (item.Stackable)
{
    Drop(this, Point3D.Zero);
}
Post automatically merged:

Forgot to mention you have to modify corpses.cs to make auto loot from corpses work. Instruction is written in squire.cs file.
good job unblest
 
good job unblest
Thanks. I managed to make stackables to stack using TryDropItem method but it misses that awesome gold wiping visual effect.
I guess its either visual effect of gold being wiped or convenience that I'd have to choose between (which is clear)
 
Updated and fixed some more bugs:
  • Inn keepers and room attendants finally correctly checks and withdraws from bank
  • Fixed auto casting of vampiric embrace, it now correctly calls TransformationSpellHelper.UnderTransformation method
  • Now you can specify the type of item a squire would loot, currently only supports gold, treasure maps and zoogi fungus
  • Changed Squire's AI that they would never flee. NEVER.
  • Turned SmartAI boolean true. Not sure what it does though.
  • Squires now correctly changes its AI if its given a ranged weapon, and correctly changes back to using melee.
  • Converted getter methods to use => because ServUO is doing this :D
  • Removed all the era checks for the same reason right above
 

Attachments

  • Squire System.zip
    99.9 KB · Views: 29
Oh and forgot to add Convenient Stackables option is that if turned on, squire will try to stack stackable items in his backpack. If off, will just loot items pile by pile, without stacking it inside his backpack.
 
Love those looting changes. The stacking of gold is a big help.
I am having an issue with compiling the script (the original as well). The SquireTarget.cs is giving discord issues. I simply remarked out those lines and it works. Not sure what/why but my squire does not use discord, so did not really look into it. Anyone else having issues with these lines though?


Errors:
+ Customs/Mobiles/Squire System/Other/SquireTargets.cs:
CS0122: Line 911: 'Discordance.m_Table' is inaccessible due to its protectio
n level
CS0122: Line 990: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 990: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 991: 'Discordance.DiscordanceInfo.m_Timer' is inaccessible due
to its protection level
CS0122: Line 991: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 991: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 991: 'Discordance.ProcessDiscordance(Discordance.DiscordanceInf
o)' is inaccessible due to its protection level
CS0122: Line 993: 'Discordance.m_Table' is inaccessible due to its protectio
n level
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Love those looting changes. The stacking of gold is a big help.
I am having an issue with compiling the script (the original as well). The SquireTarget.cs is giving discord issues. I simply remarked out those lines and it works. Not sure what/why but my squire does not use discord, so did not really look into it. Anyone else having issues with these lines though?


Errors:
+ Customs/Mobiles/Squire System/Other/SquireTargets.cs:
CS0122: Line 911: 'Discordance.m_Table' is inaccessible due to its protectio
n level
CS0122: Line 990: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 990: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 991: 'Discordance.DiscordanceInfo.m_Timer' is inaccessible due
to its protection level
CS0122: Line 991: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 991: 'Discordance.DiscordanceInfo' is inaccessible due to its p
rotection level
CS0122: Line 991: 'Discordance.ProcessDiscordance(Discordance.DiscordanceInf
o)' is inaccessible due to its protection level
CS0122: Line 993: 'Discordance.m_Table' is inaccessible due to its protectio
n level
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
You need to edit Scripts/Skills/Discordance.cs to make it work with Squire mod
1.
private to public:
namespace Server.SkillHandlers
{
    public class Discordance
    {
        public static Dictionary<Mobile, DiscordanceInfo> m_Table = new Dictionary<Mobile, DiscordanceInfo>();

2.
private to public:
        public static void ProcessDiscordance(DiscordanceInfo info)
        {
            Mobile from = info.m_From;
            Mobile targ = info.m_Target;

3.
private to public:
        public class DiscordanceInfo
        {
            public readonly Mobile m_From;
            public readonly Mobile m_Target;


These changes should make it compile
Post automatically merged:

also to enable auto loot and looting from corpses in general modify following method in items/corpses/corpses.cs
add highlighted lines in that function:
public bool IsCriminalAction(Mobile from)
        {
            if (from == m_Owner || from.AccessLevel >= AccessLevel.GameMaster)
            {
                return false;
            }

            if (!GetFlag(CorpseFlag.LootCriminal))
                return false;

            Party p = Party.Get(m_Owner);           

            if (p != null && p.Contains(from))
            {
                PartyMemberInfo pmi = p[m_Owner];

                if (pmi != null && pmi.CanLoot)
                {
                    return false;
                }
            }

            // Pet gets looting rights starts here
            if (from is BaseCreature && ((BaseCreature)from).Controlled
             && !IsCriminalAction(((BaseCreature)from).ControlMaster))
                return false;
            // Pet gets looting rights ends here

            return (NotorietyHandlers.CorpseNotoriety(from, this) == Notoriety.Innocent);
 
Last edited:
hello, sorry but if I wanted to put it down or leave it as I do? if I do the release, the server crashes.

also, I had to remove the whole section of the LightningStrike otherwise the server would go wrong with the following message.

+ added / Squire System / Mobiles / Squire.cs:
CS0104: Line 1889: 'LightningStrike' is an ambiguous reference between 'Server.Spells.Bushido.LightningStrike' and 'Server.Items.LightningStrike'
Scripts: One or more scripts failed to compile or no script files were found.

Thanks
Post automatically merged:

hello unblest,
when i release the NPC , the server crash and report:
Exception:
System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.
in Server.Mobiles.Squire.OnThink() in C:\EXE\ServUO-master4\Scripts\aggiunti\Squire System\Mobiles\Squire.cs:riga 3228
in Server.Mobiles.BaseAI.AITimer.OnTick() in C:\EXE\ServUO-master4\Scripts\Mobiles\AI\BaseAI.cs:riga 3082
in Server.Timer.Slice() in C:\EXE\ServUO-master4\Server\Timer.cs:riga 409
in Server.Core.Main(String[] args) in C:\EXE\ServUO-master4\Server\Main.cs:riga 673
 
Last edited:
hello, sorry but if I wanted to put it down or leave it as I do? if I do the release, the server crashes.

also, I had to remove the whole section of the LightningStrike otherwise the server would go wrong with the following message.

+ added / Squire System / Mobiles / Squire.cs:
CS0104: Line 1889: 'LightningStrike' is an ambiguous reference between 'Server.Spells.Bushido.LightningStrike' and 'Server.Items.LightningStrike'
Scripts: One or more scripts failed to compile or no script files were found.

Thanks
Post automatically merged:

hello unblest,
when i release the NPC , the server crash and report:
Exception:
System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.
in Server.Mobiles.Squire.OnThink() in C:\EXE\ServUO-master4\Scripts\aggiunti\Squire System\Mobiles\Squire.cs:riga 3228
in Server.Mobiles.BaseAI.AITimer.OnTick() in C:\EXE\ServUO-master4\Scripts\Mobiles\AI\BaseAI.cs:riga 3082
in Server.Timer.Slice() in C:\EXE\ServUO-master4\Server\Timer.cs:riga 409
in Server.Core.Main(String[] args) in C:\EXE\ServUO-master4\Server\Main.cs:riga 673
Are you using custom items called LightningStrike? If that's the case try specifying new LightningStrike() in 1895 to something like new Bushido.LightningStrike()
There is no item called LightningStrike in Servuo distro AFAIK so this must be a namespace conflict coming from your custom item

And for that crash when released here's the fixed script.
Also fixed squire auto casting Vampiric Embrace and auto looting when not alive
 

Attachments

  • Squire System.zip
    100.1 KB · Views: 39
Hello guys,just posting the newest updates fixed to get runing in the old repo:
 

Attachments

  • Squire System for old repo.rar
    89.7 KB · Views: 37
```
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.Squire.OnThink() in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Scripts\Custom\New Systems\Squire System\Mobiles\Squire.cs:line 3224
at Server.Mobiles.BaseAI.AITimer.OnTick() in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Scripts\Mobiles\AI\BaseAI.cs:line 3082
at Server.Timer.Slice() in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Server\Timer.cs:line 409
at Server.Core.Main(String[] args) in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Server\Main.cs:line 673```
 
last couple days been searching high and low for a fix and even have tried seeking some help maybe someone here that has worked on this can help me


Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.Squire.OnThink() in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Scripts\Custom\New Systems\Squire System\Mobiles\Squire.cs:line 3228
at Server.Mobiles.BaseAI.AITimer.OnTick() in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Scripts\Mobiles\AI\BaseAI.cs:line 3082
at Server.Timer.Slice() in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Server\Timer.cs:line 409
at Server.Core.Main(String[] args) in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Server\Main.cs:line 673


line 3228 : Item healthPotion = Backpack.FindItemByType(typeof(BaseHealPotion));
 
I am using ServUO Pub 57. I am testing as the admin. I get the squire from the deed and set what i want using the spyglass. For some reason when it goes and attacks a mob it comes back, turns grey and attacks me. What am I missing?

Just a note. If i set myself to invul and let the squire kill a mongbat it comes back and i set myself to mortal and all is good. Even bringing up other mobs it doesnt attack and it stays grey.
 
Last edited:
Got this error: Errors:
+ CUSTOM/New Systems/Squire System V1.9.7/Squire System/Mobiles/Squire.cs:
CS0117: Line 658: 'Server.Spells.SkillMasteries.InvigorateSpell' does not contain a definition for 'GetHPBonus'
Scripts: One or more scripts failed to compile or no script files were found.
 
Made some changes so it would compile with latest git repo
- Squire.cs: added some Backpack sanity checks here and there
- SBSS_Innkeeper.cs: removed era check
- SquireTargets.cs: Reflected changes to stealing.cs regarding VvV Sigil system
- SquireDialogue.cs: Initially thought to make changes there too but decided not to touch anything

So the code compiles, throws up some warnings because the code is not clean but should compile,
but didn't do any testing in game though, so use with caution.
 

Attachments

  • Squire System.zip
    99.1 KB · Views: 52
Also note that you need to edit Discordance.cs and Corpse.cs as written in instructions above for the script not to crash
 
Made some changes so it would compile with latest git repo
- Squire.cs: added some Backpack sanity checks here and there
- SBSS_Innkeeper.cs: removed era check
- SquireTargets.cs: Reflected changes to stealing.cs regarding VvV Sigil system
- SquireDialogue.cs: Initially thought to make changes there too but decided not to touch anything

So the code compiles, throws up some warnings because the code is not clean but should compile,
but didn't do any testing in game though, so use with caution.
I will add to main link thanks
 
another update here when using the up down and lock on busido chivary and necromancy they are all applied on the same button 1,25 so only one will take the effects of the three the button needs to match the case #
 
Wondering if someone can help me out with this, all my text is showing as black but if I check the HTML color codes they shouldn't be, any ideas?
1654471409361.png
Changed the gump BG on this so you could see it a little better..
1654471457712.png

The white text in the second image is pulling the LableColor, which is not white it's set to a bluish hue..
 
Getting this in the ServUO console when Squire tries to cast Chiv spells
View attachment 20693
What version of SERVUO do you have? they must have change the way spells are cast. I was absent for some time but I am back.
Made some changes so it would compile with latest git repo
- Squire.cs: added some Backpack sanity checks here and there
- SBSS_Innkeeper.cs: removed era check
- SquireTargets.cs: Reflected changes to stealing.cs regarding VvV Sigil system
- SquireDialogue.cs: Initially thought to make changes there too but decided not to touch anything

So the code compiles, throws up some warnings because the code is not clean but should compile,
but didn't do any testing in game though, so use with caution.
I will add this to main download.
 
Last edited:
did anyone manage to resurrect a squire with magery? It looks like it can only be ressed by healing right now.
Thanks!
 
You would have to modify the way that works. After prompted to res it sends a gump for a response. Hope that helps.
 
You would have to modify the way that works. After prompted to res it sends a gump for a response. Hope that helps.
it does already, after some if else conditions there's this code

C#:
else if (this.CheckBSequence(m, true))
            {
                SpellHelper.Turn(this.Caster, m);

                m.PlaySound(0x214);
                m.FixedEffect(0x376A, 10, 16);

                m.CloseGump(typeof(ResurrectGump));
                m.SendGump(new ResurrectGump(m, this.Caster));
            }

looks like it sends a gump.
The message I'm getting is Target is not dead
Looking at the spell script this is the code checking the condition
C#:
else if (m.Alive)
            {
                this.Caster.SendLocalizedMessage(501041); // Target is not dead.
            }

I just commented this out but I get a new error telling Target is not close enough
It's just the next condition checked by the code.

I don't know if there are other ways to resurrect the squire but the healing skill.
thanks!
 
So make sure it's checking for the type your targeting remove the gump prompt and override it with the next step
else if (this.CheckBSequence(m, true))
{
SpellHelper.Turn(this.Caster, m);

m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);

m.CloseGump(typeof(ResurrectGump));
m.SendGump(new ResurrectGump(m, this.Caster));
else (this == Squire)
{
If (Alive == false)
Alive == true
else
m.sendmessage("that is already alive");
}
}


Something like this could work its very basic and not tested.
 
Last edited:
So make sure it's checking for the type your targeting remove the gump prompt and override it with the next step
else if (this.CheckBSequence(m, true))
{
SpellHelper.Turn(this.Caster, m);

m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);

m.CloseGump(typeof(ResurrectGump));
m.SendGump(new ResurrectGump(m, this.Caster));
else (this == Squire)
{
If (Alive == false)
Alive == true
else
m.sendmessage("that is already alive");
}
}


Something like this could work its very basic and not tested.
you just set it alive if it's a squire, no more gumps... It can work, thanks for the tip, I'll give it a try this evening.
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back