What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

How can i active one macro when i press a key?

Status
Not open for further replies.

Machlan

New Member
Joined
Oct 7, 2014
Messages
25
Reaction score
0
My puglin is:
Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
 
namespace Follower
{
    public class Dropbackteleportation : Core
    {
        public static string GetPluginAuthor()
        {
            return "Machlan";
        }
 
        public static string GetPluginVersion()
        {
            return "0.0.0";
        }
 
        public static string GetPluginDescription()
        {
            return "Dropback/teleportation for Primeval";
        }
        public void UseSkillAndWait(string skillName, bool selfTarget = false)
        {
            while (me.isCasting || me.isGlobalCooldown)
            {
                Thread.Sleep(40);
            }   
            
            if (!UseSkill(skillName, false, selfTarget))
            {
                while (me.isCasting || me.isGlobalCooldown)
                {
                    Thread.Sleep(40);
                }
            }
        }  
 
        public void PluginRun()
        {
            while (true)
            { 
                while (me.target == null)
                {      
                    Thread.Sleep(40); 
                }
                
                while (me.target != null && dist(me.target) < 35)
                {
                   if(isAttackable(me.target))
                   {        
                       do
                       {   
                    if (angle(me.target, me) > 45 && angle(me.target, me) < 315)
                    {
                        TurnDirectly(me.target);
                    }  
                    if(dist(me.target) <= 10 && skillCooldown("Drop Back") == 0 &&  skillCooldown("Teleportation") == 0 )
                    {   
                        TurnDirectly(me.target);
                        Thread.Sleep(30); 
                        UseSkillAndWait("Drop Back");
                        Thread.Sleep(200); 
                        TurnDirectly(me.target); 
                        Thread.Sleep(200);
                        Turn(3.14);
                        UseSkillAndWait("Teleportation");
                    }  
                }while(me.target != null && isAlive(me.target));
                    if (me.target != null && !isAlive(me.target) && !me.target.dropAvailable)
                    {
                        CancelTarget();
                    }
                }
            }
            }
    }
}  
}

i wana active this pluglin in pluglins manager, and always when i press the key "1" in game, it cast the combo

can anyone help me?
 
Status
Not open for further replies.
Back
Top