[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;
if (item.Stackable)
{
Drop(this, Point3D.Zero);
}
good job unblestUpdated 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.
Thanks. I managed to make stackables to stack using TryDropItem method but it misses that awesome gold wiping visual effect.good job unblest
This is the same as the classic squire system, but I added several spells, it was not just me it was a several people to that helped, but it works great.
there is a sound thing but it doesn't sound like those gold-chimes, sadly. also no sound when auto-looting to prevent spammingthat unicorn tho hahaha. when squire pick up the gold is there any sound?
You need to edit Scripts/Skills/Discordance.cs to make it work with Squire modLove 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.
namespace Server.SkillHandlers
{
public class Discordance
{
public static Dictionary<Mobile, DiscordanceInfo> m_Table = new Dictionary<Mobile, DiscordanceInfo>();
public static void ProcessDiscordance(DiscordanceInfo info)
{
Mobile from = info.m_From;
Mobile targ = info.m_Target;
public class DiscordanceInfo
{
public readonly Mobile m_From;
public readonly Mobile m_Target;
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);
Are you using custom items called LightningStrike? If that's the case try specifying new LightningStrike() in 1895 to something like new Bushido.LightningStrike()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
I will add to main link thanksMade 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.
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.Getting this in the ServUO console when Squire tries to cast Chiv spells
View attachment 20693
I will add this to main download.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.
Updated with latest fixed version applied by unblest
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.
Ok let me test coincedently I have just started a new server on Publish 57, I will test.I have pub57
it does already, after some if else conditions there's this codeYou would have to modify the way that works. After prompted to res it sends a gump for a response. Hope that helps.
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 if (m.Alive)
{
this.Caster.SendLocalizedMessage(501041); // Target is not dead.
}
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.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.
We use essential cookies to make this site work, and optional cookies to enhance your experience.