Advertisement
Guest User

Untitled

a guest
May 16th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 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. using System.Windows.Forms;
  8.  
  9. public class Script : ScriptBase {
  10.  
  11.  
  12.  
  13. public override void OnStart() {
  14. base.OnStart();
  15. CreateTimer(10000,rebuff);
  16. CreateTimer(350,Follow);
  17. CreateTimer(350,farm);
  18. EnabledChanged(true, () => Centr = Me.Location);
  19. CreateTimer(100, Farm1);
  20. }
  21.  
  22. Vector Centr;
  23. int Range = 1000; // на какой рейндже от цетра выбирать мобов. Центр переопределяется при включении галки
  24. int[] buffsIds = {1035};
  25. int[] selfbuffs1 = {297};
  26. int[] selfbuffs2 = {360};
  27. int[] selfbuffs3 = {78};
  28.  
  29. void rebuff() {
  30. if (!Me.IsInCombat
  31. && ( Me.BuffEndtime(1035) < 480000
  32. || !Me.Buffs.Any(b => buffsIds.Contains(b.Id)) ) )
  33. {
  34.  
  35. Client.BoardOpen();
  36. Client.BoardSelect(0);Wait(500);
  37. Client.BoardSelect(12);Wait(500);
  38.  
  39. }
  40.  
  41. }
  42.  
  43. public bool _canfarm() {
  44.  
  45. if ( Me.BuffEndtime(1035) < 480000
  46. || !Me.Buffs.Any(b => buffsIds.Contains(b.Id)) )
  47. return false;
  48. else return true;
  49. }
  50.  
  51. void Follow() {
  52. foreach (var guy in Players)
  53. if ( guy.IsPartyLeader && Me.DistanceTo(guy) > 50 ) {
  54. Client.MoveToLocation(guy.Location);
  55. }
  56. }
  57. void Farm1()
  58. {
  59.  
  60. var target = Mobs.OrderBy(m => m.DistanceToUser).FirstOrDefault(m => !m.IsDead && m.Location.DistanceTo(Centr) < Range);
  61. if(target == null)
  62. return;
  63. if(Me.DistanceTo(target) > 100)
  64. {
  65. Client.MoveToLocation(target.Location, 80, 500); //подбежать
  66. return;
  67. }
  68. Client.SetTarget(target);
  69. Client.UseSkill(361);
  70. Client.UseSkill(48);
  71. Client.UseSkill(452);
  72. Client.UseSkill(116);
  73. Client.
  74. }
  75.  
  76. void farm() {
  77. foreach (var guy in Players)
  78. if ( guy.IsPartyLeader && Me.DistanceTo(guy.Target) < 450 && _canfarm() && Me.Class.Id == 88) // для глада
  79. {Client.Assist(guy);
  80. Client.FUseSkill(9);
  81. Client.FUseSkill(7);
  82. }
  83.  
  84. foreach (var guy in Players)
  85. if ( guy.IsPartyLeader && Me.DistanceTo(guy.Target) < 100 && _canfarm() && Me.Class.Id == 89 && Me.Name == "dantepwnz" ) // для вла
  86. {Client.Assist(guy);
  87. Client.FUseSkill(361);
  88. Client.FUseSkill(48);
  89. Client.FUseSkill(452);
  90. Client.FUseSkill(116);
  91. }
  92.  
  93.  
  94. if ( Me.Charges < 7 && Me.SkillCooltime(7) == 0 ) {
  95. Client.FUseSkill(8);
  96. }
  97.  
  98. if ( !Me.Buffs.Any(b => selfbuffs1.Contains(b.Id) ) ) {
  99. Client.FUseSkill(297);
  100. }
  101. if ( !Me.Buffs.Any(b => selfbuffs2.Contains(b.Id) ) ) {
  102. Client.FUseSkill(360);
  103. }
  104. if ( !Me.Buffs.Any(b => selfbuffs3.Contains(b.Id) ) ) {
  105. Client.FUseSkill(78);
  106. }
  107.  
  108. }
  109.  
  110.  
  111.  
  112.  
  113.  
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement