Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
53
Scripts/Multis/Camps/BankerCamp.cs
Normal file
53
Scripts/Multis/Camps/BankerCamp.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class BankerCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public BankerCamp()
|
||||
: base(0x1F6)
|
||||
{
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public BankerCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
BaseDoor west, east;
|
||||
|
||||
this.AddItem(west = new LightWoodGate(DoorFacing.WestCW), -4, 4, 7);
|
||||
this.AddItem(east = new LightWoodGate(DoorFacing.EastCCW), -3, 4, 7);
|
||||
|
||||
west.Link = east;
|
||||
east.Link = west;
|
||||
|
||||
this.AddItem(new Sign(SignType.Bank, SignFacing.West), -5, 5, -4);
|
||||
|
||||
this.AddMobile(new Banker(), -4, 3, 7);
|
||||
this.AddMobile(new Banker(), 4, -2, 0);
|
||||
|
||||
SetDecayTime();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
335
Scripts/Multis/Camps/BaseCamp.cs
Normal file
335
Scripts/Multis/Camps/BaseCamp.cs
Normal file
@@ -0,0 +1,335 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public abstract class BaseCamp : BaseMulti
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), OnTick);
|
||||
}
|
||||
|
||||
public static List<BaseCamp> _Camps = new List<BaseCamp>();
|
||||
|
||||
private List<Item> m_Items;
|
||||
private List<Mobile> m_Mobiles;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime TimeOfDecay { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BaseCreature Prisoner { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BaseContainer Treasure1 { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BaseContainer Treasure2 { get; set; }
|
||||
|
||||
public override bool HandlesOnMovement
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public virtual TimeSpan DecayDelay { get { return TimeSpan.FromMinutes(30.0); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Decaying { get { return TimeOfDecay != DateTime.MinValue; } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool ForceDecay
|
||||
{
|
||||
get { return false; }
|
||||
set { SetDecayTime(); }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool RestrictDecay { get; set; }
|
||||
|
||||
public BaseCamp(int multiID)
|
||||
: base(multiID)
|
||||
{
|
||||
m_Items = new List<Item>();
|
||||
m_Mobiles = new List<Mobile>();
|
||||
|
||||
Visible = false;
|
||||
|
||||
CheckAddComponents();
|
||||
_Camps.Add(this);
|
||||
}
|
||||
|
||||
public BaseCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual int EventRange
|
||||
{
|
||||
get
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckAddComponents()
|
||||
{
|
||||
if (Deleted)
|
||||
return;
|
||||
|
||||
AddComponents();
|
||||
}
|
||||
|
||||
public virtual void AddComponents()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void CheckDecay()
|
||||
{
|
||||
if (RestrictDecay)
|
||||
return;
|
||||
|
||||
if (!Decaying)
|
||||
{
|
||||
if (((Treasure1 == null || Treasure1.Items.Count == 0) && (Treasure2 == null || Treasure2.Items.Count == 0)) ||
|
||||
(Prisoner != null && (Prisoner.Deleted || !Prisoner.CantWalk)))
|
||||
{
|
||||
SetDecayTime();
|
||||
}
|
||||
}
|
||||
else if(TimeOfDecay < DateTime.UtcNow)
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SetDecayTime()
|
||||
{
|
||||
if (Deleted || RestrictDecay)
|
||||
return;
|
||||
|
||||
TimeOfDecay = DateTime.UtcNow + DecayDelay;
|
||||
}
|
||||
|
||||
public virtual void AddItem(Item item, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
if (Map == null)
|
||||
return;
|
||||
|
||||
m_Items.Add(item);
|
||||
|
||||
int zavg = this.Map.GetAverageZ(X + xOffset, Y + yOffset);
|
||||
|
||||
if (!Map.CanFit(X + xOffset, Y + yOffset, zavg, item.ItemData.Height))
|
||||
{
|
||||
for (int z = 1; z <= 39; z++)
|
||||
{
|
||||
if (Map.CanFit(X + xOffset, Y + yOffset, zavg + z, item.ItemData.Height))
|
||||
{
|
||||
zavg += z;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
item.MoveToWorld(new Point3D(X + xOffset, Y + yOffset, zavg + zOffset), Map);
|
||||
}
|
||||
|
||||
public virtual void AddMobile(Mobile m, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
if (Map == null)
|
||||
return;
|
||||
|
||||
if(!m_Mobiles.Contains(m))
|
||||
m_Mobiles.Add(m);
|
||||
|
||||
int zavg = Map.GetAverageZ(X + xOffset, Y + yOffset);
|
||||
|
||||
if (!Map.CanSpawnMobile(X + xOffset, Y + yOffset, zavg))
|
||||
{
|
||||
for (int z = 1; z <= 39; z++)
|
||||
{
|
||||
if (Map.CanSpawnMobile(X + xOffset, Y + yOffset, zavg + z))
|
||||
{
|
||||
zavg += z;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m.MoveToWorld(new Point3D(X + xOffset, Y + yOffset, zavg + zOffset), Map);
|
||||
SetCreature(m as BaseCreature);
|
||||
}
|
||||
|
||||
private void SetCreature(BaseCreature bc)
|
||||
{
|
||||
if (bc != null)
|
||||
{
|
||||
//int zavg = Map.GetAverageZ(bc.X, bc.Y);
|
||||
IPoint3D p = bc.Location; //new Point3D(bc.X, bc.Y, zavg);
|
||||
|
||||
Server.Spells.SpellHelper.GetSurfaceTop(ref p);
|
||||
|
||||
Point3D loc = new Point3D(p);
|
||||
bc.RangeHome = bc.IsPrisoner ? 0 : 6;
|
||||
bc.Home = loc;
|
||||
|
||||
if (bc.Location != loc)
|
||||
bc.Location = loc;
|
||||
|
||||
if (bc is BaseVendor || bc is Banker)
|
||||
bc.Direction = Direction.South;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnEnter(Mobile m)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnExit(Mobile m)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnLocationChange(Point3D old)
|
||||
{
|
||||
foreach (var item in m_Items)
|
||||
{
|
||||
item.Location = new Point3D(X + (item.X - old.X), Y + (item.Y - old.Y), Z + (item.Z - old.Z));
|
||||
}
|
||||
|
||||
foreach (var m in m_Mobiles)
|
||||
{
|
||||
m.Location = new Point3D(X + (m.X - old.X), Y + (m.Y - old.Y), Z + (m.Z - old.Z));
|
||||
SetCreature(m as BaseCreature);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
foreach (var item in m_Items)
|
||||
{
|
||||
item.Map = Map;
|
||||
}
|
||||
|
||||
foreach (var m in m_Mobiles)
|
||||
{
|
||||
m.Map = Map;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
bool inOldRange = Utility.InRange(oldLocation, Location, EventRange);
|
||||
bool inNewRange = Utility.InRange(m.Location, Location, EventRange);
|
||||
|
||||
if (inNewRange && !inOldRange)
|
||||
OnEnter(m);
|
||||
else if (inOldRange && !inNewRange)
|
||||
OnExit(m);
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
for (int i = 0; i < m_Items.Count; ++i)
|
||||
m_Items[i].Delete();
|
||||
|
||||
for (int i = 0; i < m_Mobiles.Count; ++i)
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)m_Mobiles[i];
|
||||
|
||||
if (!bc.IsPrisoner)
|
||||
m_Mobiles[i].Delete();
|
||||
else if (m_Mobiles[i].CantWalk)
|
||||
m_Mobiles[i].Delete();
|
||||
}
|
||||
|
||||
m_Items.Clear();
|
||||
m_Mobiles.Clear();
|
||||
_Camps.Remove(this);
|
||||
}
|
||||
|
||||
protected virtual void AddCampChests()
|
||||
{
|
||||
Treasure1 = new TreasureLevel1();
|
||||
((TreasureLevel1)Treasure1).Locked = false;
|
||||
AddItem(Treasure1, 2, 2, 0);
|
||||
|
||||
Treasure2 = new TreasureLevel3();
|
||||
AddItem(Treasure2, -2, -2, 0);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)2); // version
|
||||
|
||||
writer.Write(Prisoner);
|
||||
writer.Write(Treasure1);
|
||||
writer.Write(Treasure2);
|
||||
|
||||
writer.Write(m_Items, true);
|
||||
writer.Write(m_Mobiles, true);
|
||||
writer.WriteDeltaTime(TimeOfDecay);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
Treasure1 = reader.ReadItem() as BaseContainer;
|
||||
Treasure2 = reader.ReadItem() as BaseContainer;
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Items = reader.ReadStrongItemList();
|
||||
m_Mobiles = reader.ReadStrongMobileList();
|
||||
TimeOfDecay = reader.ReadDeltaTime();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (version == 0 && ItemID == 0x10EE)
|
||||
{
|
||||
ItemID = 0x1F6D;
|
||||
}
|
||||
|
||||
if (version == 1)
|
||||
Delete();
|
||||
|
||||
if (Prisoner != null)
|
||||
Prisoner.IsPrisoner = true;
|
||||
|
||||
_Camps.Add(this);
|
||||
}
|
||||
|
||||
public static void OnTick()
|
||||
{
|
||||
List<BaseCamp> list = new List<BaseCamp>(_Camps);
|
||||
|
||||
list.ForEach(c =>
|
||||
{
|
||||
if (!c.Deleted && c.Map != null && c.Map != Map.Internal && !c.RestrictDecay)
|
||||
c.CheckDecay();
|
||||
});
|
||||
|
||||
ColUtility.Free(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
160
Scripts/Multis/Camps/BrigandCamp.cs
Normal file
160
Scripts/Multis/Camps/BrigandCamp.cs
Normal file
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class BrigandCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public BrigandCamp()
|
||||
: base(0x1F6D)
|
||||
{
|
||||
}
|
||||
|
||||
public BrigandCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual Mobile Brigands
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Brigand();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual Mobile Executioners
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Executioner();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public override TimeSpan DecayDelay { get { return TimeSpan.FromMinutes(5.0); } }
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
Visible = false;
|
||||
|
||||
AddItem(new Static(0x10ee), 0, 0, 0);
|
||||
AddItem(new Static(0xfac), 0, 7, 0);
|
||||
|
||||
switch ( Utility.Random(3) )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
AddItem(new Item(0xDE3), 0, 7, 0); // Campfire
|
||||
AddItem(new Item(0x974), 0, 7, 1); // Cauldron
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
AddItem(new Item(0x1E95), 0, 7, 1); // Rabbit on a spit
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
AddItem(new Item(0x1E94), 0, 7, 1); // Chicken on a spit
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AddCampChests();
|
||||
|
||||
for (int i = 0; i < 4; i ++)
|
||||
{
|
||||
AddMobile(Brigands, Utility.RandomMinMax(-7, 7), Utility.RandomMinMax(-7, 7), 0);
|
||||
}
|
||||
|
||||
switch ( Utility.Random(2) )
|
||||
{
|
||||
case 0:
|
||||
Prisoner = new Noble();
|
||||
break;
|
||||
default:
|
||||
Prisoner = new SeekerOfAdventure();
|
||||
break;
|
||||
}
|
||||
|
||||
Prisoner.IsPrisoner = true;
|
||||
Prisoner.CantWalk = true;
|
||||
|
||||
Prisoner.YellHue = Utility.RandomList(0x57, 0x67, 0x77, 0x87, 0x117);
|
||||
AddMobile(Prisoner, Utility.RandomMinMax(-2, 2), Utility.RandomMinMax(-2, 2), 0);
|
||||
}
|
||||
|
||||
// Don't refresh decay timer
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
if (m.Player && Prisoner != null && Prisoner.CantWalk)
|
||||
{
|
||||
int number;
|
||||
|
||||
switch ( Utility.Random(8) )
|
||||
{
|
||||
case 0:
|
||||
number = 502261;
|
||||
break; // HELP!
|
||||
case 1:
|
||||
number = 502262;
|
||||
break; // Help me!
|
||||
case 2:
|
||||
number = 502263;
|
||||
break; // Canst thou aid me?!
|
||||
case 3:
|
||||
number = 502264;
|
||||
break; // Help a poor prisoner!
|
||||
case 4:
|
||||
number = 502265;
|
||||
break; // Help! Please!
|
||||
case 5:
|
||||
number = 502266;
|
||||
break; // Aaah! Help me!
|
||||
case 6:
|
||||
number = 502267;
|
||||
break; // Go and get some help!
|
||||
default:
|
||||
number = 502268;
|
||||
break; // Quickly, I beg thee! Unlock my chains! If thou dost look at me close thou canst see them.
|
||||
}
|
||||
Prisoner.Yell(number);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddItem(Item item, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
if (item != null)
|
||||
item.Movable = false;
|
||||
|
||||
base.AddItem(item, xOffset, yOffset, zOffset);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1: break;
|
||||
case 0:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Multis/Camps/ElfBrigandCamp.cs
Normal file
40
Scripts/Multis/Camps/ElfBrigandCamp.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class ElfBrigandCamp : BrigandCamp
|
||||
{
|
||||
[Constructable]
|
||||
public ElfBrigandCamp()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public ElfBrigandCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override Mobile Brigands
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ElfBrigand();
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Multis/Camps/HealerCamp.cs
Normal file
52
Scripts/Multis/Camps/HealerCamp.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class HealerCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public HealerCamp()
|
||||
: base(0x1F4)
|
||||
{
|
||||
}
|
||||
|
||||
public HealerCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
BaseDoor west, east;
|
||||
|
||||
this.AddItem(west = new LightWoodGate(DoorFacing.WestCW), -4, 4, 7);
|
||||
this.AddItem(east = new LightWoodGate(DoorFacing.EastCCW), -3, 4, 7);
|
||||
|
||||
west.Link = east;
|
||||
east.Link = west;
|
||||
|
||||
this.AddItem(new Sign(SignType.Healer, SignFacing.West), -5, 5, -4);
|
||||
|
||||
this.AddMobile(new Healer(), -4, 3, 7);
|
||||
this.AddMobile(new Healer(), 4, -2, 0);
|
||||
|
||||
SetDecayTime();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
187
Scripts/Multis/Camps/HumanBrigandCamp.cs
Normal file
187
Scripts/Multis/Camps/HumanBrigandCamp.cs
Normal file
@@ -0,0 +1,187 @@
|
||||
/*using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class HumanBrigandCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public HumanBrigandCamp()
|
||||
: base(0x1F6D)
|
||||
{
|
||||
}
|
||||
|
||||
public HumanBrigandCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual Mobile Camper
|
||||
{
|
||||
get
|
||||
{
|
||||
return new HumanBrigand();
|
||||
}
|
||||
}
|
||||
public override void AddComponents()
|
||||
{
|
||||
AddItem(new Item(0xFAC), 0, 0, 0); // fire pit
|
||||
AddItem(new Item(0xDE3), 0, 0, 0); // camp fire
|
||||
AddItem(new Item(0x974), 0, 0, 1); // cauldron
|
||||
|
||||
for (int i = 0; i < 2; i ++)
|
||||
{
|
||||
LockableContainer cont = null;
|
||||
|
||||
switch ( Utility.Random(3) )
|
||||
{
|
||||
case 0:
|
||||
cont = new MetalChest();
|
||||
break;
|
||||
case 1:
|
||||
cont = new WoodenChest();
|
||||
break;
|
||||
case 2:
|
||||
cont = new SmallCrate();
|
||||
break;
|
||||
}
|
||||
|
||||
cont.Movable = false;
|
||||
cont.Locked = true;
|
||||
|
||||
cont.TrapType = TrapType.ExplosionTrap;
|
||||
cont.TrapPower = Utility.RandomMinMax(30, 40);
|
||||
cont.TrapLevel = 2;
|
||||
cont.RequiredSkill = 76;
|
||||
cont.LockLevel = 66;
|
||||
cont.MaxLockLevel = 116;
|
||||
cont.DropItem(new Gold(Utility.RandomMinMax(100, 400)));
|
||||
cont.DropItem(new Arrow(10));
|
||||
cont.DropItem(new Bolt(10));
|
||||
|
||||
if (Utility.RandomDouble() < 0.8)
|
||||
{
|
||||
switch ( Utility.Random(4) )
|
||||
{
|
||||
case 0:
|
||||
cont.DropItem(new LesserCurePotion());
|
||||
break;
|
||||
case 1:
|
||||
cont.DropItem(new LesserExplosionPotion());
|
||||
break;
|
||||
case 2:
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
break;
|
||||
case 3:
|
||||
cont.DropItem(new LesserPoisonPotion());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Utility.RandomDouble() < 0.5)
|
||||
{
|
||||
Item item = Loot.RandomArmorOrShieldOrWeapon();
|
||||
|
||||
if (item is BaseWeapon)
|
||||
BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, false, 0, Utility.RandomMinMax(1, 5), 10, 100);
|
||||
else if (item is BaseArmor)
|
||||
BaseRunicTool.ApplyAttributesTo((BaseArmor)item, false, 0, Utility.RandomMinMax(1, 5), 10, 100);
|
||||
|
||||
cont.DropItem(item);
|
||||
}
|
||||
|
||||
Point3D loc = GetRandomSpawnPoint(3);
|
||||
|
||||
AddItem(cont, loc.X, loc.Y, loc.Z);
|
||||
Treasure1 = cont;
|
||||
}
|
||||
|
||||
switch ( Utility.Random(2) )
|
||||
{
|
||||
case 0:
|
||||
Prisoner = new Noble();
|
||||
break;
|
||||
case 1:
|
||||
Prisoner = new SeekerOfAdventure();
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i ++)
|
||||
{
|
||||
Point3D loc = GetRandomSpawnPoint(5);
|
||||
|
||||
AddMobile(Camper,loc.X, loc.Y, loc.Z);
|
||||
}
|
||||
|
||||
Prisoner.IsPrisoner = true;
|
||||
Prisoner.CantWalk = true;
|
||||
|
||||
Point3D p = GetRandomSpawnPoint(3);
|
||||
AddMobile(Prisoner, p.X, p.Y, p.Z);
|
||||
}
|
||||
|
||||
public override void AddItem(Item item, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
if (item != null)
|
||||
item.Movable = false;
|
||||
|
||||
base.AddItem(item, xOffset, yOffset, zOffset);
|
||||
}
|
||||
|
||||
public virtual Point3D GetRandomSpawnPoint(int range)
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
if (map == null)
|
||||
return Location;
|
||||
|
||||
// Try 10 times to find a Spawnable location.
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int x = Location.X + (Utility.Random((range * 2) + 1) - range);
|
||||
int y = Location.Y + (Utility.Random((range * 2) + 1) - range);
|
||||
int z = Map.GetAverageZ(x, y);
|
||||
|
||||
if (Map.CanSpawnMobile(new Point2D(x, y), Z))
|
||||
return new Point3D(x, y, Z);
|
||||
else if (Map.CanSpawnMobile(new Point2D(x, y), z))
|
||||
return new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
return Location;
|
||||
}
|
||||
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
base.OnEnter(m);
|
||||
|
||||
if (m.Player && Prisoner != null)
|
||||
{
|
||||
Prisoner.Yell(Utility.RandomMinMax(502261, 502268));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1: break;
|
||||
case 0:
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
152
Scripts/Multis/Camps/LizardmenCamp.cs
Normal file
152
Scripts/Multis/Camps/LizardmenCamp.cs
Normal file
@@ -0,0 +1,152 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class LizardmenCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public LizardmenCamp()
|
||||
: base(0x1F6D)
|
||||
{
|
||||
}
|
||||
|
||||
public LizardmenCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual Mobile Lizardmen
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Lizardman();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public override TimeSpan DecayDelay { get { return TimeSpan.FromMinutes(5.0); } }
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
AddItem(new Static(0x10ee), 0, 0, 0);
|
||||
AddItem(new Static(0xfac), 0, 7, 0);
|
||||
|
||||
switch ( Utility.Random(3) )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
AddItem(new Item(0xDE3), 0, 7, 0); // Campfire
|
||||
AddItem(new Item(0x974), 0, 7, 1); // Cauldron
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
AddItem(new Item(0x1E95), 0, 7, 1); // Rabbit on a spit
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
AddItem(new Item(0x1E94), 0, 7, 1); // Chicken on a spit
|
||||
break;
|
||||
}
|
||||
}
|
||||
AddItem(new Item(0x41F), 4, 4, 0); // Gruesome Standart South
|
||||
|
||||
AddCampChests();
|
||||
|
||||
for (int i = 0; i < 4; i ++)
|
||||
{
|
||||
AddMobile(Lizardmen, Utility.RandomMinMax(-7, 7), Utility.RandomMinMax(-7, 7), 0);
|
||||
}
|
||||
|
||||
switch ( Utility.Random(2) )
|
||||
{
|
||||
case 0:
|
||||
Prisoner = new Noble();
|
||||
break;
|
||||
default:
|
||||
Prisoner = new SeekerOfAdventure();
|
||||
break;
|
||||
}
|
||||
|
||||
Prisoner.IsPrisoner = true;
|
||||
Prisoner.CantWalk = true;
|
||||
|
||||
Prisoner.YellHue = Utility.RandomList(0x57, 0x67, 0x77, 0x87, 0x117);
|
||||
AddMobile(Prisoner, Utility.RandomMinMax(-2, 2), Utility.RandomMinMax(-2, 2), 0);
|
||||
}
|
||||
|
||||
// Don't refresh decay timer
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
if (m.Player && Prisoner != null && Prisoner.CantWalk)
|
||||
{
|
||||
int number;
|
||||
|
||||
switch ( Utility.Random(8) )
|
||||
{
|
||||
case 0:
|
||||
number = 502261;
|
||||
break; // HELP!
|
||||
case 1:
|
||||
number = 502262;
|
||||
break; // Help me!
|
||||
case 2:
|
||||
number = 502263;
|
||||
break; // Canst thou aid me?!
|
||||
case 3:
|
||||
number = 502264;
|
||||
break; // Help a poor prisoner!
|
||||
case 4:
|
||||
number = 502265;
|
||||
break; // Help! Please!
|
||||
case 5:
|
||||
number = 502266;
|
||||
break; // Aaah! Help me!
|
||||
case 6:
|
||||
number = 502267;
|
||||
break; // Go and get some help!
|
||||
default:
|
||||
number = 502268;
|
||||
break; // Quickly, I beg thee! Unlock my chains! If thou dost look at me close thou canst see them.
|
||||
}
|
||||
Prisoner.Yell(number);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddItem(Item item, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
if (item != null)
|
||||
item.Movable = false;
|
||||
|
||||
base.AddItem(item, xOffset, yOffset, zOffset);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Multis/Camps/MageCamp.cs
Normal file
52
Scripts/Multis/Camps/MageCamp.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class MageCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public MageCamp()
|
||||
: base(0x1F5)
|
||||
{
|
||||
}
|
||||
|
||||
public MageCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
BaseDoor west, east;
|
||||
|
||||
AddItem(west = new LightWoodGate(DoorFacing.WestCW), -4, 4, 7);
|
||||
AddItem(east = new LightWoodGate(DoorFacing.EastCCW), -3, 4, 7);
|
||||
|
||||
west.Link = east;
|
||||
east.Link = west;
|
||||
|
||||
AddItem(new Sign(SignType.Mage, SignFacing.West), -5, 5, -4);
|
||||
|
||||
AddMobile(new Mage(), -4, 3, 7);
|
||||
AddMobile(new Mage(), 4, -2, 0);
|
||||
|
||||
SetDecayTime();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
164
Scripts/Multis/Camps/OrcCamp.cs
Normal file
164
Scripts/Multis/Camps/OrcCamp.cs
Normal file
@@ -0,0 +1,164 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class OrcCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public OrcCamp()
|
||||
: base(0x1F6D)
|
||||
{
|
||||
}
|
||||
|
||||
public OrcCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual Mobile Orcs
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Orc();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public override TimeSpan DecayDelay { get { return TimeSpan.FromMinutes(5.0); } }
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
Visible = false;
|
||||
AddItem(new Static(0x10ee), 0, 0, 0);
|
||||
AddItem(new Static(0xfac), 0, 7, 0);
|
||||
|
||||
switch ( Utility.Random(3) )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
AddItem(new Item(0xDE3), 0, 7, 0); // Campfire
|
||||
AddItem(new Item(0x974), 0, 7, 1); // Cauldron
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
AddItem(new Item(0x1E95), 0, 7, 1); // Rabbit on a spit
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
AddItem(new Item(0x1E94), 0, 7, 1); // Chicken on a spit
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AddItem(new Item(0x428), -5, -4, 0); // Gruesome Standart West
|
||||
AddCampChests();
|
||||
|
||||
for (int i = 0; i < 3; i ++)
|
||||
{
|
||||
AddMobile(Orcs, Utility.RandomMinMax(-7, 7), Utility.RandomMinMax(-7, 7), 0);
|
||||
}
|
||||
AddMobile(new OrcCaptain(), Utility.RandomMinMax(-7, 7), Utility.RandomMinMax(-7, 7), 0);
|
||||
|
||||
switch ( Utility.Random(2) )
|
||||
{
|
||||
case 0:
|
||||
Prisoner = new Noble();
|
||||
break;
|
||||
default:
|
||||
Prisoner = new SeekerOfAdventure();
|
||||
break;
|
||||
}
|
||||
|
||||
Prisoner.IsPrisoner = true;
|
||||
Prisoner.CantWalk = true;
|
||||
|
||||
Prisoner.YellHue = Utility.RandomList(0x57, 0x67, 0x77, 0x87, 0x117);
|
||||
AddMobile(Prisoner, Utility.RandomMinMax(-2, 2), Utility.RandomMinMax(-2, 2), 0);
|
||||
}
|
||||
|
||||
// Don't refresh decay timer
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
if (m.Player && Prisoner != null && Prisoner.CantWalk)
|
||||
{
|
||||
int number;
|
||||
|
||||
switch ( Utility.Random(8) )
|
||||
{
|
||||
case 0:
|
||||
number = 502261;
|
||||
break; // HELP!
|
||||
case 1:
|
||||
number = 502262;
|
||||
break; // Help me!
|
||||
case 2:
|
||||
number = 502263;
|
||||
break; // Canst thou aid me?!
|
||||
case 3:
|
||||
number = 502264;
|
||||
break; // Help a poor prisoner!
|
||||
case 4:
|
||||
number = 502265;
|
||||
break; // Help! Please!
|
||||
case 5:
|
||||
number = 502266;
|
||||
break; // Aaah! Help me!
|
||||
case 6:
|
||||
number = 502267;
|
||||
break; // Go and get some help!
|
||||
default:
|
||||
number = 502268;
|
||||
break; // Quickly, I beg thee! Unlock my chains! If thou dost look at me close thou canst see them.
|
||||
}
|
||||
Prisoner.Yell(number);
|
||||
}
|
||||
}
|
||||
|
||||
// Don't refresh decay timer
|
||||
public override void OnExit(Mobile m)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddItem(Item item, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
if (item != null)
|
||||
item.Movable = false;
|
||||
|
||||
base.AddItem(item, xOffset, yOffset, zOffset);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)2); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2: break;
|
||||
case 1:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
reader.ReadItem();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
144
Scripts/Multis/Camps/PrisonerCamp.cs
Normal file
144
Scripts/Multis/Camps/PrisonerCamp.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class PrisonerCamp : BaseCamp
|
||||
{
|
||||
private BaseDoor m_Gate;
|
||||
|
||||
[Constructable]
|
||||
public PrisonerCamp() : base( 0x1D4C )
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
IronGate gate = new IronGate( DoorFacing.EastCCW );
|
||||
m_Gate = gate;
|
||||
|
||||
gate.KeyValue = Key.RandomValue();
|
||||
gate.Locked = true;
|
||||
|
||||
AddItem( gate, -2, 1, 0 );
|
||||
AddCampChests();
|
||||
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
AddMobile(new Orc(), 0, -2, 0);
|
||||
AddMobile(new OrcishMage(), 0, 1, 0);
|
||||
AddMobile(new OrcishLord(), 0, -2, 0);
|
||||
AddMobile(new OrcCaptain(), 0, 1, 0);
|
||||
AddMobile(new Orc(), 0, -1, 0);
|
||||
AddMobile(new OrcChopper(), 0, -2, 0);
|
||||
} break;
|
||||
|
||||
case 1:
|
||||
{
|
||||
AddMobile(new Ratman(), 0, -2, 0);
|
||||
AddMobile(new Ratman(), 0, 1, 0);
|
||||
AddMobile(new RatmanMage(), 0, -2, 0);
|
||||
AddMobile(new Ratman(), 0, 1, 0);
|
||||
AddMobile(new RatmanArcher(), 0, -1, 0);
|
||||
AddMobile(new Ratman(), 0, -2, 0);
|
||||
} break;
|
||||
|
||||
case 2:
|
||||
{
|
||||
AddMobile(new Lizardman(), 0, -2, 0);
|
||||
AddMobile(new Lizardman(), 0, 1, 0);
|
||||
AddMobile(new Lizardman(), 0, -2, 0);
|
||||
AddMobile(new Lizardman(), 0, 1, 0);
|
||||
AddMobile(new Lizardman(), 0, -1, 0);
|
||||
AddMobile(new Lizardman(), 0, -2, 0);
|
||||
} break;
|
||||
|
||||
case 3:
|
||||
{
|
||||
AddMobile(new Brigand(), 0, -2, 0);
|
||||
AddMobile(new Brigand(), 0, 1, 0);
|
||||
AddMobile(new Brigand(), 0, -2, 0);
|
||||
AddMobile(new Brigand(), 0, 1, 0);
|
||||
AddMobile(new Brigand(), 0, -1, 0);
|
||||
AddMobile(new Brigand(), 0, -2, 0);
|
||||
} break;
|
||||
}
|
||||
|
||||
switch ( Utility.Random( 2 ) )
|
||||
{
|
||||
case 0: Prisoner = new Noble(); break;
|
||||
case 1: Prisoner = new SeekerOfAdventure(); break;
|
||||
}
|
||||
|
||||
Prisoner.IsPrisoner = true;
|
||||
Prisoner.CantWalk = true;
|
||||
|
||||
Prisoner.YellHue = Utility.RandomList( 0x57, 0x67, 0x77, 0x87, 0x117 );
|
||||
AddMobile( Prisoner, -2, 0, 0 );
|
||||
}
|
||||
|
||||
public override void OnEnter( Mobile m )
|
||||
{
|
||||
base.OnEnter( m );
|
||||
|
||||
if ( m.Player && Prisoner != null && m_Gate != null && m_Gate.Locked )
|
||||
{
|
||||
int number;
|
||||
|
||||
switch ( Utility.Random( 10 ) )
|
||||
{
|
||||
default:
|
||||
case 0: number = 502264; break; // Help a poor prisoner!
|
||||
case 1: number = 502266; break; // Aaah! Help me!
|
||||
case 2: number = 1046000; break; // Help! These savages wish to end my life!
|
||||
case 3: number = 1046003; break; // Quickly! Kill them for me! HELP!!
|
||||
case 4: number = 502261; break; // HELP!
|
||||
case 5: number = 502262; break; // Help me!
|
||||
case 6: number = 502263; break; // Canst thou aid me?!
|
||||
case 7: number = 502265; break; // Help! Please!
|
||||
case 8: number = 502267; break; // Go and get some help!
|
||||
case 9: number = 502268; break; // Quickly, I beg thee! Unlock my chains! If thou dost look at me close thou canst see them.
|
||||
}
|
||||
|
||||
Prisoner.Yell( number );
|
||||
}
|
||||
}
|
||||
|
||||
public PrisonerCamp( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( m_Gate );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
m_Gate = reader.ReadItem() as BaseDoor;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
m_Gate = reader.ReadItem() as BaseDoor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
164
Scripts/Multis/Camps/RatCamp.cs
Normal file
164
Scripts/Multis/Camps/RatCamp.cs
Normal file
@@ -0,0 +1,164 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class RatCamp : BaseCamp
|
||||
{
|
||||
[Constructable]
|
||||
public RatCamp()
|
||||
: base(0x1F6D)// dummy garbage at center
|
||||
{
|
||||
}
|
||||
|
||||
public RatCamp(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual Mobile Ratmen
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Ratman();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public override TimeSpan DecayDelay { get { return TimeSpan.FromMinutes(5.0); } }
|
||||
|
||||
public override void AddComponents()
|
||||
{
|
||||
Visible = false;
|
||||
AddItem(new Static(0x10ee), 0, 0, 0);
|
||||
AddItem(new Static(0xfac), 0, 6, 0);
|
||||
|
||||
switch ( Utility.Random(3) )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
AddItem(new Item(0xDE3), 0, 6, 0); // Campfire
|
||||
AddItem(new Item(0x974), 0, 6, 1); // Cauldron
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
AddItem(new Item(0x1E95), 0, 6, 1); // Rabbit on a spit
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
AddItem(new Item(0x1E94), 0, 6, 1); // Chicken on a spit
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AddItem(new Item(0x41F), 5, 5, 0); // Gruesome Standart South
|
||||
|
||||
AddCampChests();
|
||||
|
||||
for (int i = 0; i < 4; i ++)
|
||||
{
|
||||
AddMobile(Ratmen, Utility.RandomMinMax(-7, 7), Utility.RandomMinMax(-7, 7), 0);
|
||||
}
|
||||
|
||||
switch ( Utility.Random(2) )
|
||||
{
|
||||
case 0:
|
||||
Prisoner = new Noble();
|
||||
break;
|
||||
default:
|
||||
Prisoner = new SeekerOfAdventure();
|
||||
break;
|
||||
}
|
||||
|
||||
Prisoner.IsPrisoner = true;
|
||||
Prisoner.CantWalk = true;
|
||||
|
||||
Prisoner.YellHue = Utility.RandomList(0x57, 0x67, 0x77, 0x87, 0x117);
|
||||
AddMobile(Prisoner, Utility.RandomMinMax(-2, 2), Utility.RandomMinMax(-2, 2), 0);
|
||||
}
|
||||
|
||||
// Don't refresh decay timer
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
if (m.Player && Prisoner != null && Prisoner.CantWalk)
|
||||
{
|
||||
int number;
|
||||
|
||||
switch ( Utility.Random(8) )
|
||||
{
|
||||
case 0:
|
||||
number = 502261;
|
||||
break; // HELP!
|
||||
case 1:
|
||||
number = 502262;
|
||||
break; // Help me!
|
||||
case 2:
|
||||
number = 502263;
|
||||
break; // Canst thou aid me?!
|
||||
case 3:
|
||||
number = 502264;
|
||||
break; // Help a poor prisoner!
|
||||
case 4:
|
||||
number = 502265;
|
||||
break; // Help! Please!
|
||||
case 5:
|
||||
number = 502266;
|
||||
break; // Aaah! Help me!
|
||||
case 6:
|
||||
number = 502267;
|
||||
break; // Go and get some help!
|
||||
default:
|
||||
number = 502268;
|
||||
break; // Quickly, I beg thee! Unlock my chains! If thou dost look at me close thou canst see them.
|
||||
}
|
||||
Prisoner.Yell(number);
|
||||
}
|
||||
}
|
||||
|
||||
// Don't refresh decay timer
|
||||
public override void OnExit(Mobile m)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddItem(Item item, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
if (item != null)
|
||||
item.Movable = false;
|
||||
|
||||
base.AddItem(item, xOffset, yOffset, zOffset);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)2); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2: break;
|
||||
case 1:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Prisoner = reader.ReadMobile() as BaseCreature;
|
||||
reader.ReadItem();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user