Advertisement
qsvn

Untitled

Jan 17th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 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.  
  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 , actor =>
  25.  
  26. { if ( actor.Cast.Id == 18 || actor.Cast.Id == 985 || actor.Cast.Id == 28 )
  27. { iscastAgr = true; Wait(actor.Cast.EndTime); iscastAgr = false;}
  28.  
  29. }
  30.  
  31. );
  32. }
  33.  
  34.  
  35.  
  36. bool iscastAgr;
  37. void cleanse() {
  38. var lasttarget = Me.Target;
  39. var cheliki = Players.FirstOrDefault(p => ( p.Buffs.Any(c => debufs.Contains(c.Id)) || p.IsDead || p.HP < 75 ) && p.IsPartyMate);
  40. 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 );
  41. if ( cheliki == null && !iscastAgr && chelsagrom != null && !Me.IsDisabled && Me.SkillCooltime(1409) < 950 && !Me.Buffs.Any(b => Agri.Contains(b.Id) ) &&
  42. !Me.Buffs.Any(b => suspa.Contains(b.Id) ) )
  43. {
  44.  
  45. Client.SetTarget(chelsagrom);
  46. Client.FUseSkill(1409);
  47. Client.FSetTarget(lasttarget);
  48. }
  49.  
  50. if ( cheliki == null && iscastAgr && chelsagrom != null && !Me.IsDisabled && Me.SkillCooltime(1409) < 950 && !Me.Buffs.Any(b => Agri.Contains(b.Id) ) &&
  51. !Me.Buffs.Any(b => suspa.Contains(b.Id) ) )
  52. {
  53.  
  54. Client.SetTarget(chelsagrom);
  55. Client.FUseSkill(1409);
  56. Client.FSetTarget(lasttarget);
  57. }
  58.  
  59.  
  60. }
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement