Page 1 of 1
Realm Abilities
PostPosted: Sun Mar 09, 2014 10:01 pm
by Trixster
Hi again!
I'm having major problems with adding my own realm ability.
What I did first was add the realm ability (Shank) into an existing file such as "Anger of the Gods"
Works fine on my server, but says I can't use "Anger of the Gods" when "Shank" is in use. So I'd assumed putting both in the same file is causing the issue.
When I moved "Shank" out (keep in mind I just copied it all to the tee)
Into it's own file Shank.cs, nothing has been changed. It doesn't show up in the trainers window.
So I've spent hours and hours looking for where "Shank.cs" needs to be called from so the server can read its file, but I'm unable to locate this.
Like I said the ability works when used in an existing file, but when moved into its own, it doesn't show up now.
Implementation is DOL.GS.RealmAbilities.Shank
It seems that it can nolonger find this in its own file.
Thanks
Trixster
Re: Realm Abilities
PostPosted: Sun Mar 09, 2014 10:06 pm
by dargon
Shank.cs should be put in debug/scripts somewhere in there, Then in your database, make sure Shank is in the Abilities table, and implementation is : DOL.GS.RealmAbilities.Shank, as well as make sure all cases of any Anger of the Gods is not in Shank as that may be why you cant use both. if you want, post up the code, or send me it in a private message, and i can take a look at teh script for you
Also check to be sure AoG doesnt exist via a Handler and Effect script, some RAs have two scripts, all RR5s and some RAs use an Effect script and Handler script all in the realmabilities folder under GameServer
Re: Realm Abilities
PostPosted: Mon Mar 10, 2014 4:14 pm
by Trixster
- Code: Select all
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using DOL.GS;
using DOL.GS.PacketHandler;
using DOL.Database;
using DOL.GS.Spells;
namespace DOL.GS.RealmAbilities
{
public class AngerOfTheGodsAbility : TimedRealmAbility
{
private DBSpell m_dbspell;
private Spell m_spell = null;
private SpellLine m_spellline;
private double m_damage = 0;
private GamePlayer m_player;
public AngerOfTheGodsAbility(DBAbility dba, int level) : base(dba, level) {}
public virtual void CreateSpell(double damage)
{
m_dbspell = new DBSpell();
m_dbspell.Name = "Anger of the Gods";
m_dbspell.Icon = 7023;
m_dbspell.ClientEffect = 7023;
m_dbspell.Damage = damage;
m_dbspell.DamageType = 0;
m_dbspell.Target = "Group";
m_dbspell.Radius = 0;
m_dbspell.Type = "DamageAdd";
m_dbspell.Value = 0;
m_dbspell.Duration = 30;
m_dbspell.Pulse = 0;
m_dbspell.PulsePower = 0;
m_dbspell.Power = 0;
m_dbspell.CastTime = 0;
m_dbspell.EffectGroup = 99999; // stacks with other damage adds
m_dbspell.Range = 1000;
m_spell = new Spell(m_dbspell, 0); // make spell level 0 so it bypasses the spec level adjustment code
m_spellline = new SpellLine("RAs", "RealmAbilities", "RealmAbilities", true);
}
public override void Execute(GameLiving living)
{
if (CheckPreconditions(living, DEAD | SITTING | MEZZED | STUNNED)) return;
m_player = living as GamePlayer;
if(ServerProperties.Properties.USE_NEW_ACTIVES_RAS_SCALING)
{
switch (Level)
{
case 1: m_damage = 10.0; break;
case 2: m_damage = 15.0; break;
case 3: m_damage = 20.0; break;
case 4: m_damage = 25.0; break;
case 5: m_damage = 30.0; break;
default: return;
}
}
else
{
switch (Level)
{
case 1: m_damage = 10.0; break;
case 2: m_damage = 20.0; break;
case 3: m_damage = 30.0; break;
default: return;
}
}
CreateSpell(m_damage);
CastSpell(m_player);
DisableSkill(living);
}
protected void CastSpell(GameLiving target)
{
if (target.IsAlive && m_spell != null)
{
ISpellHandler dd = ScriptMgr.CreateSpellHandler(m_player, m_spell, m_spellline);
dd.IgnoreDamageCap = true;
dd.StartSpell(target);
}
}
public override int GetReUseDelay(int level)
{
return 600;
}
public override void AddEffectsInfo(IList<string> list)
{
if(ServerProperties.Properties.USE_NEW_ACTIVES_RAS_SCALING)
{
list.Add("Level 1: Adds 10 DPS");
list.Add("Level 2: Adds 15 DPS");
list.Add("Level 3: Adds 20 DPS");
list.Add("Level 4: Adds 25 DPS");
list.Add("Level 5: Adds 30 DPS");
list.Add("");
list.Add("Target: Group");
list.Add("Duration: 30 sec");
list.Add("Casting time: instant");
}
else
{
list.Add("Level 1: Adds 10 DPS");
list.Add("Level 2: Adds 20 DPS");
list.Add("Level 3: Adds 30 DPS");
list.Add("");
list.Add("Target: Group");
list.Add("Duration: 30 sec");
list.Add("Casting time: instant");
}
}
}
}
This is the AoG script. What needs to be changed in order to be recognized as its own spell?
Re: Realm Abilities
PostPosted: Mon Mar 10, 2014 8:16 pm
by dargon
Spell, or realm ability? also, i wanted your code with the "Shank" code as well. this doesnt have your custom code in it.
Re: Realm Abilities
PostPosted: Mon Mar 10, 2014 10:40 pm
by Trixster
Realm Ability
- Code: Select all
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using DOL.GS;
using DOL.GS.PacketHandler;
using DOL.Database;
using DOL.GS.Spells;
namespace DOL.GS.RealmAbilities
{
public class Shank: TimedRealmAbility
{
private DBSpell m_dbspell;
private Spell m_spell = null;
private SpellLine m_spellline;
private double m_damage = 0;
private GamePlayer m_player;
public Shank(DBAbility dba, int level) : base(dba, level) {}
public virtual void CreateSpell(double damage)
{
m_dbspell = new DBSpell();
m_dbspell.Name = "Shank";
m_dbspell.Icon = 3454;
m_dbspell.ClientEffect = 7033;
m_dbspell.Damage = 0;
m_dbspell.DamageType = 10;
m_dbspell.Target = "self";
m_dbspell.Radius = 0;
m_dbspell.Type = "CombatSpeedBuff";
m_dbspell.Value = damage;
m_dbspell.Duration = 60;
m_dbspell.Pulse = 0;
m_dbspell.PulsePower = 0;
m_dbspell.Power = 0;
m_dbspell.CastTime = 0;
m_dbspell.EffectGroup = 99999; // stacks with other damage adds
m_dbspell.Range = 0;
m_spell = new Spell(m_dbspell, 0); // make spell level 0 so it bypasses the spec level adjustment code
m_spellline = new SpellLine("RAs", "RealmAbilities", "RealmAbilities", true);
}
public override void Execute(GameLiving living)
{
if (CheckPreconditions(living, DEAD | SITTING | MEZZED | STUNNED)) return;
m_player = living as GamePlayer;
if(ServerProperties.Properties.USE_NEW_ACTIVES_RAS_SCALING)
{
switch (Level)
{
case 1: m_damage = -10.0; break;
case 2: m_damage = -15.0; break;
case 3: m_damage = -20.0; break;
case 4: m_damage = -25.0; break;
case 5: m_damage = -30.0; break;
default: return;
}
}
else
{
switch (Level)
{
case 1: m_damage = -10.0; break;
case 2: m_damage = -20.0; break;
case 3: m_damage = -30.0; break;
default: return;
}
}
CreateSpell(m_damage);
CastSpell(m_player);
DisableSkill(living);
}
protected void CastSpell(GameLiving target)
{
if (target.IsAlive && m_spell != null)
{
ISpellHandler dd = ScriptMgr.CreateSpellHandler(m_player, m_spell, m_spellline);
dd.IgnoreDamageCap = true;
dd.StartSpell(target);
}
}
public override int GetReUseDelay(int level)
{
return 600;
}
public override void AddEffectsInfo(IList<string> list)
{
if(ServerProperties.Properties.USE_NEW_ACTIVES_RAS_SCALING)
{
list.Add("Level 1: Adds 10 DPS");
list.Add("Level 2: Adds 15 DPS");
list.Add("Level 3: Adds 20 DPS");
list.Add("Level 4: Adds 25 DPS");
list.Add("Level 5: Adds 30 DPS");
list.Add("");
list.Add("Target: Self");
list.Add("Duration: 60 sec");
list.Add("Casting time: instant");
}
else
{
list.Add("Level 1: Adds 10 DPS");
list.Add("Level 2: Adds 20 DPS");
list.Add("Level 3: Adds 30 DPS");
list.Add("");
list.Add("Target: Self");
list.Add("Duration: 60 sec");
list.Add("Casting time: instant");
}
}
}
}
I'm just trying to figure out how to make this realm ability different then the AoG, so that I could use both and not have to wait.
Re: Realm Abilities
PostPosted: Mon Mar 10, 2014 11:26 pm
by dargon
Im reading through it now

Re: Realm Abilities
PostPosted: Mon Mar 10, 2014 11:29 pm
by dargon
m_dbspell.EffectGroup = 99999; // stacks with other damage adds
change that maybe? this is just a quick look still reading through it
Re: Realm Abilities
PostPosted: Tue Mar 11, 2014 12:09 am
by Trixster
Thank you dargon for the replies, I'll have a go at changing that and see.
Re: Realm Abilities
PostPosted: Tue Mar 11, 2014 12:10 am
by dargon
no problem, hope it works, i never made my own RA only RR5s

never had an issue once i added it to the abilities table in DB
Re: Realm Abilities
PostPosted: Tue Mar 11, 2014 1:42 pm
by Trixster
That worked!
Thank you Dargon!
Staying on-topic, so I dont need to create a new thread:
How do I alter the points needed for this realm ability?
At default 5 points.
I want to make this 14 points.
Thanks
Trixster
Re: Realm Abilities
PostPosted: Tue Mar 11, 2014 1:47 pm
by Trixster
Answering my own question: (For others)
This can be done under RealmAbility.cs.