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 {
- const int skilluse = 1436; //скилл которым сбивать
- const int distance = 900; //дистанция до цели
- //id скилов которые сбивать
- readonly int[] High = new int[] {1419};
- readonly int[] Medium = new int[] {1419};
- readonly int[] Low = new int[] {1419};
- public uint _castEndTime;
- public bool isHighPrioritet;
- public bool isMediumhPrioritet;
- public bool isLowPrioritet;
- public override void OnStart() {
- base.OnStart();
- CastStarted(sopInterruptHigh);
- CastStarted(sopInterruptMedium);
- CastStarted(sopInterruptLow);
- }
- void sopInterruptHigh () {
- var enemy = Players.FirstOrDefault(m => m.IsValid && m.IsAttackable );
- if ( shouldInterruptHigh(enemy) && cancast ) {
- if ( !Me.Target
- public bool shouldInterruptHigh(L2Live actor){
- if ( (actor.Cast.EndTime > 0) && (High.Contains(actor.Cast.Id) ) )
- {
- isHighPrioritet = true;
- return true;
- }
- else
- return false;
- }
- public bool shouldInterruptMedium(L2Live actor){
- if ( (actor.Cast.EndTime > 550 ) && (Medium.Contains(actor.Cast.Id) ) )
- {
- isMediumhPrioritet = true;
- return true;
- }
- else
- return false;
- }
- public bool shouldInterruptLow(L2Live actor){
- if ( (actor.Cast.EndTime > 550 ) && (Low.Contains(actor.Cast.Id) ) )
- {
- isLowPrioritet = true;
- return true;
- }
- else
- return false;
- }
- public bool isInterrupted(L2live obj){
- if ( (obj.Cast.EndTime = 0) && ( GetTickCount() < _castEndTime) ) {
- return true;
- }
- }
- public bool cancast()
- {
- int[] celesids = {1418, 1427};
- if (!Me.IsAffraid || !Me.IsTranced || !Me.IsDead || !Me.IsAnchored || !Me.IsMedused ||
- !Me.IsDead || ( !Me.Buffs.Any(b1 => celesids.Contains(b1.Id) ) )|| !Me.IsSilenced )
- return true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment