Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Archlord
You last visited: Today at 06:17

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Writing a macro to fire all skills one after another

Discussion on Writing a macro to fire all skills one after another within the Archlord forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2009
Posts: 25
Received Thanks: 1
Writing a macro to fire all skills one after another

Is there a way to program a macro that can essentially cruise through your entire skillbar and cast each skill one after another really quickly?

For example, I press F1 and it acts as if I just pressed 3 4 5 6 7 8 9 0 - + in game, and the delay between each new keystroke would be as minimal as possible to increase the speed at which the skills fire but at the same time as long as it needs in order to make sure that each skill gets cast and nothing gets skipped.

Basically, I want to be able to write a macro that works as if I had a G15 keyboard so I can attempt to cast all my skills in around 2-3 seconds.

Here's the example video that I'm sure you've all seen already:
I want to do that but without having to spend all my money on a fancy keyboard. Anyone have an idea?
the_magic_zebra is offline  
Old 06/05/2009, 08:41   #2
 
Newbb's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 2,384
Received Thanks: 371
i like that^^
Newbb is offline  
Old 06/05/2009, 10:59   #3
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
I won't be giving you the entire code since I don't support cheats that much, but here a start you can use if you are going to create the macro in C#. Enjoy


Quote:
class Program
{
public static bool F1Pressed = false;
static void Main(string[] args)
{
Console.WriteLine("Press F1 to start the macro");
ConsoleKeyInfo Key = Console.ReadKey();
if (Key.Key == ConsoleKey.F1)
{
F1Pressed = true;
}
while (F1Pressed)
{
// Make F1/F2/F3 etc.. equal to true so the computer thinks that they
// are being pressed. Exit the program to stop

}
}
}
Regards,
Emme
_Emme_ is offline  
Thanks
1 User
Old 06/05/2009, 11:53   #4
 
elite*gold: 0
Join Date: May 2007
Posts: 288
Received Thanks: 13
hey emme can you make a video where you show your " 1hit kill" and your other cheats? not a "how to" just to see that this is possible , thanks
_Shark_ is offline  
Old 06/05/2009, 11:57   #5
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
Quote:
Originally Posted by _Shark_ View Post
hey emme can you make a video where you show your " 1hit kill" and your other cheats? not a "how to" just to see that this is possible , thanks
As I stated in a post (or a PM, not sure) my computer got a strong trojan from a user caller XxArcherMasterxX here on e*pvp.
I had no other choise than to reformat my computer. This was about 6 months ago and I posted alot about this and tried to get help to recover files, in the CO2 PrivateServer section if you don't belive me.

I do not have this cheat left on my computer, and I wont bother making it again and honestly I dont think it's possible since they've added alot of checks since then, but maybe..
_Emme_ is offline  
Old 06/05/2009, 12:48   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 241
Received Thanks: 13
Quote:
Originally Posted by the_magic_zebra View Post
Is there a way to program a macro that can essentially cruise through your entire skillbar and cast each skill one after another really quickly?
Instead of doing it Emmas way, which im sure is awesome and everything, use macro maker. its one of those free donate if u like type things, download it, ill give link to my thread about it so it gives u a tutorial kinda how to use it.
Theworldmayneverknow is offline  
Old 06/05/2009, 12:52   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 241
Received Thanks: 13
tells you how to use it. instead of looping it tho u when u hit the start macro button it will just run threw skills and then stop
Theworldmayneverknow is offline  
Old 06/07/2009, 20:55   #8
 
elite*gold: 0
Join Date: Jun 2009
Posts: 72
Received Thanks: 16
Quote:
Originally Posted by the_magic_zebra View Post
Is there a way to program a macro that can essentially cruise through your entire skillbar and cast each skill one after another really quickly?

For example, I press F1 and it acts as if I just pressed 3 4 5 6 7 8 9 0 - + in ?
Quote:
Originally Posted by EmmeTheCoder View Post
I won't be giving you the entire code since I don't support cheats that much, but here a start you can use if you are going to create the macro in C#. Enjoy

Regards,
Emme
my first post in this froum , not sure whats going on...

Emme's starter code only works when the console in active (As u might have noticed if u code urself Zebra) if u want this to work while ur game is active, you need to write a hook (check SetWindowsHookEx fucntion info and samples of how to do it if u r not a coder then forget hooks because they are annoying and just use Emme's or register a global hot Key...).

so..... in ur C# code (or C++ .... ) u basically write a sequence of codes for each key u want (like this-->)

PostMessage(targetWindowHandle, WM_KEYDOWN, vk, scanCode);
PostMessage(targetWindowHandle, WM_UP, vk, (scanCode));
// lastPressTime = internalTime;
Thread.Sleep(castTime+lagtime);



(i guess u can get the Virtual key or scan code from ur Winspy or from

vk = VkKeyScan(key);
scanCode = (MapVirtualKey(vk, MAPVK_VK_TO_VSC) << 16) & 0x00FF0000;


ofcourse (u have to define the dlls and Windows messages as in:

[DllImport("User32.Dll")]
static extern bool PostMessage(IntPtr hWnd, uint msg, uint wParam, uint lParam);

[DllImport("user32.dll")]
static extern byte VkKeyScan(char ch);

[DllImport("user32.dll")]
public static extern uint MapVirtualKey(uint uCode, uint uMapType);


any way.... this is basically the main commands that u would need to use with Archlord (PostMessage will work fine because the Archlord Window uses Windows Messages not DirectInput or what ever, so u dont need to hook DirectInput.... PostMessage also allows u to send commands to the target window even when the windows isnt active -- like using multiple bots in the same pc minimized while u do other activities on ur pc, pretty useful--)
_Villain_ is offline  
Old 08/02/2009, 18:19   #9
 
elite*gold: 0
Join Date: Sep 2007
Posts: 46
Received Thanks: 45
How do i get the targetWindowHandle for archlord using c#?

I can send keystrokes to notepad sucessfully but not to Archlord


Code:
        const int VK_TAB = 0x09; //Tab

        [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
        
        [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);

        [DllImport("User32.Dll", EntryPoint = "PostMessageA")]
        static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam);

        [DllImport("user32.dll")]
        static extern byte VkKeyScan(char ch);



 private void button3_Click(object sender, EventArgs e)
        {
            IntPtr archhandle = FindWindow("notepad", null);
            IntPtr handle = FindWindowEx(archhandle , IntPtr.Zero, "edit", null);
            PostMessage(handle , WM_KEYDOWN, VK_TAB, 0);
        }
fragmaster is offline  
Old 08/02/2009, 22:08   #10
 
elite*gold: 0
Join Date: Sep 2007
Posts: 46
Received Thanks: 45
Ok so i managed to get Archlord Handle and can sent keystrokes to archlord whith it minimized. BUT only if in archlord you press enter to open the chat box. So the keys are registered in the chat box where you type messages but thats it so the 7 key will display but if the text box is shut it does not execute the buff in slot 7.

Anyone have any ideas on how to send keystrokes to minimised AL from C# code?

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;

namespace TestSend
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        [DllImport("user32.dll")]
        public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
        [DllImport("user32.dll")]
        public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
        [DllImport("user32.dll")]
        public static extern bool PostMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
        [DllImport("user32.dll")]
        static extern byte VkKeyScan(char ch);

        IntPtr WindowToFind = FindWindow("RwAppClass", "Archlord");

        private void button1_Click(object sender, EventArgs e)
        {
           //MessageBox.Show("Handle = " + WindowToFind);

            const int WM_KEYDOWN = 0x100;
            const int VK_TAB = 0x09; //Tab

            PostMessage(WindowToFind, WM_KEYDOWN, VkKeyScan('7'), 0); //Send to chat box only
            SendMessage(WindowToFind, WM_KEYDOWN, VkKeyScan('3'), 0); //Nothing
            PostMessage(WindowToFind, WM_KEYDOWN, VK_TAB, 0); //Should Target mob but does nothing
        }
    }
}
fragmaster is offline  
Old 08/02/2009, 23:02   #11
 
elite*gold: 0
Join Date: Jun 2009
Posts: 72
Received Thanks: 16
tool+source code

ok, i just written a small application to do that, check the attachment (you need .net framework to run it)
(i made it as simple as possible to fire the 10 skills: u can choose the delay between two skills then press FIRE SKILLS as many times as u like)

source code also included, u can use it however u like, even to add more features.....

hope its useful.


fullcode for those who dont wanna download files:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;

namespace PostMessage
{
    public partial class Form1 : Form
    {

        [DllImport("User32.Dll")]
        static extern bool PostMessage(IntPtr hWnd, uint msg, uint wParam, uint lParam);

        [DllImport("user32.dll")]
        static extern byte VkKeyScan(char ch);

        [DllImport("user32.dll")]
        public static extern uint MapVirtualKey(uint uCode, uint uMapType);


        const uint WM_KEYDOWN = 0x100;
        const uint WM_UP = 0x101;
        const uint MAPVK_VK_TO_VSC = 0;

        Process[] processList = null;
        Process targetProcess = null;
        String processName = "alefclient";
        int delay = 100;
        public Form1()
        {
            InitializeComponent();
            txtDelay.Text = "" + delay; //milli secs
        }

        private void btnPostKeys_Click(object sender, EventArgs e)
        {
            try
            {
                processList = Process.GetProcessesByName(processName);
                delay = Int32.Parse(txtDelay.Text);
                if (processList == null || processList.Length == 0)
                {
                    MessageBox.Show("target program not running");
                    return;
                }
                else
                {
                    targetProcess = processList[0];
                    pressBtn('3');
                    Thread.Sleep(delay);

                    pressBtn('4');
                    Thread.Sleep(delay);

                    pressBtn('5');
                    Thread.Sleep(delay);

                    pressBtn('6');
                    Thread.Sleep(delay);

                    pressBtn('7');
                    Thread.Sleep(delay);

                    pressBtn('8');
                    Thread.Sleep(delay);

                    pressBtn('9');
                    Thread.Sleep(delay);

                    pressBtn('0');
                    Thread.Sleep(delay);

                    pressBtn('-');
                    Thread.Sleep(delay);

                    pressBtn('+');
                    Thread.Sleep(delay);

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("something went wrong");
            }
        }

        public  void pressBtn(char key)
        {
            byte vk=VkKeyScan(key);
            uint  scanCode=(MapVirtualKey(vk, MAPVK_VK_TO_VSC) << 16) & 0x00FF0000; 

            PostMessage(targetProcess.MainWindowHandle, WM_KEYDOWN, vk, scanCode);
            PostMessage(targetProcess.MainWindowHandle, WM_UP, vk, (scanCode));
        }
    }
}
Attached Files
File Type: zip PostMessage.zip (42.9 KB, 96 views)
_Villain_ is offline  
Thanks
4 Users
Old 08/02/2009, 23:17   #12
 
elite*gold: 0
Join Date: Sep 2007
Posts: 46
Received Thanks: 45
Cheers _Villain_ massive help
fragmaster is offline  
Old 08/02/2009, 23:43   #13
 
superskunk55's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 189
Received Thanks: 29
lol i didnt bother reading all the replys,but for a simple and easy macro.Just download macro express and it will auto hook to AL.You can set it up so it will use all the skills then change to next hotbar and use the skills there then go bac to the first hotbar.Or just cycle through one hotbar.Goto www .warez-bb .org and download a cracked version of macro express.
superskunk55 is offline  
Old 08/03/2009, 09:21   #14
 
elite*gold: 0
Join Date: Sep 2007
Posts: 46
Received Thanks: 45
One of the first things i created for AL was a macro to fire all my attacks prolly about 2 yrs ago. This is a personnal challange to help with learning c#.
fragmaster is offline  
Old 05/17/2010, 00:06   #15
 
elite*gold: 0
Join Date: Feb 2009
Posts: 160
Received Thanks: 14
up! please, can someone help me to use a library to emulate keyboard? because i learn programs in c.
Or can someone make a macro wich work and give me the source code please to leanr how to program it. ^^
hokage33 is offline  
Reply


Similar Threads Similar Threads
S>Fire 130>War130>Fire 130 LVL 7 FIRE MET most skills fixed EAGLE SERVER DUKE 400kk
01/30/2010 - Conquer Online 2 Trading - 0 Replies
Selling this 2nd rb Fire for DB's or money via paypal he is fun as hell to play. Reflect often destroys even 2nd rb ninja's selling him bc i have a new fire thx to Demon boxes. This account has over 400kk donation in rank DUKE that alone is over 20dbs. So he is pretty solid in duke rank. I wont check this post much so if you are really interested message me on MSN @ [email protected]
Bot or Macro for Fire
02/21/2007 - Conquer Online 2 - 1 Replies
Anyone has a program to recommend? all those in the forum are not updated. Thanks
Fire circle macro lvling in basi
08/05/2006 - Conquer Online 2 - 3 Replies
anyone have fire circle macro lvling in basi that still can be use now?
Fire Macro
07/02/2006 - Conquer Online 2 - 2 Replies
the new version co part doest work =/...so, anyone have fire macro for fire circle in basi that still can use noow???
i need a fire tao bot or macro that works
06/27/2006 - Conquer Online 2 - 5 Replies
heyyy guyss i need a macro or a bot for taos like a lvl 97 bandit killer macro would be great???? any help would be appreciated thanks pm me please :D



All times are GMT +2. The time now is 06:17.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.