servuo/Scripts/Mobiles/Normal/ClanSS.cs
pyro17 bebc100d6c
Ranger Equipment fix, Additem delete (#5012)
* Ranger Equipment fix, Additem delete
- add parameter with default value to AddItem
- On Conflict, still log conflict, but delete the conflicting Item by default

- Delete the base boots of Rangers befor adding the new boots

* Updated Mobile Scripts

- went through all scripts to update them to SetWearable
- reverted change to AddItem

* Update to SetWearable

- last item being set will be worn (if no override to OnEquip returns false
- delete the item on the layer that is the same as the new item (if existend)
- used ifs to cap item.Movable, therefor no need to call to Random if <= 0 or >= 1

* Update base InitOutFit

- replaced the Additem for Backpack with SetWearable, Movable is getting set this way too
- altered the other SetWearable calls, to allow the items to be moved / dropped (as they should normally)

* Null reference sanity check.

Co-authored-by: Voxpire <admin@vita-nex.com>
2022-06-16 04:44:54 +01:00

70 lines
1.9 KiB
C#

using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan scratch scrounger corpse")]
public class ClanSS : BaseCreature
{
[Constructable]
public ClanSS()
: base(AIType.AI_Archer, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "Clan Scratch Scrounger";
Body = 0x8E;
BaseSoundID = 437;
SetStr(97, 100);
SetDex(98, 100);
SetInt(45, 50);
SetHits(135);
SetDamage(4, 5);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 25, 30);
SetResistance(ResistanceType.Fire, 20, 25);
SetResistance(ResistanceType.Cold, 49, 55);
SetResistance(ResistanceType.Poison, 10, 20);
SetResistance(ResistanceType.Energy, 10, 20);
SetSkill(SkillName.Anatomy, 51.5, 55.5);
SetSkill(SkillName.MagicResist, 65.1, 90.0);
SetSkill(SkillName.Tactics, 59.1, 65.0);
SetSkill(SkillName.Wrestling, 72.5, 75.0);
Fame = 6500;
Karma = -6500;
SetWearable(new Bow(), dropChance: 1);
}
public ClanSS(Serial serial)
: base(serial)
{
}
public override bool CanRummageCorpses => true;
public override int Hides => 8;
public override HideType HideType => HideType.Spined;
public override int TreasureMapLevel => 2;
public override void GenerateLoot()
{
AddLoot(LootPack.Rich, 2);
AddLoot(LootPack.LootItem<Arrow>(Utility.RandomMinMax(50, 70)));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}