elitepvpers

elitepvpers (https://www.elitepvpers.com/forum/)
-   Mabinogi Hacks, Bots, Cheats & Exploits (https://www.elitepvpers.com/forum/mabinogi-hacks-bots-cheats-exploits/)
-   -   [Release] Cloud Bot (https://www.elitepvpers.com/forum/mabinogi-hacks-bots-cheats-exploits/617845-release-cloud-bot.html)

Cloudsdabomb 06/20/2010 20:37

[Release] Cloud Bot
 
Guys.I looked over the most simplest problem =P. run my bot as a script not an exe. Halfslashed help me haha i feel like a real idiot right now sorry guys.
Here's the script if you need it. and pictures is up to you .[Only registered and activated users can see links. Click Here To Register...]

Halfslashed 06/20/2010 21:44

Here's the bot with a few tweaks and comments on the bot.

Code:

#include <ImageSearch.au3>
Global $Paused
HotKeySet("{PAUSE}", "TogglePause") ; Pause the script with "Pause"
HotKeySet("{ESC}", "Stop") ; End the script with ESC
$x1=0
$y1=0
$x2=0
$y2=0
MsgBox(0,"Notice","Click OK to start")
sleep(3000)
While 1
Send ("{F3}") ; Smash Hotkey
Send ("{ALTDOWN}")
Sleep(4000)
Send ("{CTRLDOWN}")
Sleep (500)
MouseClick ("left")
Sleep (500)
MouseClick ("left")
Sleep (500)
MouseClick ("left")
Sleep (500)
MouseClick ("left")
Sleep (500)
MouseClick ("left")
Sleep (500)
Send ("{CTRLUP}")
Sleep (4000)
$result = _ImageSearch("Fomor.png",1,$x1,$y1,100)
if $result=1 Then ; If there is a fomor scroll, pick it up
MouseMove($x1,$y1,0)
sleep (250)
MouseClick("left",$x1,$y1,1,3)
sleep(1000)
EndIf
$result2 = _ImageSearch("Gold.png",1,$x2,$y2,100)
if $result2=1 Then ; If there is gold on the ground, pick it up
MouseMove($x2,$y2,0)
sleep (250)
MouseClick("left",$x3,$y3,1,3)
sleep(1000)
EndIf
Send ("{ALTUP}")
WEnd

Func TogglePause() ; Pause function
$Paused = not $Paused
While $Paused
    ToolTip("paused")
sleep(100)
WEnd
EndFunc

Func Stop() ; End function
Exit 0
EndFunc


Theri 06/23/2010 04:51

Code:

#include <ImageSearch.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
Global Const $VK_DELETE = 0x2E
Global Const $VK_ESCAPE = 0x1B
Global $hFunc,$pFunc,$hHook,$hMod
Global $x=0,$y=0,$result,$window="Mabinogi"
Opt("OnExitFunc","_cleanUp")

$hFunc = DllCallbackRegister('_KeyboardHook', 'lresult', 'int;uint;uint')
$pFunc = DllCallbackGetPtr($hFunc)
$hMod = _WinAPI_GetModuleHandle(0)
$hHook = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, $pFunc, $hMod)

MsgBox(0,"Notice","Click OK to start")
If Not WinActive($window) Then WinActivate($window)
Sleep(3000)
While 1
        If WinActive($window) Then
                Send ("{F3}") ; Smash Hotkey
                Send ("{ALTDOWN}")
                Send ("{CTRLDOWN}")
                Sleep (500)
                If $x = 0 Then
                        Local $pos = MouseGetPos()
                        $x = $pos[0]
                        $y = $pos[1]
                EndIf
                MouseClick ("primary",$x,$y,4,100)
                Sleep (500)
                Send ("{CTRLUP}")
                Sleep (4000)
                $result = _ImageSearch("Fomor.png",1,$x,$y,100)
                If $result = 1 Then ; If there is a fomor scroll, pick it up
                        MouseMove($x,$y,0)
                        Sleep (250)
                        MouseClick("primary",$x,$y,1)
                        Sleep(1000)
                EndIf
                $result = _ImageSearch("Gold.png",1,$x,$y,100)
                If $result = 1 Then ; If there is gold on the ground, pick it up
                        MouseMove($x,$y,0)
                        Sleep (250)
                        MouseClick("primary",$x,$y,1)
                        Sleep(1000)
                EndIf
                Send ("{ALTUP}")
        Else
                Sleep(1000)
        EndIf
WEnd

;Functions
Func _cleanUp()
        ControlSend("", "", "", "text", 0)
        Send("{ALTUP}")
        Send("{CTRLUP}")
    _WinAPI_UnhookWindowsHookEx($hHook)
    DllCallbackFree($hFunc)
EndFunc

Func _KeyboardHook($iCode, $iwParam, $ilParam)
    Local $tKBDLLHS = DllStructCreate($tagKBDLLHOOKSTRUCT, $ilParam)
    Local $iVkCode
    If $iCode > -1 Then
        $iVkCode = DllStructGetData($tKBDLLHS, 'vkCode')
        If $iwParam = $WM_KEYUP Then
            Switch $iVkCode
                Case $VK_ESCAPE
                                        ;Exits.
                                        Exit(0)
                Case $VK_DELETE
                                        ;Short pause.
                                        Sleep(10000)
            EndSwitch
        EndIf
    EndIf   
    Return _WinAPI_CallNextHookEx($hHook, $iCode, $iwParam, $ilParam)
EndFunc


Halfslashed 06/23/2010 05:28

Lol, pro'd by Theri. He's a lot better with autoit than me, because that is his primary area of expertise.

Theri 06/23/2010 05:45

;) I also use autoit for other projects so I probably have a ton more practice with it.

That code is not tested and that should have a working exit and pause hot key, they worked for me when I played as hotkeyset does not work with mabinogi.

BitOfHope 06/23/2010 10:57

The bot runs fine for a bit, but then he starts to attack a tree or signpost or something. I was wondering if there was any way to make my character stop hitting them and go back to monsters without me having to intervene?

Also, even if a monster is closer to the mouse when it clicks to attack it stays attacking the non monster. (Sorry if that doesn't make sense. =\)

Cloudsdabomb 06/24/2010 07:40

im guessing you're running mods?

BitOfHope 06/24/2010 07:55

Yeah I am, so if i remove them, he won't get stuck?

Sorry, I'm a noob with all this stuff TT~TT

Haha, gratz on the 123 post count btw. Lol

EDIT: Ok, removing the mods fixed that issue, but now I'm wondering if there is a way to stop my character from getting stuck on trees/rocks/etc.

Cloudsdabomb 06/26/2010 03:23

it doesnt for me... mess around with the script a little to make it work for you.

boooooooy 06/28/2010 20:49

I'm trying use Theri's script but I keep getting an error on the ALTUP line, flame all you want for my general lack
of know how in AutoIt but then at least point me in the right direction.

I've already searched the AutoIt section of the forums and looked at several Tutorials and Guides for AutoIt and
none of them seem to cover my error.


Here's what it looks like;
Spoiler:
Edit: I got rid of this error on line 49 it had ("{ALTUP"} so I changed it to ("{ALTUP}")

[Only registered and activated users can see links. Click Here To Register...]

But now I'm getting this error..

[Only registered and activated users can see links. Click Here To Register...]

Theri 06/28/2010 21:21

I'm not at home now and most my scripts are on my external drive. I see you fixed the missing bracket. For the other problem I probably forgot to include a line, I'll post up when I figure out what I forgot.

edit:

Add
Code:

#include <WinAPI.au3>
to the top. The origonal code in the post has been updated to fix both errors.

Brenpat 06/30/2010 20:51

I get an error on line 27, it says its an unknown function name?

I used Theri's script on the first page, any suggestions?

Halfslashed 07/01/2010 01:45

.. Read the post above you.

Cloudsdabomb 07/01/2010 06:15

Lmao

superwrong266 07/01/2010 20:40

quick question: i've made autoit scripts for past nexon events, and was wondering how u get the hotkeys to work in mabi. i used 2 example script from the help files.

HotKeySet("{TAB}", "TogglePause")
HotKeySet("{-}", "Terminate")

they'll only work if i alt+tab outside of mabi ... feels like mabi blocks me from using hotkeys while in game??

edit: any good idea on how to get bot to buy more fireworks after they fired them all.

currently i have to manually buy 6 stacks everytime, so i afk only 3 hours...ish...before they run outta fireworks

Theri 07/02/2010 04:02

@superwrong266

See my version of clouds bot for a working example of how to make hotkeys that work with the mabinogi client as your active window.

for the second part, pixel/image search and mouseclicks to buy what you want.

Theri 07/07/2010 22:02

A little bump to the thread. My version of the bot has been updated a few times to fix some errors as pointed out to me in private messages. Should be working fine now.

DarkxStorm 07/08/2010 09:00

The bot runs perfectly fine, except it doesn't pickup gold. Why does this happen? I've taken my own images correctly. I have disabled the UAC on Vista as well.

Theri 07/08/2010 18:30

I know the scripts posted here are using png file formats, I personally find bmp to be a better choice for this. Id suggesting taking new screen shots, cutting out a new "gold" image and saving it as a bmp. Then I'd test it and tweak the tolerance setting till it starts picking up gold.

watertoad 07/08/2010 21:24

srry im a noob but how do u start it?

EDIT:nvm but i get an error about fomor ill post the error when i get it again
----------------------------------------------------------------------------------------------------
i get error Line 33 (File "C:\Program Files\AutoIt3\ImageSearch.au3"):
$result= _ImageSearch("fomor.png",1,$x,$y,100)
$result= ^ ERROR

ERROR: Unknown function name
-------------------------------------------------------------------------------------------------
EDIT2: fixed

watertoad 07/09/2010 01:39

Quote:

Originally Posted by Theri (Post 5913988)
I know the scripts posted here are using png file formats, I personally find bmp to be a better choice for this. Id suggesting taking new screen shots, cutting out a new "gold" image and saving it as a bmp. Then I'd test it and tweak the tolerance setting till it starts picking up gold.

i dont know wat the tolerance setting is i saved pictures as bmp and changed that part in the script to .bmp but i dont pick up scrolls or gold help:confused:

Edit: im going to use the bot to prof until i get a reply

Theri 07/09/2010 04:53

Code:

$result = _ImageSearch("Fomor.png",1,$x,$y,100)
Where "Fomor.png" is the name of the image, 1 is how the result is returned, $x and $y are coordinates and 100 is the tolerance. You might have to go as high as 150, max is 255 but that means it will match against everything. Try changing the 100 to like 125 or 150 and see if it matches.

watertoad 07/10/2010 16:53

i got it to pick up gold and fomor scrolls but it doesnt always pick it up.

cookiexu 07/10/2010 19:24

Is it possible to use the function MouseTrap() to trap the mouse into a certain resolution? (Ex: 800x600 inside of a screen that is much bigger)

Imagesearch tend to select the mobs that is farthest away. Usually on top.

Theri 07/10/2010 19:34

Nothing you can do about it in this script. Imagesearch isnt the one selecting the mobs, in this script it is only used to find fomor and gold to pick up.

welshdragon2005 12/04/2010 21:32

Only problem that I had with this bot was dying. It was an easy fix of adding a few lines for image search to pick up on and placing the proper images in the same folder as the .exe (I haven't had any problems running it as an exe)
Just get a picture of the "Revive right here" button and a picture of the "OK" confirmation button.

Code:

                $result = _ImageSearch("Revive.png",1,$x,$y,100)
                If $result = 1 Then ; If you are dead, revive where you are
                        MouseMove($x,$y,0)
                        Sleep (250)
                        MouseClick("primary",$x,$y,1)
                        Sleep(1000)
                EndIf
                $result = _ImageSearch("OK.png",1,$x,$y,100)
                If $result = 1 Then ; Confirm revive
                        MouseMove($x,$y,0)
                        Sleep (250)
                        MouseClick("primary",$x,$y,1)
                        Sleep(1000)
                EndIf

This only worked for me if I added it before the other image search functions. But so far it works wonderfully.

Fang18002 03/22/2011 04:34

So I've been trying to find out how to actually use a bot and yes I've read the manual's but I still don't get what to do can anyone make a video on how to use a bot from the very beggining or something?

adam_j 03/22/2011 10:39

How to write/use a bot:

[Only registered and activated users can see links. Click Here To Register...]


All times are GMT +2. The time now is 07:42.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.