Advertisement
qsvn

Untitled

Jan 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.36 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using NewWidget.Core;
  5. using NewWidget.Core.Native;
  6. using NewWidget.Core.Scripting;
  7.  
  8. public class Script : ScriptBase {
  9.    
  10.     int[] debufs = new int[] {  48/*stunWL*/, 452/*stunWL2*/, 361/*stunWL3*/, 775/*disarmGLAD*/, 762/*crusher*/, 763/*massfearHK*/, 1169/*fear*/, 1339/*firevortex*/, 1340/*icevortex*/, 1341/*windvortex*/,
  11.         1263/*gloom*/, 1269/*kolba*/, 1336/*doom*/, 1422/*dod*/, 1396/*mbf*/, 98/*swsSalo*/, 407/*swsSymphony*/, 437/*sws3Salo*/,  101/*archerStun*/, 342/*ToD*/,
  12.         260/*overSTUN*/, 1092/*overFear*/,  1248/*suspa*/, 1246/*silence*/, 1064/*silence*/, 1509/*limit*/, 1104/*winter*/, 485/*disarm*/,
  13.         794/*massdisarm*/, 793/*rush*/, 1447/*silenceSB*/, 522/*RT*/};
  14.    
  15.     int[] Agri = {18,985,28};
  16.     int [] suspa = {1248};
  17.    
  18.    
  19.     public override void OnStart() {
  20.         var cheliki = Players.FirstOrDefault(p => ( p.Buffs.Any(c => debufs.Contains(c.Id)) || p.IsDead  || p.HP < 75 ) && p.IsPartyMate);
  21.         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 );
  22.         base.OnStart();
  23.         CreateTimer(15,cleanse);
  24.         CastStarted( actor =>  ( actor.Cast.Id == 18 || actor.Cast.Id == 985 || actor.Cast.Id == 28 ) && actor.Target == chelsagrom &&
  25.                     cheliki == null && chelsagrom != null &&  !Me.IsDisabled && Me.SkillCooltime(1409) < 950 && !Me.Buffs.Any(b => Agri.Contains(b.Id) ) &&
  26.                     !Me.Buffs.Any(b => suspa.Contains(b.Id) ) , actor =>  { Client.FSetTarget(chelsagrom);  Client.FUseSkill(1409);}
  27.                    );
  28.        
  29.     }
  30.    
  31.    
  32.    
  33.    
  34.    
  35.     bool iscastAgr;
  36.     void cleanse() {
  37.         var lasttarget = Me.Target;
  38.         var cheliki = Players.FirstOrDefault(p => ( p.Buffs.Any(c => debufs.Contains(c.Id)) || p.IsDead  || p.HP < 75 ) && p.IsPartyMate);
  39.         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 );
  40.         if (  cheliki == null && !iscastAgr  && chelsagrom != null && !Me.IsDisabled && Me.SkillCooltime(1409) < 950 && !Me.Buffs.Any(b => Agri.Contains(b.Id) ) &&
  41.             !Me.Buffs.Any(b => suspa.Contains(b.Id) )  )
  42.         {
  43.            
  44.             Client.SetTarget(chelsagrom);
  45.             Client.FUseSkill(1409);
  46.             Client.FSetTarget(lasttarget);
  47.         }
  48.        
  49.        
  50.        
  51.        
  52.     }
  53.    
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement