Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using NewWidget.Core;
- using NewWidget.Core.Native;
- using NewWidget.Core.Scripting;
- public class Script : ScriptBase {
- int[] debufs = new int[] { 48/*stunWL*/, 452/*stunWL2*/, 361/*stunWL3*/, 775/*disarmGLAD*/, 762/*crusher*/, 763/*massfearHK*/, 1169/*fear*/, 1339/*firevortex*/, 1340/*icevortex*/, 1341/*windvortex*/,
- 1263/*gloom*/, 1269/*kolba*/, 1336/*doom*/, 1422/*dod*/, 1396/*mbf*/, 98/*swsSalo*/, 407/*swsSymphony*/, 437/*sws3Salo*/, 101/*archerStun*/, 342/*ToD*/,
- 260/*overSTUN*/, 1092/*overFear*/, 1248/*suspa*/, 1246/*silence*/, 1064/*silence*/, 1509/*limit*/, 1104/*winter*/, 485/*disarm*/,
- 794/*massdisarm*/, 793/*rush*/, 1447/*silenceSB*/, 522/*RT*/};
- int[] Agri = {18,985,28};
- int [] suspa = {1248};
- public override void OnStart() {
- var cheliki = Players.FirstOrDefault(p => ( p.Buffs.Any(c => debufs.Contains(c.Id)) || p.IsDead || p.HP < 75 ) && p.IsPartyMate);
- var chelsagrom = PartyMembers.FirstOrDefault( p => p.Buffs.Any( c => Agri.Contains(c.Id) ) && ( p.IsMage || p.Class.Id == 97 ) && p.DistanceTo(Me) < 600 && Me.SkillCooltime(1409) < 950 );
- base.OnStart();
- CreateTimer(15,cleanse);
- CastStarted( actor => ( actor.Cast.Id == 18 || actor.Cast.Id == 985 || actor.Cast.Id == 28 ) && actor.Target == chelsagrom &&
- cheliki == null && chelsagrom != null && !Me.IsDisabled && Me.SkillCooltime(1409) < 950 && !Me.Buffs.Any(b => Agri.Contains(b.Id) ) &&
- !Me.Buffs.Any(b => suspa.Contains(b.Id) ) , actor => { Client.FSetTarget(chelsagrom); Client.FUseSkill(1409);}
- );
- }
- bool iscastAgr;
- void cleanse() {
- var lasttarget = Me.Target;
- var cheliki = Players.FirstOrDefault(p => ( p.Buffs.Any(c => debufs.Contains(c.Id)) || p.IsDead || p.HP < 75 ) && p.IsPartyMate);
- var chelsagrom = PartyMembers.FirstOrDefault( p => p.Buffs.Any( c => Agri.Contains(c.Id) ) && ( p.IsMage || p.Class.Id == 97 ) && p.DistanceTo(Me) < 600 && Me.SkillCooltime(1409) < 950 );
- if ( cheliki == null && !iscastAgr && chelsagrom != null && !Me.IsDisabled && Me.SkillCooltime(1409) < 950 && !Me.Buffs.Any(b => Agri.Contains(b.Id) ) &&
- !Me.Buffs.Any(b => suspa.Contains(b.Id) ) )
- {
- Client.SetTarget(chelsagrom);
- Client.FUseSkill(1409);
- Client.FSetTarget(lasttarget);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement