hey all,
So today a friend of mine asked if it was possible to extend the abilitythesix commands.
I said sure. So not knowing a whole lot about it I have a second command working of flamewave that looks like the red gates animating out yay. But that is not what I want. I want the original flames but in icy blue. Does anyone know how you would go about this? Adding hue just dont seem to cut it.
 
@jase giffin
You mean like this dude? ;) ForceTides.jpg
Code:
Effects.SendLocationParticles(EffectItem.Create(m_Point, m_Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 1593, 0, 5052, 0);

The 1593 is the custom hue I used. The 0x3709 is the effect animation. You can change that to any animationID though. If you have it, the Ultimate Hider is a great way to test animations in-game and change their Hue, plus the Render as well. Bear in mind that you will need to create a duplicate set of code for the Ability you wish to alter (otherwise that ability is altered for every mob that uses it). Then you simply refer to the Ability when you're calling the spell:

Code:
public override void OnCast()
		{
			Ability.ForceWave( Caster );
 
Holy Crap it worked..... Tass23, as always. Your a ganster. Thanks a ton for the help there.
So for future reference..
In Abilitythesix.cs
under "public partial class Ability"
look at your 6 abilities.
In this case i copied and pasted flamewave to the bottom of the list and edited flame wave to timowave..

#region TimoWave
public static void TimoWave(Mobile from)
{
if (!CanUse(from))
return;

from.Say("*Vas Ort Timo!*");

new TimoWaveTimer(from).Start();
}

internal class TimoWaveTimer : Timer
{
private Mobile m_From;
private Point3D m_StartingLocation;
private Map m_Map;
private int m_Count;
private Point3D m_Point;
public TimoWaveTimer(Mobile from)
: base(TimeSpan.FromMilliseconds(300.0), TimeSpan.FromMilliseconds(300.0))
{
this.m_From = from;
this.m_StartingLocation = from.Location;
this.m_Map = from.Map;
this.m_Count = 0;
this.m_Point = new Point3D();
this.SetupDamage(from);
}

protected override void OnTick()
{
if (this.m_From == null || this.m_From.Deleted)
{
this.Stop();
return;
}

double dist = 0.0;

for (int i = -this.m_Count; i < this.m_Count + 1; i++)
{
for (int j = -this.m_Count; j < this.m_Count + 1; j++)
{
this.m_Point.X = this.m_StartingLocation.X + i;
this.m_Point.Y = this.m_StartingLocation.Y + j;
this.m_Point.Z = this.m_Map.GetAverageZ(this.m_Point.X, this.m_Point.Y);
dist = this.GetDist(this.m_StartingLocation, this.m_Point);
if (dist < ((double)this.m_Count + 0.1) && dist > ((double)this.m_Count - 3.1))
{
Effects.SendLocationParticles(EffectItem.Create(this.m_Point, this.m_Map, EffectItem.DefaultDuration), 0x3709//animation, 10, 9,1593//color,0, 5052,0);

}
}
}

this.m_Count += 3;

if (this.m_Count > 15)
this.Stop();
}

private void SetupDamage(Mobile from)
{
foreach (Mobile m in from.GetMobilesInRange(10))
{
if (CanTarget(from, m, true, false, false))
{
Timer.DelayCall(TimeSpan.FromMilliseconds(300 * (this.GetDist(this.m_StartingLocation, m.Location) / 3)), new TimerStateCallback(Hurt), m);
}
}
}

public void Hurt(object o)
{
Mobile m = o as Mobile;

if (this.m_From == null || m == null || m.Deleted)
return;

int damage = this.m_From.Hits / 8;

if (damage > 200)
damage = 400;

AOS.Damage(m, this.m_From, damage, 0, 200, 0, 0, 0);
m.SendMessage("You are being frozen to death by the seering cold!");
}

private double GetDist(Point3D start, Point3D end)
{
int xdiff = start.X - end.X;
int ydiff = start.Y - end.Y;
return Math.Sqrt((xdiff * xdiff) + (ydiff * ydiff));
}
}
#endregion
}
}
I changed the points where it said flame wave to Timowave for my buddy..
Below that there is this.
public partial class TheSixCommands
at the bottom of the list.
CommandSystem.Register("TimoWave", AccessLevel.Seer, new CommandEventHandler(TimoWave_OnCommand));
would be the last entry for our new ability.
at the very bottom you would add this.
[Description("Use the Six's Timo Wave attack")]
public static void TimoWave_OnCommand(CommandEventArgs e)
{
Ability.TimoWave(e.Mobile);
}
that all said we now have a new ability with a hue that wont be used by the mob but can be added to new mobs using the method from the stygian dragon.
Thank you Tass23!!
 
Last edited:
Back