Page 1 of 1

Minstrel RR5 Calming Notes

PostPosted: Thu Jul 05, 2007 7:02 pm
by Carnifexe
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

PostPosted: Thu Jul 05, 2007 11:31 pm
by Etaew
87303 > 65535 how does that spell work?

PostPosted: Fri Jul 06, 2007 1:49 am
by Carnifexe
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
:)