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;
- using System.Windows.Forms;
- public class Script : ScriptBase {
- public override void OnStart() {
- base.OnStart();
- CreateTimer(10000,rebuff);
- CreateTimer(350,Follow);
- CreateTimer(350,farm);
- EnabledChanged(true, () => Centr = Me.Location);
- CreateTimer(100, Farm1);
- }
- Vector Centr;
- int Range = 1000; // на какой рейндже от цетра выбирать мобов. Центр переопределяется при включении галки
- int[] buffsIds = {1035};
- int[] selfbuffs1 = {297};
- int[] selfbuffs2 = {360};
- int[] selfbuffs3 = {78};
- void rebuff() {
- if (!Me.IsInCombat
- && ( Me.BuffEndtime(1035) < 480000
- || !Me.Buffs.Any(b => buffsIds.Contains(b.Id)) ) )
- {
- Client.BoardOpen();
- Client.BoardSelect(0);Wait(500);
- Client.BoardSelect(12);Wait(500);
- }
- }
- public bool _canfarm() {
- if ( Me.BuffEndtime(1035) < 480000
- || !Me.Buffs.Any(b => buffsIds.Contains(b.Id)) )
- return false;
- else return true;
- }
- void Follow() {
- foreach (var guy in Players)
- if ( guy.IsPartyLeader && Me.DistanceTo(guy) > 50 ) {
- Client.MoveToLocation(guy.Location);
- }
- }
- void Farm1()
- {
- var target = Mobs.OrderBy(m => m.DistanceToUser).FirstOrDefault(m => !m.IsDead && m.Location.DistanceTo(Centr) < Range);
- if(target == null)
- return;
- if(Me.DistanceTo(target) > 100)
- {
- Client.MoveToLocation(target.Location, 80, 500); //подбежать
- return;
- }
- Client.SetTarget(target);
- Client.UseSkill(361);
- Client.UseSkill(48);
- Client.UseSkill(452);
- Client.UseSkill(116);
- Client.
- }
- void farm() {
- foreach (var guy in Players)
- if ( guy.IsPartyLeader && Me.DistanceTo(guy.Target) < 450 && _canfarm() && Me.Class.Id == 88) // для глада
- {Client.Assist(guy);
- Client.FUseSkill(9);
- Client.FUseSkill(7);
- }
- foreach (var guy in Players)
- if ( guy.IsPartyLeader && Me.DistanceTo(guy.Target) < 100 && _canfarm() && Me.Class.Id == 89 && Me.Name == "dantepwnz" ) // для вла
- {Client.Assist(guy);
- Client.FUseSkill(361);
- Client.FUseSkill(48);
- Client.FUseSkill(452);
- Client.FUseSkill(116);
- }
- if ( Me.Charges < 7 && Me.SkillCooltime(7) == 0 ) {
- Client.FUseSkill(8);
- }
- if ( !Me.Buffs.Any(b => selfbuffs1.Contains(b.Id) ) ) {
- Client.FUseSkill(297);
- }
- if ( !Me.Buffs.Any(b => selfbuffs2.Contains(b.Id) ) ) {
- Client.FUseSkill(360);
- }
- if ( !Me.Buffs.Any(b => selfbuffs3.Contains(b.Id) ) ) {
- Client.FUseSkill(78);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement