Compare commits
2 commits
main
...
kbatman/gm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b2c424f3e | ||
|
|
d04920abc1 |
34 changed files with 1082 additions and 2 deletions
|
|
@ -0,0 +1,158 @@
|
|||
using System;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public abstract partial class BaseStaffHide : Item
|
||||
{
|
||||
public virtual bool CastHide => false;
|
||||
public virtual bool CastArea => false;
|
||||
|
||||
public BaseStaffHide(int hue, int itemID = 0x1ECD) : base(itemID)
|
||||
{
|
||||
Stackable = false;
|
||||
Hue = hue;
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001);
|
||||
}
|
||||
else if (CastHide)
|
||||
{
|
||||
new HideSpell(this, from).Cast();
|
||||
}
|
||||
else if (CastArea)
|
||||
{
|
||||
new CastAreaSpell(this, from).Cast();
|
||||
}
|
||||
else if (from.CanBeginAction<BaseStaffHide>())
|
||||
{
|
||||
HideEffects(from);
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add("(Staff Only)");
|
||||
}
|
||||
|
||||
public virtual void HideEffects(Mobile from)
|
||||
{
|
||||
from.BeginAction<BaseStaffHide>();
|
||||
}
|
||||
|
||||
public virtual void OnEndHideEffects(Mobile from)
|
||||
{
|
||||
from.EndAction<BaseStaffHide>();
|
||||
}
|
||||
|
||||
public override bool IsAccessibleTo(Mobile from) => from.AccessLevel >= AccessLevel.GameMaster;
|
||||
|
||||
public override void OnDoubleClickNotAccessible(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel != AccessLevel.Player)
|
||||
{
|
||||
base.OnDoubleClickNotAccessible(from);
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendMessage("It vanishes without a trace.");
|
||||
Delete();
|
||||
}
|
||||
|
||||
private class HideSpell : Spell
|
||||
{
|
||||
private static readonly SpellInfo _spellInfo = new("Staff Hide", "", Type.EmptyTypes);
|
||||
|
||||
private readonly Mobile _from;
|
||||
private readonly BaseStaffHide _item;
|
||||
|
||||
public HideSpell(BaseStaffHide item, Mobile from) : base(from, null, _spellInfo)
|
||||
{
|
||||
_from = from;
|
||||
_item = item;
|
||||
}
|
||||
|
||||
public override bool ClearHandsOnCast => false;
|
||||
public override bool RevealOnCast => false;
|
||||
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds(1.0);
|
||||
|
||||
public override TimeSpan GetCastRecovery() => TimeSpan.Zero;
|
||||
|
||||
public override TimeSpan GetCastDelay() => TimeSpan.FromSeconds(1.0);
|
||||
|
||||
public override int GetMana() => 0;
|
||||
|
||||
public override bool ConsumeReagents() => false;
|
||||
|
||||
public override bool CheckFizzle() => false;
|
||||
|
||||
public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) => false;
|
||||
|
||||
public override void OnDisturb(DisturbType type, bool message)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
FinishSequence();
|
||||
if (_item is { Deleted: false })
|
||||
{
|
||||
_item.HideEffects(_from);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class CastAreaSpell : Spell
|
||||
{
|
||||
private static readonly SpellInfo _spellInfo = new("Staff Hide", "", 263, Type.EmptyTypes);
|
||||
|
||||
private readonly Mobile _from;
|
||||
private readonly BaseStaffHide _item;
|
||||
|
||||
public CastAreaSpell(BaseStaffHide item, Mobile from) : base(from, null, _spellInfo)
|
||||
{
|
||||
_from = from;
|
||||
_item = item;
|
||||
}
|
||||
|
||||
public override bool ClearHandsOnCast => false;
|
||||
public override bool RevealOnCast => false;
|
||||
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds(1.0);
|
||||
|
||||
public override TimeSpan GetCastRecovery() => TimeSpan.Zero;
|
||||
|
||||
public override TimeSpan GetCastDelay() => TimeSpan.FromSeconds(1.0);
|
||||
|
||||
public override int GetMana() => 0;
|
||||
|
||||
public override bool ConsumeReagents() => false;
|
||||
|
||||
public override bool CheckFizzle() => false;
|
||||
|
||||
public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) => false;
|
||||
|
||||
public override void OnDisturb(DisturbType type, bool message)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
FinishSequence();
|
||||
if (_item is { Deleted: false })
|
||||
{
|
||||
_item.HideEffects(_from);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class BloodOathHide : BaseStaffHide
|
||||
{
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override string DefaultName => "Blood Oath Hide";
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x375A, 1, 17, 33, 7, 9919, 0);
|
||||
Effects.SendLocationParticles(from, 0x3728, 1, 13, 33, 7, 9502, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x375A, 1, 17, 9919, 33, 7, EffectLayer.Waist);
|
||||
from.FixedParticles(0x3728, 1, 13, 9502, 33, 7, (EffectLayer)255);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, 0x175);
|
||||
OnEndHideEffects(from);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BloodOathHide() : base(2117)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class ExplosionHide : BaseStaffHide
|
||||
{
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override string DefaultName => "Explosion Hide";
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x36BD, 20, 10, 5044);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Waist);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, 0x307);
|
||||
OnEndHideEffects(from);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ExplosionHide() : base(2113)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class FireHide : BaseStaffHide
|
||||
{
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override string DefaultName => "Fire Hide";
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x3709, 1, 30, 0, 7, 9965, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x3709, 1, 30, 9965, 0, 7, EffectLayer.Waist);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, 0x225);
|
||||
OnEndHideEffects(from);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FireHide() : base(1161)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class FlamestormHide : BaseStaffHide
|
||||
{
|
||||
public override string DefaultName => "Firestorm Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
if (from is not { Deleted: false })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (from.Hidden)
|
||||
{
|
||||
from.HueMod = 0;
|
||||
from.BodyMod = 15;
|
||||
from.Hue = 0;
|
||||
from.BodyValue = 15;
|
||||
from.Hidden = false;
|
||||
from.Animate(12, 10, 0, true, false, 0);
|
||||
from.PlaySound(273);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(1.5), () => AnimStop_Callback(from, false));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Animate(17, 4, 1, true, false, 0);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.75), () => CastStop_Callback(from));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void AnimStop_Callback(Mobile from, bool toHide)
|
||||
{
|
||||
from.HueMod = -1;
|
||||
from.BodyMod = -1;
|
||||
|
||||
if (toHide)
|
||||
{
|
||||
from.Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Animate(17, 4, 1, false, false, 0);
|
||||
}
|
||||
|
||||
OnEndHideEffects(from);
|
||||
}
|
||||
|
||||
private void CastStop_Callback(Mobile from)
|
||||
{
|
||||
from.HueMod = 0;
|
||||
from.BodyValue = 15;
|
||||
from.Animate(12, 8, 1, false, false, 0);
|
||||
from.PlaySound(274);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(1.5), () => AnimStop_Callback(from, true));
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FlamestormHide() : base(1160)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class GateHide : BaseStaffHide
|
||||
{
|
||||
[SerializableField(1)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private bool _redGate;
|
||||
|
||||
[SerializableField(2)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private int _gateHue;
|
||||
|
||||
[SerializableField(3)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private int _gateSound;
|
||||
|
||||
public override string DefaultName => "Gate Hide";
|
||||
|
||||
public override bool CastArea => true;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
var worldLocation = new WorldLocation(from.Location, from.Map);
|
||||
|
||||
var redGate = _redGate ? 0x1AE5 : 0x1AF3;
|
||||
var gateHue = _gateHue > 0 ? _gateHue - 1 : 0;
|
||||
Effects.SendLocationParticles(from, redGate, 8, 26, gateHue, 0, 0, 0);
|
||||
Effects.PlaySound(from, _gateSound);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(1.25), () => PlaceGate(from, worldLocation));
|
||||
}
|
||||
|
||||
private void PlaceGate(Mobile from, WorldLocation worldLocation)
|
||||
{
|
||||
var itemId = _redGate ? 0xDDA : 0xF6C;
|
||||
var hue = _gateHue > 0 ? _gateHue : 0;
|
||||
|
||||
var moongate = new StaffHideMoongate(itemId, hue, worldLocation.Location, worldLocation.Map);
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(1.0) , () => from.Hidden = !from.Hidden);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(3.0), () => KillGate(moongate));
|
||||
}
|
||||
|
||||
private void KillGate(Moongate moongate)
|
||||
{
|
||||
if (moongate is { Deleted: false })
|
||||
{
|
||||
var effectItem = EffectItem.Create(moongate.Location, moongate.Map, EffectItem.DefaultDuration);
|
||||
Effects.SendLocationParticles(effectItem, 0x376A, 9, 20, 5042);
|
||||
Effects.PlaySound(moongate.Location, moongate.Map, 0x201);
|
||||
moongate.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GateHide() : base(1154)
|
||||
{
|
||||
_gateSound = 496;
|
||||
_gateHue = 0;
|
||||
}
|
||||
|
||||
[Serializable(0)]
|
||||
private partial class StaffHideMoongate : Moongate
|
||||
{
|
||||
public StaffHideMoongate(int itemId, int hue, Point3D loc, Map map) : base(loc, map, false)
|
||||
{
|
||||
ItemID = itemId;
|
||||
Hue = hue;
|
||||
TargetMap = Map.Internal;
|
||||
}
|
||||
|
||||
[AfterDeserialization(false)]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class ThunderHide : BaseStaffHide
|
||||
{
|
||||
public override string DefaultName => "Lighting Bolt Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
var entity = new Entity(from.Serial, from.Location, from.Map);
|
||||
Effects.SendBoltEffect(entity);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ThunderHide() : base(1153)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class MJHide : BaseStaffHide
|
||||
{
|
||||
private Timer _timer;
|
||||
|
||||
public override string DefaultName => "Staff MJ Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
[Constructible]
|
||||
public MJHide() : base(2119)
|
||||
{
|
||||
}
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
if (from.Hidden)
|
||||
{
|
||||
from.Hidden = false;
|
||||
from.Animate(1, 5, 1, true, false, 0);
|
||||
from.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist);
|
||||
from.FixedParticles(0x376A, 1, 30, 9502, 5, 3, EffectLayer.Waist);
|
||||
|
||||
from.PlaySound(0x244);
|
||||
}
|
||||
else
|
||||
{
|
||||
_timer = new Countdown(from, this);
|
||||
_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public class Countdown: Timer
|
||||
{
|
||||
private int _count;
|
||||
private readonly Mobile _mobile;
|
||||
private readonly MJHide _item;
|
||||
|
||||
public Countdown(Mobile mobile, MJHide item): base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
_mobile = mobile;
|
||||
_item = item;
|
||||
_count = 2;
|
||||
}
|
||||
|
||||
private static void Emote(Mobile from)
|
||||
{
|
||||
from.BoltEffect(0);
|
||||
from.Animate(22, 5, 1, true, false, 0);
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
switch (_count)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
Emote(_mobile);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
_mobile.Hidden = true;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Stop();
|
||||
_item._timer = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_count--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class MoleHide : BaseStaffHide
|
||||
{
|
||||
private class MoleInfo
|
||||
{
|
||||
public Mobile _from;
|
||||
public int _count;
|
||||
|
||||
public MoleInfo(Mobile from) => _from = from;
|
||||
}
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
Action callback;
|
||||
var moleInfo = new MoleInfo(from);
|
||||
|
||||
if (from.Hidden)
|
||||
{
|
||||
from.Z -= 10;
|
||||
from.Hidden = false;
|
||||
callback = () => DoIncZ_Callback(moleInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback = () => DoDecZ_Callback(moleInfo);
|
||||
}
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(100), 10, callback);
|
||||
from.PlaySound(0x244);
|
||||
}
|
||||
|
||||
private void DoIncZ_Callback(MoleInfo info)
|
||||
{
|
||||
info._from.Z++;
|
||||
info._count++;
|
||||
if (info._count > 9)
|
||||
{
|
||||
info._from.EndAction(typeof(MoleHide));
|
||||
}
|
||||
}
|
||||
|
||||
private void DoDecZ_Callback(MoleInfo info)
|
||||
{
|
||||
|
||||
info._from.Z++;
|
||||
info._count++;
|
||||
if (info._count > 9)
|
||||
{
|
||||
info._from.Hidden = true;
|
||||
info._from.Z += 10;
|
||||
OnEndHideEffects(info._from);
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MoleHide() : base(1717)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class NobleHide : BaseStaffHide
|
||||
{
|
||||
[SerializableField(0)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private int _effectHue = 5;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private int _effectSound = 0x244;
|
||||
|
||||
public override string DefaultName => "Noble Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x3709, 1, 30, _effectHue, 7, 9965, 0);
|
||||
Effects.SendLocationParticles(from, 0x376A, 1, 30, _effectHue, 3, 9502, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x3709, 1, 30, 9965, _effectHue, 7, EffectLayer.Waist);
|
||||
from.FixedParticles(0x376A, 1, 30, 9502, _effectHue, 3, (EffectLayer)255);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, _effectSound);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public NobleHide() : base(2119)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class PoisonHide : BaseStaffHide
|
||||
{
|
||||
public override string DefaultName => "Poison Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x36CB, 1, 9, 67, 5, 9911, 0);
|
||||
Effects.SendLocationParticles(from, 0x374A, 1, 17, 1108, 4, 9502, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x36CB, 1, 9, 9911, 67, 5, EffectLayer.Waist);
|
||||
from.FixedParticles(0x374A, 1, 17, 9502, 1108, 4, (EffectLayer)255);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, 0x22F);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public PoisonHide() : base(1268)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class ShinyHide : BaseStaffHide
|
||||
{
|
||||
public override string DefaultName => "Shiny Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x375A, 1, 30, 33, 2, 9966, 0);
|
||||
Effects.SendLocationParticles(from, 0x37B9, 1, 30, 43, 3, 9502, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x375A, 1, 30, 9966, 33, 2, EffectLayer.Waist);
|
||||
from.FixedParticles(0x37B9, 1, 30, 9502, 43, 3, (EffectLayer)255);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, 0x0F5);
|
||||
Effects.PlaySound(from, 0x1ED);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ShinyHide() : base(1150)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class SmokeBombHide : BaseStaffHide
|
||||
{
|
||||
public override string DefaultName => "Smoke Bomb Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x3709, 1, 30, 1108, 6, 9904, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, 0x22F);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SmokeBombHide() : base(1175)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class SmokeHide : BaseStaffHide
|
||||
{
|
||||
[SerializableField(0)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private int _effectHue = 1149;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private int _effectSound = 0x228;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
private int _effectId = 0x3728;
|
||||
|
||||
public override string DefaultName => "Smoke Hide";
|
||||
|
||||
public override bool CastHide => true;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
|
||||
Effects.SendLocationEffect(new Point3D(from.X + 1, from.Y, from.Z + 4), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X + 1, from.Y, from.Z), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X + 1, from.Y, from.Z - 4), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X, from.Y + 1, from.Z + 4), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X, from.Y + 1, from.Z), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X, from.Y + 1, from.Z - 4), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
|
||||
Effects.SendLocationEffect(new Point3D(from.X + 1, from.Y + 1, from.Z + 11), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X + 1, from.Y + 1, from.Z + 7), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X + 1, from.Y + 1, from.Z + 3), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
Effects.SendLocationEffect(new Point3D(from.X + 1, from.Y + 1, from.Z - 1), from.Map, _effectId, 13, 1, _effectHue, 4);
|
||||
|
||||
Effects.PlaySound(from, _effectSound);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SmokeHide() : base(2119)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class WitherHide : BaseStaffHide
|
||||
{
|
||||
public override string DefaultName => "Gate Hide";
|
||||
|
||||
public override bool CastHide => false;
|
||||
|
||||
public override void HideEffects(Mobile from)
|
||||
{
|
||||
from.Hidden = !from.Hidden;
|
||||
|
||||
if (from.Hidden)
|
||||
{
|
||||
Effects.SendLocationParticles(from, 0x37CC, 1, 40, 3, 9917, 97, 0);
|
||||
Effects.SendLocationParticles(from, 0x374A, 1, 15, 97, 3, 9502, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.FixedParticles(0x37CC, 1, 40, 97, 3, 9917, EffectLayer.Waist);
|
||||
from.FixedParticles(0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255);
|
||||
}
|
||||
|
||||
Effects.PlaySound(from, 0x10B);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WitherHide() : base(1152)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
153
Projects/UOContent/Items/Staff Only/StaffEtherealMount.cs
Normal file
153
Projects/UOContent/Items/Staff Only/StaffEtherealMount.cs
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Original Author: snicker7 (GMEthereal.cs)
|
||||
* Released: 03/26/2006
|
||||
* Updated for ModernUO by Kamron
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public enum EtherealType
|
||||
{
|
||||
Horse,
|
||||
Llama,
|
||||
Ostard,
|
||||
DesertOstard,
|
||||
FrenziedOstard,
|
||||
Ridgeback,
|
||||
Unicorn,
|
||||
Beetle,
|
||||
Kirin,
|
||||
SwampDragon,
|
||||
SkeletalHorse,
|
||||
Hiryu,
|
||||
ChargerOfTheFallen,
|
||||
SeaHorse,
|
||||
Chimera,
|
||||
CuSidhe,
|
||||
PolarBear,
|
||||
Boura
|
||||
}
|
||||
|
||||
[Serializable(0)]
|
||||
public partial class StaffEtherealMount : EtherealMount
|
||||
{
|
||||
public override int FollowerSlots => 0;
|
||||
|
||||
private static readonly Dictionary<EtherealType, EtherealInfo> EtherealTypes = new() {
|
||||
{ EtherealType.Horse, new EtherealInfo(0x20DD, 0x3EAA) },
|
||||
{ EtherealType.Llama, new EtherealInfo(0x20F6, 0x3EAB) },
|
||||
{ EtherealType.Ostard, new EtherealInfo(0x2135, 0x3EAC) },
|
||||
{ EtherealType.DesertOstard, new EtherealInfo(8501, 16035) },
|
||||
{ EtherealType.FrenziedOstard, new EtherealInfo(8502, 16036) },
|
||||
{ EtherealType.Ridgeback, new EtherealInfo(0x2615, 0x3E9A) },
|
||||
{ EtherealType.Unicorn, new EtherealInfo(0x25CE, 0x3E9B) },
|
||||
{ EtherealType.Beetle, new EtherealInfo(0x260F, 0x3E97) },
|
||||
{ EtherealType.Kirin, new EtherealInfo(0x25A0, 0x3E9C) },
|
||||
{ EtherealType.SwampDragon, new EtherealInfo(0x2619, 0x3E98) },
|
||||
{ EtherealType.SkeletalHorse, new EtherealInfo(9751, 16059) },
|
||||
{ EtherealType.Hiryu, new EtherealInfo(10090, 16020) },
|
||||
{ EtherealType.ChargerOfTheFallen, new EtherealInfo(11676, 16018) },
|
||||
{ EtherealType.SeaHorse, new EtherealInfo(9658, 16051) },
|
||||
{ EtherealType.Chimera, new EtherealInfo(11669, 16016) },
|
||||
{ EtherealType.CuSidhe, new EtherealInfo(11670, 16017) },
|
||||
{ EtherealType.PolarBear, new EtherealInfo(8417, 16069) },
|
||||
{ EtherealType.Boura, new EtherealInfo(0x46f8, 0x3EC6) },
|
||||
};
|
||||
|
||||
[SerializableField(0)]
|
||||
private EtherealType _etherealType;
|
||||
|
||||
[Constructible]
|
||||
public StaffEtherealMount() : this(EtherealType.Horse)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public StaffEtherealMount(EtherealType type) : base(0, 0)
|
||||
{
|
||||
EthyType = type;
|
||||
LootType = LootType.Blessed;
|
||||
Name = "Staff Ethereal";
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
public EtherealType EthyType
|
||||
{
|
||||
get => _etherealType;
|
||||
set
|
||||
{
|
||||
if (!EtherealTypes.TryGetValue(value, out var etherealInfo))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EtherealType = value;
|
||||
|
||||
MountedID = etherealInfo._mountedId;
|
||||
RegularID = etherealInfo._regularId;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsAccessibleTo(Mobile from) => from.AccessLevel >= AccessLevel.GameMaster;
|
||||
|
||||
public override void OnDoubleClickNotAccessible(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel != AccessLevel.Player)
|
||||
{
|
||||
base.OnDoubleClickNotAccessible(from);
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendMessage("It vanishes without a trace.");
|
||||
Delete();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Deleted || Rider != null || !Multis.DesignContext.Check(from))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (from.Mounted)
|
||||
{
|
||||
from.SendLocalizedMessage(1005583); // Please dismount first.
|
||||
}
|
||||
else if (from.Race == Race.Gargoyle)
|
||||
{
|
||||
from.SendLocalizedMessage(1112281); // Gargoyles can't mount
|
||||
}
|
||||
else if (from.HasTrade)
|
||||
{
|
||||
from.SendLocalizedMessage(1042317, "", 0x41); // You may not ride at this time
|
||||
}
|
||||
else if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1080063); // This must be in your backpack to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
Rider = from;
|
||||
|
||||
if (_etherealType == EtherealType.SeaHorse)
|
||||
{
|
||||
Rider.CanSwim = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private struct EtherealInfo
|
||||
{
|
||||
public readonly int _regularId;
|
||||
public readonly int _mountedId;
|
||||
public EtherealInfo(int id, int mid)
|
||||
{
|
||||
_regularId = id;
|
||||
_mountedId = mid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BaseStaffHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BloodOathHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.ExplosionHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.FireHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.FlamestormHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GateHide.StaffHideMoongate"
|
||||
}
|
||||
30
Projects/UOContent/Migrations/Server.Items.GateHide.v0.json
Normal file
30
Projects/UOContent/Migrations/Server.Items.GateHide.v0.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GateHide",
|
||||
"properties": [
|
||||
{
|
||||
"name": "RedGate",
|
||||
"type": "bool",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "GateHue",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "GateSound",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MJHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MoleHide"
|
||||
}
|
||||
22
Projects/UOContent/Migrations/Server.Items.NobleHide.v0.json
Normal file
22
Projects/UOContent/Migrations/Server.Items.NobleHide.v0.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.NobleHide",
|
||||
"properties": [
|
||||
{
|
||||
"name": "EffectHue",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "EffectSound",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.PoisonHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.ShinyHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SmokeBombHide"
|
||||
}
|
||||
22
Projects/UOContent/Migrations/Server.Items.SmokeHide.v0.json
Normal file
22
Projects/UOContent/Migrations/Server.Items.SmokeHide.v0.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SmokeHide",
|
||||
"properties": [
|
||||
{
|
||||
"name": "EffectHue",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "EffectSound",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.ThunderHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WitherHide"
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Mobiles.StaffEtherealMount",
|
||||
"properties": [
|
||||
{
|
||||
"name": "EtherealType",
|
||||
"type": "Server.Mobiles.EtherealType",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -13,8 +13,7 @@ namespace Server.Mobiles
|
|||
private Mobile m_Rider;
|
||||
|
||||
[Constructible]
|
||||
public EtherealMount(int itemID, int mountID)
|
||||
: base(itemID)
|
||||
public EtherealMount(int itemID, int mountID) : base(itemID)
|
||||
{
|
||||
m_MountedID = mountID;
|
||||
m_RegularID = itemID;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue