Minstrel RR5 Calming Notes

Discussions on various DOL development features

Moderator: Support Team

Minstrel RR5 Calming Notes

Postby Carnifexe » Thu Jul 05, 2007 7:02 pm

Code from Ariadolis for Dol

Ability Handler:
Code: Select all
using System;
using System.Collections.Generic;
using System.Text;
using System;
using System.Collections;
using System.Reflection;
using DOL.GS;
using DOL.GS.PacketHandler;
using DOL.GS.Effects;
using DOL.GS.Scripts;
using DOL.Events;
using DOL.Database;
using DOL.GS.Spells;
using DOL.AI.Brain;

namespace DOL.GS.RealmAbilities
{
public class CalmingNotesAbility : RR5RealmAbility
{
public CalmingNotesAbility(DBAbility dba, int level) : base(dba, level) { }
private GamePlayer player;

public override void Execute(GameLiving living)
{
if (CheckPreconditions(living, DEAD | SITTING | MEZZED | STUNNED)) return;

GamePlayer player = living as GamePlayer;
if (player == null)
return;
foreach (GameNPC enemy in player.GetNPCsInRadius(700))
{
if (enemy.Realm != player.Realm && enemy.IsAlive && enemy.Brain is IControlledBrain)
{

Spell subspell = SkillBase.GetSpellByID(87303);
ISpellHandler spellhandler = Scripts.ScriptMgr.CreateSpellHandler(player, subspell, SkillBase.GetSpellLine(GlobalSpellsLines.Reserved_Spells));
spellhandler.StartSpell(enemy);
}
}
DisableSkill(player);
}
public override int GetReUseDelay(int level)
{
return 600;
}
public override void AddEffectsInfo(System.Collections.IList list)
{
list.Add("Insta-cast spell that mesmerizes all enemy pets within 750 radius for 30 seconds.");
list.Add("");
list.Add("Radius: 700");
list.Add("Target: Pet");
list.Add("Duration: 30 sec");
list.Add("Casting time: instant");
}


}
}
Spellhandler for Petmezz:
Code: Select all
using System;
using DOL.AI.Brain;
using DOL.GS;
using DOL.GS.PacketHandler;
using DOL.GS.Effects;
using DOL.Events;

namespace DOL.GS.Spells
{
[SpellHandlerAttribute("CalmingNotes")]
public class CalmingNotesSpellHandler : MesmerizeSpellHandler
{
public CalmingNotesSpellHandler(GameLiving caster, Spell spell, SpellLine spellLine) : base(caster, spell, spellLine) { }
public override int CalculateSpellResistChance(GameLiving target)
{
return 0;
}
protected override int CalculateEffectDuration(GameLiving target, double effectiveness)
{
return Spell.Duration;
}
}
}
Add into the Database an Mezz entry for the Spellhandler finish!


Bye your Carnifexe
Boss and Coder of Ariadolis
User avatar
Carnifexe
DOL Experienced
 
Posts: 194
Joined: Sun Sep 25, 2005 11:54 pm
Location: Hamburg / Germany

Postby Etaew » Thu Jul 05, 2007 11:31 pm

87303 > 65535 how does that spell work?
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Postby Carnifexe » Fri Jul 06, 2007 1:49 am

87303 > 65535 how does that spell work?
87303 Change this id you want to be the mezz into the spell database!
This was my spellid into the spell
:)
Boss and Coder of Ariadolis
User avatar
Carnifexe
DOL Experienced
 
Posts: 194
Joined: Sun Sep 25, 2005 11:54 pm
Location: Hamburg / Germany


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest