Realm Abilities

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Realm Abilities

Postby Trixster » Sun Mar 09, 2014 10:01 pm

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
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: Realm Abilities

Postby dargon » Sun Mar 09, 2014 10:06 pm

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
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Realm Abilities

Postby Trixster » Mon Mar 10, 2014 4:14 pm

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?
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: Realm Abilities

Postby dargon » Mon Mar 10, 2014 8:16 pm

Spell, or realm ability? also, i wanted your code with the "Shank" code as well. this doesnt have your custom code in it.
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Realm Abilities

Postby Trixster » Mon Mar 10, 2014 10:40 pm

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.
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: Realm Abilities

Postby dargon » Mon Mar 10, 2014 11:26 pm

Im reading through it now :P
Last edited by dargon on Mon Mar 10, 2014 11:30 pm, edited 1 time in total.
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Realm Abilities

Postby dargon » Mon Mar 10, 2014 11:29 pm

m_dbspell.EffectGroup = 99999; // stacks with other damage adds
change that maybe? this is just a quick look still reading through it
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Realm Abilities

Postby Trixster » Tue Mar 11, 2014 12:09 am

Thank you dargon for the replies, I'll have a go at changing that and see.
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: Realm Abilities

Postby dargon » Tue Mar 11, 2014 12:10 am

no problem, hope it works, i never made my own RA only RR5s :P never had an issue once i added it to the abilities table in DB
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Realm Abilities

Postby Trixster » Tue Mar 11, 2014 1:42 pm

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
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: Realm Abilities

Postby Trixster » Tue Mar 11, 2014 1:47 pm

Answering my own question: (For others)
This can be done under RealmAbility.cs.
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 0 guests