Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
158
Scripts/Scripts-master/Items/Armors/March/AbilityCollection.cs
Normal file
158
Scripts/Scripts-master/Items/Armors/March/AbilityCollection.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
/* Created by M_0_h
|
||||
Please do not redistribute this file without permission
|
||||
Feel free to modify the file for your own use as you please */
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
using Server.Misc;
|
||||
using Server.Targeting;
|
||||
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public static class AbilityCollection
|
||||
{
|
||||
#region ScreamOfHell
|
||||
public static void ScreamOfHell(Mobile from)
|
||||
{
|
||||
ScreamOfHell(from, 12, TimeSpan.FromMinutes(1));
|
||||
}
|
||||
public static void ScreamOfHell(Mobile from, int range)
|
||||
{
|
||||
ScreamOfHell(from, range, TimeSpan.FromMinutes(1));
|
||||
}
|
||||
public static void ScreamOfHell(Mobile from, int range, TimeSpan duration)
|
||||
{
|
||||
if (from.Map != Map.Internal && from.Map != null && from != null && !from.Blessed && from.Alive)
|
||||
{
|
||||
IPooledEnumerable eable = from.GetMobilesInRange(range);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m is BaseCreature && !m.Blessed && m.Alive && ((BaseCreature)from).IsEnemy(m) && from.CanBeHarmful(m))
|
||||
{
|
||||
BaseCreature b = m as BaseCreature;
|
||||
|
||||
if (b.Controlled && b != from)
|
||||
{
|
||||
b.Combatant = from;
|
||||
b.BeginFlee(duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region AreaDmg
|
||||
public static void AreaDmg(Mobile from, int dmgMin, int dmgMax, int physDmg, int fireDmg, int nrgyDmg, int coldDmg, int poisDmg, int range)
|
||||
{
|
||||
if (from == null || from.Map == Map.Internal || from.Map == null || from.Deleted || from.Blessed)
|
||||
return;
|
||||
|
||||
IPooledEnumerable eable = from.GetMobilesInRange(range);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m is BaseCreature)
|
||||
{
|
||||
BaseCreature b = m as BaseCreature;
|
||||
|
||||
if (b.Alive && !b.Blessed && !b.IsDeadBondedPet && b.CanBeHarmful(from) && ((BaseCreature)from).IsEnemy(b) && b.Map != null && b.Map != Map.Internal && b != null)
|
||||
{
|
||||
AOS.Damage(b, from, Utility.RandomMinMax(dmgMin, dmgMax), physDmg, fireDmg, coldDmg, poisDmg, nrgyDmg);
|
||||
}
|
||||
}
|
||||
else if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile p = m as PlayerMobile;
|
||||
|
||||
if (p.Alive && !p.Blessed && p.AccessLevel == AccessLevel.Player && p.Map != null && p.Map != Map.Internal && p != null)
|
||||
{
|
||||
AOS.Damage(p, from, Utility.RandomMinMax(dmgMin, dmgMax), physDmg, fireDmg, coldDmg, poisDmg, nrgyDmg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static void AreaEffect(TimeSpan delayMin, TimeSpan delayMax, double delayBreak, Map map, Point3D loc, int itemID, int duration, int hue, int renderMode)
|
||||
{
|
||||
AreaEffect(delayMin, delayMax, delayBreak, map, loc, itemID, duration, hue, renderMode, 12, 0, true, false, false);
|
||||
}
|
||||
|
||||
public static void AreaEffect(TimeSpan delayMin, TimeSpan delayMax, double delayBreak, Map map, Point3D loc, int itemID, int duration, int hue, int renderMode, int range, int height, bool inToOut, bool ascending, bool descending)
|
||||
{
|
||||
for (int x = (range * -1); x <= range; ++x)
|
||||
{
|
||||
for (int y = (range * -1); y <= range; ++y)
|
||||
{
|
||||
double dist = Math.Sqrt(x * x + y * y);
|
||||
|
||||
if (dist <= range)
|
||||
{
|
||||
Point3D loc2;
|
||||
|
||||
if (inToOut)
|
||||
{
|
||||
if (ascending)
|
||||
loc2 = new Point3D(loc.X + x, loc.Y + y, (int)(loc.Z + (dist * height)));
|
||||
|
||||
else if (descending)
|
||||
loc2 = new Point3D(loc.X + x, loc.Y + y, (int)(loc.Z + (range - (dist * height))));
|
||||
|
||||
else
|
||||
loc2 = new Point3D(loc.X + x, loc.Y + y, loc.Z);
|
||||
|
||||
new EffectTimer(delayMin + TimeSpan.FromSeconds(dist * delayBreak), delayMax + TimeSpan.FromSeconds(dist * delayBreak), map, loc2, itemID, duration, hue, renderMode).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ascending)
|
||||
loc2 = new Point3D(loc.X + x, loc.Y + y, (int)(loc.Z + (dist * height)));
|
||||
|
||||
else if (descending)
|
||||
loc2 = new Point3D(loc.X + x, loc.Y + y, (int)(loc.Z + (range - (dist * height))));
|
||||
|
||||
else
|
||||
loc2 = new Point3D(loc.X + x, loc.Y + y, loc.Z);
|
||||
|
||||
new EffectTimer(delayMin + TimeSpan.FromSeconds( range - (dist * delayBreak)), delayMax + TimeSpan.FromSeconds(range - (dist * delayBreak)), map, loc2, itemID, duration, hue, renderMode).Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class EffectTimer : Timer
|
||||
{
|
||||
private int m_ItemID, m_Duration, m_Hue, m_RenderMode;
|
||||
private Map m_Map;
|
||||
private Point3D m_Location;
|
||||
|
||||
public EffectTimer(TimeSpan delayMin, TimeSpan delayMax, Map map, Point3D loc, int itemID, int duration, int hue, int renderMode)
|
||||
: base(delayMin, delayMax)
|
||||
{
|
||||
m_ItemID = itemID;
|
||||
m_Duration = duration;
|
||||
m_Hue = hue;
|
||||
m_RenderMode = renderMode;
|
||||
m_Map = map;
|
||||
m_Location = loc;
|
||||
}
|
||||
|
||||
public EffectTimer(TimeSpan delayMin, TimeSpan delayMax, Map map, Point3D loc, int itemID, int duration)
|
||||
: this(delayMin, delayMax, map, loc, itemID, duration, 0, 0)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
Effects.SendLocationEffect(m_Location, m_Map, m_ItemID, m_Duration, m_Hue, m_RenderMode);
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,556 @@
|
||||
/* Created by M_0_h
|
||||
Please do not redistribute this file without permission
|
||||
Feel free to modify the file for your own use as you please */
|
||||
using System;
|
||||
using Server;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
using Server.Misc;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Targeting;
|
||||
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Aghor : BaseCreature
|
||||
{
|
||||
private DateTime m_NextAbility = DateTime.Now + TimeSpan.FromSeconds(5);
|
||||
private DateTime m_NextWall = DateTime.Now + TimeSpan.FromSeconds(20);
|
||||
|
||||
[Constructable]
|
||||
public Aghor() : base( AIType.AI_Mage, FightMode.Weakest, 10, 1, 0.1, 0.4 )
|
||||
{
|
||||
Name = "Agho'r";
|
||||
Title = "the Cold-Hearted";
|
||||
Body = 43;
|
||||
BaseSoundID = 357;
|
||||
Hue = 1152;
|
||||
|
||||
SetStr( 600, 700 );
|
||||
SetDex( 176, 195 );
|
||||
SetInt( 201, 225 );
|
||||
|
||||
SetHits( 22226, 24322 );
|
||||
|
||||
SetDamage( 13, 23 );
|
||||
|
||||
SetSkill( SkillName.EvalInt, 140.1, 150.0 );
|
||||
SetSkill( SkillName.Magery, 110.1, 120.0 );
|
||||
SetSkill( SkillName.MagicResist, 175.1, 185.0 );
|
||||
SetSkill( SkillName.Tactics, 180.1, 190.0 );
|
||||
SetSkill( SkillName.Wrestling, 100.1, 120.0 );
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetDamageType(ResistanceType.Cold, 100);
|
||||
|
||||
SetResistance( ResistanceType.Physical, 55, 65 );
|
||||
SetResistance( ResistanceType.Fire, 10, 20 );
|
||||
SetResistance( ResistanceType.Cold, 60, 70 );
|
||||
SetResistance( ResistanceType.Poison, 20, 30 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
Fame = 18000;
|
||||
Karma = -18000;
|
||||
|
||||
VirtualArmor = 60;
|
||||
|
||||
if ( 0.07 >= Utility.RandomDouble() )
|
||||
PackItem( new DailyFullJars() );
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (Alive && !Blessed && Map != Map.Internal && Map != null && Combatant != null)
|
||||
{
|
||||
if (m_NextAbility <= DateTime.Now /*&& Hits > HitsMax * 0.03 */)
|
||||
{
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 1: DoBlizzard();
|
||||
break;
|
||||
case 2: DoSummon();
|
||||
break;
|
||||
case 0: DoIceNova();
|
||||
break;
|
||||
}
|
||||
m_NextAbility = DateTime.Now + TimeSpan.FromSeconds(Utility.Random(11) + 12);
|
||||
}
|
||||
if (m_NextWall <= DateTime.Now)
|
||||
{
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
DoCircleOfIce();
|
||||
m_NextWall = DateTime.Now + TimeSpan.FromSeconds(40);
|
||||
}
|
||||
else
|
||||
m_NextWall = DateTime.Now + TimeSpan.FromSeconds(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region CircleOfIce
|
||||
|
||||
public void DoCircleOfIce()
|
||||
{
|
||||
for (int x = -8; x <= 8; ++x)
|
||||
{
|
||||
for (int y = -8; y <= 8; ++y)
|
||||
{
|
||||
double dist = Math.Sqrt(x * x + y * y);
|
||||
|
||||
if (dist > 7 && dist < 9)
|
||||
{
|
||||
Point3D loc = new Point3D(X + x, Y + y, Z);
|
||||
if (Map.CanFit(loc, 0, true))
|
||||
{
|
||||
Item item = new InternalItem();
|
||||
item.MoveToWorld(loc, Map);
|
||||
Effects.SendLocationParticles(EffectItem.Create(loc, Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 5029);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DispellableField]
|
||||
private class InternalItem : Item
|
||||
{
|
||||
public override bool BlocksFit { get { return true; } }
|
||||
private Timer m_Timer;
|
||||
|
||||
public InternalItem()
|
||||
: base(0x08E2)
|
||||
{
|
||||
Movable = false;
|
||||
ItemID = Utility.RandomList(2274, 2275, 2272, 2273, 2279, 2280);
|
||||
Name = "Ice";
|
||||
Hue = 1152;
|
||||
m_Timer = new InternalTimer(this, TimeSpan.FromSeconds(30.0));
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public InternalItem(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if (m_Timer != null)
|
||||
m_Timer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private InternalItem m_Item;
|
||||
|
||||
public InternalTimer(InternalItem item, TimeSpan duration)
|
||||
: base(duration)
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Item.Delete();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IceNova
|
||||
|
||||
public void DoIceNova()
|
||||
{
|
||||
AbilityCollection.AreaEffect(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1), 0.1, Map, Location, 14000, 13, 1151, 4, 12, 3, false, true, false);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(1.5), new TimerStateCallback(IceNova_Callback), new object[]{this, Location});
|
||||
}
|
||||
|
||||
public static void IceNova_Callback(object state)
|
||||
{
|
||||
object[] states = ((object[])state);
|
||||
Aghor ag = states[0] as Aghor;
|
||||
Point3D loc = ((Point3D)states[1]);
|
||||
if (ag == null || !ag.Alive || ag.Map == Map.Internal)
|
||||
return;
|
||||
|
||||
Effects.PlaySound(ag.Location, ag.Map, 534);
|
||||
|
||||
IPooledEnumerable eable = ag.Map.GetMobilesInRange(loc, 12);
|
||||
|
||||
if (eable == null)
|
||||
return;
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m is BaseCreature)
|
||||
{
|
||||
BaseCreature b = m as BaseCreature;
|
||||
|
||||
if (b == null)
|
||||
return;
|
||||
|
||||
if (b.Alive && !b.Blessed && !b.IsDeadBondedPet && b.CanBeHarmful(ag) && ((BaseCreature)ag).IsEnemy(b) && b.Map != null && b.Map != Map.Internal && b != null)
|
||||
{
|
||||
AOS.Damage(b, ag, Utility.RandomMinMax(100, 150), 0, 0, 100, 0, 0);
|
||||
ag.DoFreeze(b, 20);
|
||||
}
|
||||
}
|
||||
else if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile p = m as PlayerMobile;
|
||||
|
||||
if (p == null)
|
||||
return;
|
||||
|
||||
if (p.Alive && !p.Blessed && p.AccessLevel == AccessLevel.Player && p.Map != null && p.Map != Map.Internal && p != null)
|
||||
{
|
||||
AOS.Damage(p, ag, Utility.RandomMinMax(50, 100), 0, 0, 100, 0, 0);
|
||||
ag.DoFreeze(p, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Blizzard
|
||||
|
||||
public void DoBlizzard()
|
||||
{
|
||||
for (int i = 0; i < 30; ++i)
|
||||
{
|
||||
int x = X + Utility.Random(25) - 12;
|
||||
int y = Y + Utility.Random(25) - 12;
|
||||
int z = Map.GetAverageZ(x, y);
|
||||
|
||||
Point3D loc = new Point3D(x, y, z);
|
||||
|
||||
if (Map.CanFit(loc, 0, true))
|
||||
{
|
||||
double delay = 5 * Utility.RandomDouble();
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(delay), new TimerStateCallback(BlizzardEffect_Callback), new object[]{this, loc});
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(delay + 2.5), new TimerStateCallback(BlizzardDamage_Callback), new object[] { this, loc });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void BlizzardEffect_Callback(object state)
|
||||
{
|
||||
object[] states = ((object[])state);
|
||||
Mobile ag = states[0] as Mobile;
|
||||
Point3D loc = ((Point3D)states[1]);
|
||||
|
||||
if (ag == null || !ag.Alive || ag.Map == Map.Internal)
|
||||
return;
|
||||
|
||||
IEntity to = new Entity(Serial.Zero, new Point3D(loc.X, loc.Y, loc.Z), ag.Map);
|
||||
IEntity from = new Entity(Serial.Zero, new Point3D(loc.X, loc.Y, loc.Z + 50), ag.Map);
|
||||
Effects.SendMovingEffect(from, to, 14036, 2, 16, false, true, 1151, 4);
|
||||
Effects.PlaySound(loc, ag.Map, 0x1E5);
|
||||
}
|
||||
|
||||
public static void BlizzardDamage_Callback(object state)
|
||||
{
|
||||
//Point3D loc = (Point3D)state;
|
||||
|
||||
object[] states = ((object[])state);
|
||||
Mobile ag = states[0] as Mobile;
|
||||
Point3D loc = ((Point3D)states[1]);
|
||||
|
||||
if (ag == null || !ag.Alive || ag.Map == Map.Internal)
|
||||
return;
|
||||
|
||||
IPooledEnumerable eable = ag.Map.GetMobilesInRange(loc, 0);
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m.Blessed || m == null || m.Map == Map.Internal || m.Map == null || !m.Alive || !ag.CanBeHarmful(m))
|
||||
return;
|
||||
|
||||
else if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile p = m as PlayerMobile;
|
||||
|
||||
if (p.AccessLevel == AccessLevel.Player)
|
||||
AOS.Damage(p, ag, 100, 0, 0, 0, 100, 0);
|
||||
else
|
||||
p.SendMessage("With your godly powers you avoid the damage");
|
||||
}
|
||||
|
||||
else if (m is BaseCreature)
|
||||
{
|
||||
BaseCreature b = m as BaseCreature;
|
||||
|
||||
if (b.IsEnemy(ag))
|
||||
AOS.Damage(b, ag, 300, 0, 0, 0, 100, 0);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Summon
|
||||
|
||||
public void DoSummon()
|
||||
{
|
||||
if (this.Map != null)
|
||||
{
|
||||
Map map = this.Map;
|
||||
int amount = Utility.RandomMinMax(6, 8);
|
||||
|
||||
for (int l = 0; l < amount; ++l)
|
||||
{
|
||||
for (int k = 0; k < 1; ++k)
|
||||
{
|
||||
bool validLocation = false;
|
||||
Point3D loc = this.Location;
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = X + Utility.Random(11) - 5;
|
||||
int y = Y + Utility.Random(11) - 5;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0: IceSerpent serpent = new IceSerpent();
|
||||
serpent.MoveToWorld(loc, map);
|
||||
break;
|
||||
case 1: IceFiend fiend = new IceFiend();
|
||||
fiend.MoveToWorld(loc, map);
|
||||
break;
|
||||
case 2: IceElemental ice = new IceElemental();
|
||||
ice.MoveToWorld(loc, map);
|
||||
break;
|
||||
case 3: SnowElemental snow = new SnowElemental();
|
||||
snow.MoveToWorld(loc, map);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Teleport
|
||||
|
||||
public void DoTeleport(Mobile target)
|
||||
{
|
||||
if ((GetDistanceToSqrt(target) <= 1 || GetDistanceToSqrt(target) >= 12) || !CanSee(target))
|
||||
return;
|
||||
|
||||
bool validLocation = false;
|
||||
Point3D loc = target.Location;
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = target.X + Utility.Random(3) - 1;
|
||||
int y = target.Y + Utility.Random(3) - 1;
|
||||
int z = Map.GetAverageZ(x, y);
|
||||
|
||||
if (validLocation = Map.CanFit(x, y, target.Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = Map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
Effects.SendLocationParticles(EffectItem.Create(Location, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
|
||||
Effects.SendLocationParticles(EffectItem.Create(loc, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
|
||||
MoveToWorld(loc, Map);
|
||||
|
||||
Combatant = target;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void OnDamagedBySpell(Mobile from)
|
||||
{
|
||||
if (Utility.Random(5) == 1 && from != null && InRange(from, 12) && from.Map == Map)
|
||||
{
|
||||
DoTeleport(from);
|
||||
}
|
||||
}
|
||||
|
||||
#region Freeze
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
if (!AFrozen(defender) && Utility.RandomBool())
|
||||
DoFreeze(defender, 5);
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
}
|
||||
|
||||
public void DoFreeze(Mobile from, int duration)
|
||||
{
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[from];
|
||||
|
||||
if (timer != null )
|
||||
{
|
||||
timer.DoExpire();
|
||||
from.SendLocalizedMessage(1070831); // The freezing wind continues to blow!
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage(1070832); // An icy wind surrounds you, freezing your lungs as you breathe!
|
||||
|
||||
timer = new ExpireTimer(from, this, duration);
|
||||
timer.Start();
|
||||
m_Table[from] = timer;
|
||||
}
|
||||
|
||||
public bool AFrozen(Mobile m)
|
||||
{
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[m];
|
||||
return timer != null;
|
||||
}
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
private class FrozenItem : Item
|
||||
{
|
||||
public override bool BlocksFit { get { return false; } }
|
||||
|
||||
public FrozenItem()
|
||||
: base(Utility.RandomList(2279, 2281, 2276, 2272))
|
||||
{
|
||||
Hue = 1152;
|
||||
Name = "Ice";
|
||||
}
|
||||
|
||||
public FrozenItem(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private Mobile m_From;
|
||||
private int m_Count;
|
||||
private int m_MaxCount;
|
||||
private FrozenItem m_Item;
|
||||
|
||||
public ExpireTimer(Mobile m, Mobile from, int maxCount)
|
||||
: base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_From = from;
|
||||
m_MaxCount = maxCount;
|
||||
m_Mobile.CantWalk = true;
|
||||
m_Item = new FrozenItem();
|
||||
m_Item.MoveToWorld(m_Mobile.Location, m_Mobile.Map);
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
public void DoExpire()
|
||||
{
|
||||
Stop();
|
||||
m_Mobile.CantWalk = false;
|
||||
m_Item.Delete();
|
||||
m_Table.Remove(m_Mobile);
|
||||
}
|
||||
|
||||
public void DrainLife()
|
||||
{
|
||||
if (m_Mobile.Alive)
|
||||
m_Mobile.Damage(Utility.RandomMinMax(5,11), m_From);
|
||||
else
|
||||
DoExpire();
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
DrainLife();
|
||||
|
||||
if (++m_Count >= m_MaxCount)
|
||||
{
|
||||
DoExpire();
|
||||
m_Mobile.SendLocalizedMessage(1070830); // The icy wind dissipates.
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.AosSuperBoss, 4);
|
||||
}
|
||||
|
||||
public override bool AlwaysMurderer { get { return true; } }
|
||||
public override bool AutoDispel { get { return true; } }
|
||||
public override double AutoDispelChance { get { return 1.0; } }
|
||||
public override bool BardImmune { get { return !Core.SE; } }
|
||||
public override bool Unprovokable { get { return Core.SE; } }
|
||||
public override bool Uncalmable { get { return Core.SE; } }
|
||||
public override Poison PoisonImmune { get { return Poison.Deadly; } }
|
||||
|
||||
public Aghor(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Scripts/Scripts-master/Items/Armors/March/BondInfo.cs
Normal file
65
Scripts/Scripts-master/Items/Armors/March/BondInfo.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Commands;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
public class BondInfoCommand
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register( "BondInfo", AccessLevel.Player, new CommandEventHandler( BondInfo_OnCommand ) );
|
||||
}
|
||||
|
||||
[Usage( "BondInfo" )]
|
||||
[Description( "Tells you how much time remaining until your next BOD is available." )]
|
||||
public static void BondInfo_OnCommand( CommandEventArgs e )
|
||||
{
|
||||
Mobile from = e.Mobile;
|
||||
e.Mobile.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( BondInfo_OnTarget ) );
|
||||
e.Mobile.SendMessage("Target the pet you wish to know the bonding timer of");
|
||||
}
|
||||
|
||||
|
||||
public static void BondInfo_OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( targeted is BaseCreature )
|
||||
{
|
||||
BaseCreature targ = (BaseCreature)targeted;
|
||||
if ( targ.ControlMaster == from )
|
||||
{
|
||||
if( targ.BondingBegin == DateTime.MinValue )
|
||||
{
|
||||
from.SendMessage("Your pet hasn't started to bond yet, please feed it and try again." );
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime today = DateTime.Now;
|
||||
DateTime willbebonded = targ.BondingBegin.AddDays(7);
|
||||
TimeSpan bondedfor = targ.BondingBegin - today;
|
||||
TimeSpan daystobond = willbebonded - today;
|
||||
string BondInfo = string.Format("The pet started bonding with you at {0}. Its {1} days, {2} hours and {3} minutes until it bonds", targ.BondingBegin, daystobond.Days,
|
||||
daystobond.Hours, daystobond.Minutes );
|
||||
from.SendMessage ( BondInfo );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( BondInfo_OnTarget ) );
|
||||
from.SendMessage( "That is not your pet!" );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( BondInfo_OnTarget ) );
|
||||
from.SendMessage("That is not a pet!" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
///////This is Lord Greywolf's script. I hereby proclaim he kicks ass on RunUO forums. Signed Stygian Stalker.
|
||||
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NecklaceOfRessurection : BaseEarrings
|
||||
{
|
||||
[Constructable]
|
||||
public NecklaceOfRessurection() : base( 0x3BB5 )
|
||||
{
|
||||
Name = "Necklace Of Ressurection";
|
||||
SkillBonuses.SetValues( 0, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)], (Utility.Random( 5 ) == 0 ? 15.0 : Utility.RandomMinMax( 5, 10 )) );
|
||||
SkillBonuses.SetValues( 1, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)], (Utility.Random( 5 ) == 0 ? 15.0 : Utility.RandomMinMax( 5, 10 )) );
|
||||
}
|
||||
|
||||
private static SkillName[] m_PossibleBonusSkills = new SkillName[]
|
||||
{
|
||||
SkillName.Alchemy,
|
||||
SkillName.Anatomy,
|
||||
SkillName.AnimalLore,
|
||||
SkillName.ItemID,
|
||||
SkillName.ArmsLore,
|
||||
SkillName.Parry,
|
||||
SkillName.Begging,
|
||||
SkillName.Blacksmith,
|
||||
SkillName.Fletching,
|
||||
SkillName.Peacemaking,
|
||||
|
||||
SkillName.Carpentry,
|
||||
SkillName.Cartography,
|
||||
SkillName.Cooking,
|
||||
SkillName.DetectHidden,
|
||||
SkillName.Discordance,
|
||||
SkillName.EvalInt,
|
||||
SkillName.Healing,
|
||||
SkillName.Fishing,
|
||||
SkillName.Forensics,
|
||||
SkillName.Herding,
|
||||
SkillName.Hiding,
|
||||
SkillName.Provocation,
|
||||
SkillName.Inscribe,
|
||||
SkillName.Lockpicking,
|
||||
SkillName.Magery,
|
||||
SkillName.MagicResist,
|
||||
SkillName.Tactics,
|
||||
SkillName.Snooping,
|
||||
SkillName.Musicianship,
|
||||
SkillName.Poisoning,
|
||||
SkillName.Archery,
|
||||
SkillName.SpiritSpeak,
|
||||
SkillName.Stealing,
|
||||
SkillName.Tailoring,
|
||||
SkillName.AnimalTaming,
|
||||
|
||||
SkillName.Tinkering,
|
||||
SkillName.Tracking,
|
||||
SkillName.Veterinary,
|
||||
SkillName.Swords,
|
||||
SkillName.Macing,
|
||||
SkillName.Fencing,
|
||||
SkillName.Wrestling,
|
||||
SkillName.Lumberjacking,
|
||||
SkillName.Mining,
|
||||
SkillName.Meditation,
|
||||
SkillName.Stealth,
|
||||
SkillName.RemoveTrap,
|
||||
|
||||
SkillName.Necromancy,
|
||||
SkillName.Focus,
|
||||
SkillName.Chivalry,
|
||||
SkillName.Bushido,
|
||||
SkillName.Ninjitsu
|
||||
};
|
||||
|
||||
public NecklaceOfRessurection(Serial serial) : base(serial){}
|
||||
public override void Serialize( GenericWriter writer ) {base.Serialize( writer ); writer.Write( (int) 0 );}
|
||||
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt();}
|
||||
}
|
||||
}
|
||||
81
Scripts/Scripts-master/Items/Armors/March/SaintEarrings.cs
Normal file
81
Scripts/Scripts-master/Items/Armors/March/SaintEarrings.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
///////This is Lord Greywolf's script. I hereby proclaim he kicks ass on RunUO forums. Signed Stygian Stalker.
|
||||
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SaintEarrings : BaseEarrings
|
||||
{
|
||||
[Constructable]
|
||||
public SaintEarrings() : base( 0x1F07 )
|
||||
{
|
||||
Name = "Earrings of the Saint";
|
||||
SkillBonuses.SetValues( 0, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)], (Utility.Random( 5 ) == 0 ? 15.0 : Utility.RandomMinMax( 5, 10 )) );
|
||||
SkillBonuses.SetValues( 1, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)], (Utility.Random( 5 ) == 0 ? 15.0 : Utility.RandomMinMax( 5, 10 )) );
|
||||
}
|
||||
|
||||
private static SkillName[] m_PossibleBonusSkills = new SkillName[]
|
||||
{
|
||||
SkillName.Alchemy,
|
||||
SkillName.Anatomy,
|
||||
SkillName.AnimalLore,
|
||||
SkillName.ItemID,
|
||||
SkillName.ArmsLore,
|
||||
SkillName.Parry,
|
||||
SkillName.Begging,
|
||||
SkillName.Blacksmith,
|
||||
SkillName.Fletching,
|
||||
SkillName.Peacemaking,
|
||||
|
||||
SkillName.Carpentry,
|
||||
SkillName.Cartography,
|
||||
SkillName.Cooking,
|
||||
SkillName.DetectHidden,
|
||||
SkillName.Discordance,
|
||||
SkillName.EvalInt,
|
||||
SkillName.Healing,
|
||||
SkillName.Fishing,
|
||||
SkillName.Forensics,
|
||||
SkillName.Herding,
|
||||
SkillName.Hiding,
|
||||
SkillName.Provocation,
|
||||
SkillName.Inscribe,
|
||||
SkillName.Lockpicking,
|
||||
SkillName.Magery,
|
||||
SkillName.MagicResist,
|
||||
SkillName.Tactics,
|
||||
SkillName.Snooping,
|
||||
SkillName.Musicianship,
|
||||
SkillName.Poisoning,
|
||||
SkillName.Archery,
|
||||
SkillName.SpiritSpeak,
|
||||
SkillName.Stealing,
|
||||
SkillName.Tailoring,
|
||||
SkillName.AnimalTaming,
|
||||
|
||||
SkillName.Tinkering,
|
||||
SkillName.Tracking,
|
||||
SkillName.Veterinary,
|
||||
SkillName.Swords,
|
||||
SkillName.Macing,
|
||||
SkillName.Fencing,
|
||||
SkillName.Wrestling,
|
||||
SkillName.Lumberjacking,
|
||||
SkillName.Mining,
|
||||
SkillName.Meditation,
|
||||
SkillName.Stealth,
|
||||
SkillName.RemoveTrap,
|
||||
|
||||
SkillName.Necromancy,
|
||||
SkillName.Focus,
|
||||
SkillName.Chivalry,
|
||||
SkillName.Bushido,
|
||||
SkillName.Ninjitsu
|
||||
};
|
||||
|
||||
public SaintEarrings(Serial serial) : base(serial){}
|
||||
public override void Serialize( GenericWriter writer ) {base.Serialize( writer ); writer.Write( (int) 0 );}
|
||||
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt();}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user