Sign in to follow this  
Followers 0
Scorekeeper

Any ideas to improve this bot.

10 posts in this topic

I am not using the other fourm as it is a bit messed up.

I would like to ask anyo of you for help to fix my hp/mp/skill bot.

It does not work perfectly and was wondering could any of you help me improve it?

I would realy help as i am making this bot for a bunch of people i know... but i have exams to do.

So if you can improve it, it would be greatly apeciated by me and who this bot is for.

Thanks :"> . Here is the code.

I have only started to use AutoIT for 2-3 days now...

HotKeySet ( "{$hp}" ,"hitpoints")

HotKeySet("{ESC}", "End")


MsgBox(0,"ScoreKeeper","Please select your Charcter in Rose befor using this bot!")
MsgBox(0,"ScoreKeeper","This is a Hp/Mp/Skill Bot made by ScoreKeeper!")

$hp = InputBox("ScoreKeeper","Input the hp item/magic shortcut Please (IN CAPS):")
MsgBox(0,"Confirm answer","You typed in: " & $hp)

$mp = InputBox("ScoreKeeper","Input the item/magic shortcut Please (IN CAPS):")
MsgBox(0,"Confirm answer","You typed in: " & $mp)

$s1 = InputBox("ScoreKeeper","Input Skill 1 shortcut Please (IN CAPS)(Leave Blank if no skill):")
MsgBox(0,"Confirm answer","You typed in: " & $s1)

$s2 = InputBox("ScoreKeeper","Input Skill 2 shortcut shortcut Please (IN CAPS)(Leave Blank if no skill):")
MsgBox(0,"Confirm answer","You typed in: " & $s2)

MsgBox(0,"ScoreKeeper","Bot has been configured..... now loading into Rose.")

WinActivate ("ROSE online") 


For $i = 1 to 2
if $i = 3 then exitloop
$i=1
Next

Func hitpoints()
$i=3
If PixelGetColor(91,43) = (0xACA899) Then
        sleep (3000)
    EndIf
    EndFunc


HotKeySet ( "{$mp}" ,"magicpoints")
$X=0
Do
Sleep(100)
Until $X=1

Func magicpoints()
If PixelGetColor(88,56) = (0xACA899) Then
        sleep (2500)
    EndIf
EndFunc


HotKeySet ( "{$s1}" ,"skillone")
For $i = 1 to 2
if $i = 3 then exitloop
$i=1
Next

Func skillone()
$i=3
If PixelGetColor(91,43) = (0xACA899) Then
        sleep (3000)
    EndIf
    EndFunc


HotKeySet ( "{$s2}" ,"skilltwo")
$X=0
Do
Sleep(100)
Until $X=1

Func skilltwo()
If PixelGetColor(70,42) = (0xACA899) Then
        sleep (2500)
    EndIf
    EndFunc


Func End()
    Exit
EndFunc

Thanks for all your help if you can improve this because the bot is unstable at the moment.


Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I notice that

For $i = 1 to 2
if $i = 3 then exitloop
$i=1
Next
$i never is 3 because , I just don't get it. I don't know what you are trying to do with it other then make $i = 1. All you loop does is make $i = 1 on the 1st round, then 2nd round make $i =2 then make it = 1. Try taking a looking at the scripts and scraps section of the forum. It should help your development of script writing a lot. Also study the exsamples folder that comes with autoit and look up every word in the help file that you see in the sample scripts. That's what I did when I first started. Take a look at this script. It is full of notes and it may help you. http://www.autoitscript.com/forum/index.ph...pic=10098&st=15 Just make sure you get the version 1.3, I hope I helped

Edited by quick_sliver007

.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Even so it still does not work right plz..... help!

HotKeySet("{ESC}", "End")


MsgBox(0,"Life Support Bot","Please select your Charcter in Rose befor using this bot!")
MsgBox(0,"Life Support Bot","This is a Hp/Mp/Skill Bot called Life Support Bot By ScorKeeper")

$hp = InputBox("Life Support Bot","Input the hp item/magic shortcut Please (IN CAPS):")
MsgBox(0,"Confirm answer","You typed in: " & $hp)

$mp = InputBox("Life Support Bot","Input the item/magic shortcut Please (IN CAPS):")
MsgBox(0,"Confirm answer","You typed in: " & $mp)

$s1 = InputBox("Life Support Bot","Input Skill 1 shortcut Please (IN CAPS)(Leave Blank if no skill):")
MsgBox(0,"Confirm answer","You typed in: " & $s1)

$s2 = InputBox("Life Support Bot","Input Skill 2 shortcut shortcut Please (IN CAPS)(Leave Blank if no skill):")
MsgBox(0,"Confirm answer","You typed in: " & $s2)

MsgBox(0,"Life Support Bot","Bot has been configured..... now loading into Rose.")

WinActivate ("ROSE online") 



Func hitpoints()
If "F44E12" = Hex(PixelGetColor(635, 345),6) Then
    HotKeySet ( "{$hp}" ,"hitpoints")
        sleep (3000)
    EndIf
    EndFunc



Func magicpoints()
If "F44E12" = Hex(PixelGetColor(635, 345),6) Then
    HotKeySet ( "{$mp}" ,"magicpoints")
        sleep (2500)
    EndIf
EndFunc



Func skillone()
If "F44E12" = Hex(PixelGetColor(635, 345),6) Then
    HotKeySet ( "{$s1}" ,"skillone")
        sleep (3000)
    EndIf
    EndFunc




Func skilltwo()
If "F44E12" = Hex(PixelGetColor(635, 345),6) Then
    HotKeySet ( "{$s2}" ,"skilltwo")
        sleep (2500)
    EndIf
    EndFunc


Func End()
    Exit
EndFunc
Edited by Scorekeeper

Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites

When I said look at some scripts and scraps. I mean look at them in detail. Do some more research. It takes some time to get the hang of thing. Search the forum for every thing that seems related to what you want to do and learn it inside out. Thats how I learned. Here is a bot I made one time, it's for adventer quest RPG. I change computers so I don't use it any more because the pixels don't line up, but it worked fine on my old computer.

opt("MouseCoordMode", 0)

While 1
    Sleep(1500)
    
    Select
        Case PixelGetColor(446, 62) = 16776960 And PixelGetColor(366, 268) = 0
            MouseClick("left", 383, 314, 1, 1)
            Sleep(100)
            MouseClick("left", 407, 325, 1, 5)
            Sleep(100)
            
        Case PixelGetColor(430, 307) = 16777164; click ok for big treasure chest
            MouseClick("left", 430, 307, 1, 1)
            
            
        Case PixelGetColor(659, 558) = 16040323
            Call("_smokeMT")
            
            
        Case PixelGetColor(338, 465) = 13421670 And PixelGetColor(254, 532) = 0 ; for dungeon only; for dungeon only
            Call("_1")
            
        Case PixelGetColor(338, 244) = 10066227
            MouseClick("left", 388, 244, 1, 1)
            
        Case PixelGetColor(386, 286) = 16578283 And PixelGetColor(684, 400) = 10913038
            MouseClick("left", 482, 339, 1, 10)
            Sleep(4000)
            MouseClick("left", 433, 310, 1, 10)
            
        Case PixelGetColor(338, 465) = 13421670; for dungeon only
            MouseClick("left", 383, 204, 1, 1)
            
        Case PixelGetColor(360, 67) = 48895 And PixelGetColor(466, 448) = 48383
            MouseClick("left", 379, 404, 1, 1)
            
        Case PixelGetColor(723, 221) = 9077135
            Call("_Undeadwar")
            
        Case PixelGetColor(445, 112) = 16180414 And PixelGetColor(574, 424) = 15053312
            Call("_Undeadareana")
            
        Case PixelGetColor(153, 102) = 16764006 And PixelGetColor(324, 266) = 16711680
            MouseClick("left", 259, 321, 1, 1)
            
        Case PixelGetColor(419, 485) = 16776960 And PixelGetColor(357, 282) = 16777215
            MouseClick("left", 421, 283, 1, 1)
            
        Case PixelGetColor(354, 488) = 16777215 And PixelGetColor(357, 282) = 16777215
            Call("_heal")
            
            
        Case PixelGetColor(323, 203) = 26316 And PixelGetColor(526, 181) = 26316
            MouseClick("left", 375, 367, 1, 1)
            
        Case PixelGetColor(64, 364) = 3381555 And PixelGetColor(270, 388) = 10040064
            MouseClick("left", 350, 311, 1, 1)
            
        Case PixelGetColor(167, 214) = 16777062 And PixelGetColor(347, 274) = 10027008
            MouseClick("left", 383, 319, 1, 1)
        Case Else
            
    EndSelect
WEnd





PixelGetColor(659, 558) = 16040323
Func _smokeMT()
    MouseClick("left", 142, 369, 1, 1)
    Sleep(1500)
    MouseClick("left", 294, 431, 1)
    Sleep(1500)
    MouseClick("left", 369, 229, 1)
    Sleep(1500)
    MouseClick("left", 519, 212, 1)
    Sleep(3500)
    MouseClick("left", 396, 214, 1)
    Sleep(2500)
    MouseClick("left", 689, 476, 1)
    Sleep(1500)
    MouseClick("left", 550, 393, 1)
    Sleep(100)
    MouseClick("left", 539, 358, 1)
    Sleep(1500)
    MouseClick("left", 396, 209, 1)
    Sleep(1500)
    MouseClick("left", 679, 264, 1)
    Sleep(1500)
    MouseClick("left", 379, 219, 1)
    Sleep(1500)
    MouseClick("left", 492, 395, 1)
    Sleep(1500)
    MouseClick("left", 626, 148, 1)
    Sleep(1500)
EndFunc  ;==>_smokeMT

Func _1()
    MouseClick("left", 338, 465, 1, 1)
    Sleep(2000)
    MouseClick("left", 523, 194, 1)
    Sleep(2000)
    MouseClick("left", 388, 253, 1)
    Sleep(2000)
    MouseClick("left", 647, 474, 1)
    Sleep(2000)
    MouseClick("left", 535, 391, 1)
    Sleep(2000)
    MouseClick("left", 404, 193, 1)
    Sleep(2000)
    MouseClick("left", 290, 402, 1)
    Sleep(2000)
    MouseClick("left", 382, 230, 1)
    Sleep(2000)
    MouseClick("left", 680, 266, 1)
    Sleep(2000)
    MouseClick("left", 485, 325, 1)
    Sleep(2000)
    MouseClick("left", 380, 455, 1)
    Sleep(2000)
    MouseClick("left", 377, 430, 1)
    Sleep(2000)
    MouseClick("left", 377, 430, 1)
    Sleep(2000)
    MouseClick("left", 413, 230, 1)
    Sleep(2000)
EndFunc  ;==>_1


#region- Heal
Func _heal()
    
    
    MouseClick("left", 372, 355, 1)
    Sleep(100)
    If PixelGetColor(520, 334) = 10027008 And PixelGetColor(512, 335) = 10027008 And Not PixelGetColor(513, 337) = 10027008 then
        Call("_mana")
        MouseClick("left", 403, 324, 1)
        Sleep(100)
        MouseClick("left", 503, 330, 1)
        Sleep(100)
    Else
        MouseClick("left", 582, 344, 1)
        Sleep(100)
    EndIf
EndFunc  ;==>_heal


#region mana potion
Func _mana()
    If PixelGetColor(210, 555) = 723723 Then
        
        MouseClick("left", 373, 354, 1)
        Sleep(100)
        MouseClick("left", 576, 392, 1)
        Sleep(100)
    EndIf
EndFunc  ;==>_mana
#endregion



#region --- ScriptWriter generated code Start ---
Func _Undeadwar()
    opt("MouseCoordMode", 0)
    MouseMove(572, 439, 1)
    MouseDown("left")
    MouseUp("left")
    Sleep(1500)
    MouseMove(595, 316)
    MouseDown("left")
    MouseUp("left")
    Sleep(1500)
    MouseMove(577, 254)
    MouseDown("left")
    MouseUp("left")
    Sleep(1500)
    MouseMove(587, 298)
    MouseDown("left")
    MouseUp("left")
    Sleep(1500)
    MouseMove(332, 367)
    MouseDown("left")
    MouseUp("left")
    Sleep(1500)
    
EndFunc  ;==>_Undeadwar
#endregion --- ScriptWriter generated code End ---


#region --- ScriptWriter generated code Start ---
Func _Undeadareana()
    opt("MouseCoordMode", 0)
    MouseMove(383, 311, 1)
    MouseDown("left")
    MouseUp("left")
;Sleep(21000)
;MouseMove(393,378)
;MouseDown("left")
;MouseUp("left")
;Sleep(21000)
;MouseMove(261,357)
;MouseDown("left")
;MouseUp("left")
;Sleep(21000)
;MouseMove(374,455)
;MouseDown("left")
;MouseUp("left")
;Sleep(21000)
;MouseMove(294,419)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(389,225)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(516,208)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(360,219)
;MouseDown("left")
;MouseMove(359,219)
;MouseUp("left")
;Sleep(9000)
;MouseMove(64,250)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(380,158)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(710,245)
;MouseDown("left")
;MouseMove(711,245)
;MouseUp("left")
;Sleep(9000)
;MouseMove(738,238)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(398,269)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(610,227)
;MouseDown("left")
;MouseUp("left")
;Sleep(9000)
;MouseMove(298,315)
;MouseDown("left")
;MouseUp("left")
;Sleep(4000)
EndFunc  ;==>_Undeadareana
#endregion --- ScriptWriter generated code End ---


.

Share this post


Link to post
Share on other sites

Firstly your script has helped but also confused me.

can i ask 1 question see the code

Case PixelGetColor(446, 62) = 16776960 etc.

why does 16776960 have 8 figures? is it not supposed to be six?

Thanks.

Anye else that can help with my bot it would be greatly aprreciated.


Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites

Firstly your script has helped but also confused me.

can i ask 1 question see the code

Case PixelGetColor(446, 62) = 16776960 etc.

why does 16776960 have 8 figures? is it not supposed to be six?

Thanks.

Anye else that can help with my bot it would be greatly aprreciated.

<{POST_SNAPBACK}>

It isnt a hex color. That is in Decimal format if I am not mistaken.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Firstly your script has helped but also confused me.

can i ask 1 question see the code

Case PixelGetColor(446, 62) = 16776960 etc.

why does 16776960 have 8 figures? is it not supposed to be six?

Thanks.

Anye else that can help with my bot it would be greatly aprreciated.

<{POST_SNAPBACK}>

the length can vary:

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB:    Hex: 0x000084   Dec: 132

check back after exams - it may take awhile to teach coding one post at a time


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Just an ideal for your bot. I always thought about about making my bot so it can work for more then 1-10 character levels. The thing is that at low levels the character just don't have that much Hp or Mp and at high levels the character can take a beating. So if you had a Gui with sliders or updowns, you could work out an percent to tell to heal and when to attack. Then when the Go button is pressed in the GUI the GUI can be hidden and the bot can do it's thing useing the info form the sliders after it activates the correct window. That way the user can have more control of how the bot plays the game. For exsample, If the user has a low level chacter he may set the heal slider to heal at a higher Hp percent of his life and a high level character may set it to heal at an lowwer percent of his left. At the moment though If I was you I would just use some Hotkeysets to do the thing that just are boring to do, like click the attack button over and over. Here is a simple bot for you.

HotKeySet("{SPACE}","attack")
HotKeySet("a","auto")
HotKeySet("s","_sleep")
Func attack()
    MouseClick("Left",320,283,1,0)
EndFunc
func auto()
    while 1
        attack()
        Sleep(1500)
    WEnd
EndFunc
func _sleep()
    While 1
        sleep(20)
    WEnd
EndFunc

While 1
    Sleep(20)
WEnd

Here is another bot for rapid clicking at the mouse location.

HotKeySet("{space}","_a")
While 1
    sleep(10)
WEnd
Func _a()
    $b = 0
    Do
        $b = $b + 1
        $a = MouseGetPos()
        MouseClick("Left",$a[0],$a[1])
        Sleep(120)
    Until $b = 25
EndFunc
I hope this helped some more.

.

Share this post


Link to post
Share on other sites

Thanks for your help.

This code has help me.

But now for my bot i have to re skin the hp/mp bar.

I also have inside help now. So my bot should be released to the public

soon .


Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

You welcome and I am glad I could help.

Edited by quick_sliver007

.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0