Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» ~=?{The future is here, TastyExploit officially open to the public}?=~
Tue Mar 02, 2010 11:00 pm by Dami

» My first aa script
Tue Mar 02, 2010 7:00 am by wafflemaster

» the real story behind Maverin
Tue Mar 02, 2010 1:33 am by SoundOfDeat

» Random spam
Mon Mar 01, 2010 11:52 pm by Danny1994

» [Request] EMS v56 Exe
Mon Mar 01, 2010 12:39 am by Dami

» [Blacklist] NX-Trading Blacklist.
Mon Mar 01, 2010 12:38 am by Danny1994

» I have a question regarding the meso farmer
Sat Feb 27, 2010 10:30 pm by Dami

» What are you listening to now?
Sat Feb 27, 2010 7:57 pm by Noname111111

» Video(s) Of The Day
Sat Feb 27, 2010 7:37 pm by Noname111111

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
free forum
 



Botting Functions

View previous topic View next topic Go down

Botting Functions

Post by RainCompleX on Mon Nov 23, 2009 10:53 pm

Hello Community.
Currently I'm making a Trainer (in C# Language)with Botting Functions like 'Auto Attack' or 'Auto Loot'.

I tried it often with SendKeys.Send or KeyDown functions, but no success.
Have you perhaps an idea that the key send to the process MapleStory and run?
One or two examples would be enough. Or a short explanation of how the basic structure should look like so that it works.


Thanks and have a nice day! Very Happy


-Rain
avatar
RainCompleX
New member

Posts : 11
Join date : 2009-11-08

Back to top Go down

Re: Botting Functions

Post by RainCompleX on Wed Nov 25, 2009 1:03 am

wtf? No one know that? I am sure that one of you knows it.
Damn... -.-'
avatar
RainCompleX
New member

Posts : 11
Join date : 2009-11-08

Back to top Go down

Re: Botting Functions

Post by YoY0 on Wed Nov 25, 2009 1:21 am

Hello, I believe this is something you are looking for.

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
//InteropServices is what allows us to use DllImport       

namespace ExampleBot
{
    public partial class Form1 : Form
    {

        //FindWindow
        [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr FindWindow(
            string lpClassName,
            string lpWindowName);

        //hWnd to make it easier
        IntPtr hWnd = FindWindow(
            null,
            "MapleStory");

        //PostMessage
        [return: MarshalAs(UnmanagedType.Bool)]
        [DllImport("user32.dll", SetLastError = true)]
            static extern bool PostMessage(
            IntPtr hWnd,
            uint Msg,
            int wParam,
            int lParam);
        //Define WM_KEYDOWN
            const int WM_KEYDOWN = 0x100;

        public Form1()
        {
            InitializeComponent();
        }

        private void chksendkey_CheckedChanged(object sender, EventArgs e)
        {
            tmrsendkey.Enabled ^= true;
            // ^= is xor. This means that if it's false, it will become true. If it's true, it will become false. (Opposite)
        }

        private void txtdelay_TextChanged(object sender, EventArgs e)
        {
            tmrsendkey.Interval = Convert.ToInt32(txtdelay.Text);
            //You must convert to an int because txtdelay.Text is a string and it won't convert itself :3
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            FindWindow(null, "MapleStory");
            /* null would be where the Window Class would be.
            * Which is MapleStoryClass for MS. But apparently the class
            * when the 'play screen' is up isnt' MapleStoryClass,
            * and I like opening my stuff at the play screen.
            * So I just used the Window Name instead.
            */
        }

        private void tmrsendkey_Tick(object sender, EventArgs e)
        {
            PostMessage(hWnd, WM_KEYDOWN, 0x41, 0x1e0001);
            //0x41 is wParam and 0x1e0001 is lParam
            //You can find a list of these at http://pastebin.com/f6c1db818

        }
    }
}


This was posted by Konr a while back. I think it should do the job. But don't just copy and paste the code, look over it and learn.

Have fun.


Note: I haven't tested this source.
avatar
YoY0
Moderator
Moderator

Posts : 240
Join date : 2009-08-13
Location : The British Empire

Back to top Go down

Re: Botting Functions

Post by RainCompleX on Wed Nov 25, 2009 1:37 am

Thanks YoY0 for your answer. Smile

Im still learning, yes Wink

But it remains an open question.
How can I set the time of the keys pressed so the length of time?


Thanks and have a nice day Wink
avatar
RainCompleX
New member

Posts : 11
Join date : 2009-11-08

Back to top Go down

Re: Botting Functions

Post by wuuut1337 on Wed Nov 25, 2009 2:04 am

Timer for perma press. (change delay of timer ofc)

wuuut1337
New member

Posts : 1
Join date : 2009-11-22

Back to top Go down

Re: Botting Functions

Post by wafflemaster on Sat Nov 28, 2009 1:45 pm

wuuut1337 wrote:Timer for perma press. (change delay of timer ofc)

or use a thread + a loop ;D
Code:

LOOP:
PostMessage(whatever);
Thread.Sleep(delay);
goto LOOP;

you can suspend/resume that thread whenever you want, so it's handy.

wafflemaster
V.I.P
V.I.P

Posts : 123
Join date : 2009-10-27

Back to top Go down

Re: Botting Functions

Post by Dami on Sat Nov 28, 2009 2:23 pm

wafflemaster wrote:
wuuut1337 wrote:Timer for perma press. (change delay of timer ofc)

or use a thread + a loop ;D
Code:

LOOP:
PostMessage(whatever);
Thread.Sleep(delay);
goto LOOP;

you can suspend/resume that thread whenever you want, so it's handy.

I believe its better to just use 'while' or so for the loop so you can kill it when you want.
avatar
Dami
Dragon
Dragon

Posts : 1414
Join date : 2009-08-10
Age : 28
Location : Finland

Back to top Go down

Re: Botting Functions

Post by RainCompleX on Sun Nov 29, 2009 7:17 am

Dami, could I have a example Code with while?


I tried it out with 'do - while' and so on

It work, but I need something that activate it with checking, and unchecking the boxes

And with 'if' I didn't success :/
avatar
RainCompleX
New member

Posts : 11
Join date : 2009-11-08

Back to top Go down

Re: Botting Functions

Post by wafflemaster on Sun Nov 29, 2009 10:12 am

Dami wrote:
wafflemaster wrote:
wuuut1337 wrote:Timer for perma press. (change delay of timer ofc)

or use a thread + a loop ;D
Code:

LOOP:
PostMessage(whatever);
Thread.Sleep(delay);
goto LOOP;

you can suspend/resume that thread whenever you want, so it's handy.

I believe its better to just use 'while' or so for the loop so you can kill it when you want.

Meh, it wastes clock cycles, but whatever. Since the loop is running on a separate thread, you can always kill that thread whenever you feel like it.

wafflemaster
V.I.P
V.I.P

Posts : 123
Join date : 2009-10-27

Back to top Go down

Re: Botting Functions

Post by Dami on Mon Nov 30, 2009 1:33 am

wafflemaster wrote:
Dami wrote:
wafflemaster wrote:
wuuut1337 wrote:Timer for perma press. (change delay of timer ofc)

or use a thread + a loop ;D
Code:

LOOP:
PostMessage(whatever);
Thread.Sleep(delay);
goto LOOP;

you can suspend/resume that thread whenever you want, so it's handy.

I believe its better to just use 'while' or so for the loop so you can kill it when you want.

Meh, it wastes clock cycles, but whatever. Since the loop is running on a separate thread, you can always kill that thread whenever you feel like it.

Depends on what it is doing really, if its a long one then killing would be better, but if its only doing one action it could be just turned off by switching the condition state.

RainCompleX wrote:Dami, could I have a example Code with while?


I tried it out with 'do - while' and so on

It work, but I need something that activate it with checking, and unchecking the boxes

And with 'if' I didn't success :/

Code:
while(Condition){
//Code
Sleep(time);
}
avatar
Dami
Dragon
Dragon

Posts : 1414
Join date : 2009-08-10
Age : 28
Location : Finland

Back to top Go down

Re: Botting Functions

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum