Sign in to follow this  
Followers 0
Kickassjoe

DragonFable bot

29 posts in this topic

#1 ·  Posted (edited)

I have been working on this bot for...

Drumroll(start)

Sleep(3000)

Drumroll(end)

DragonFable.com !!!

OK here is the source!

#include<GUIConstants.au3>
#Include <GuiCombo.au3>
AutoItSetOption("wintitlematchmode", 2)



$MainWindow = GUICreate("DragonFable BOT By KickassJoe", 500,500)

;Level box
$Charlvl = GuiCtrlCreatecombo("Character Level?", 250, 80, 120, 100)
$Charlvlis1 = _GUICtrlComboAddString($Charlvl,"1")
$Charlvlis2 = _GUICtrlComboAddString($Charlvl,"2")
$Charlvlis3 = _GUICtrlComboAddString($Charlvl,"3")
$Charlvlis4 = _GUICtrlComboAddString($Charlvl,"4")
$Charlvlis5 = _GUICtrlComboAddString($Charlvl,"5")
$Charlvlis6 = _GUICtrlComboAddString($Charlvl,"6")
$Charlvlis7 = _GUICtrlComboAddString($Charlvl,"7")
$Charlvlis8 = _GUICtrlComboAddString($Charlvl,"8")
$Charlvlis9 = _GUICtrlComboAddString($Charlvl,"9")
$Charlvlis10 = _GUICtrlComboAddString($Charlvl,"10")
$Charlvlis11 = _GUICtrlComboAddString($Charlvl,"11")
$Charlvlis12 = _GUICtrlComboAddString($Charlvl,"12")
$Charlvlis13 = _GUICtrlComboAddString($Charlvl,"13")
$Charlvlis14 = _GUICtrlComboAddString($Charlvl,"14")
$Charlvlis15 = _GUICtrlComboAddString($Charlvl,"15")
$Charlvlis16 = _GUICtrlComboAddString($Charlvl,"16")
$Charlvlis17 = _GUICtrlComboAddString($Charlvl,"17")
$Charlvlis18 = _GUICtrlComboAddString($Charlvl,"18")
$Charlvlis19 = _GUICtrlComboAddString($Charlvl,"19")
$Charlvlis20 = _GUICtrlComboAddString($Charlvl,"20")
$Charlvlis21 = _GUICtrlComboAddString($Charlvl,"21")
$Charlvlis22 = _GUICtrlComboAddString($Charlvl,"22")
$Charlvlis23 = _GUICtrlComboAddString($Charlvl,"23")
$Charlvlis24 = _GUICtrlComboAddString($Charlvl,"24")
$Charlvlis25 = _GUICtrlComboAddString($Charlvl,"25")

;Class box
$CharClass = GuiCtrlCreatecombo("Character Class?", 250, 150, 120, 100)
$CharClassisMage = _GUICtrlComboAddString($CharClass,"Mage")
$CharClassisRogue = _GUICtrlComboAddString($CharClass,"Rogue")
$CharClassisWarrior = _GUICtrlComboAddString($CharClass,"Warrior")

;Weapon slot box
$WeaponSlot = GuiCtrlCreatecombo("Weapon slot to use?", 250, 220, 120, 100)
$WeaponSlotis1 = _GUICtrlComboAddString($WeaponSlot,"1")
$WeaponSlotis2 = _GUICtrlComboAddString($WeaponSlot,"2")
$WeaponSlotis3 = _GUICtrlComboAddString($WeaponSlot,"3")
$WeaponSlotis4 = _GUICtrlComboAddString($WeaponSlot,"4")
$WeaponSlotis5 = _GUICtrlComboAddString($WeaponSlot,"5")
$WeaponSlotis6 = _GUICtrlComboAddString($WeaponSlot,"6")
$WeaponSlotis7 = _GUICtrlComboAddString($WeaponSlot,"7")
$WeaponSlotis8 = _GUICtrlComboAddString($WeaponSlot,"8")
$WeaponSlotis9 = _GUICtrlComboAddString($WeaponSlot,"9")

;Graphics box
$GraphicQuality = GuiCtrlCreatecombo("Graphic Quality?", 250, 290, 120, 100)
$GraphicQualityisLow = _GUICtrlComboAddString($GraphicQuality,"Low")
$GraphicQualityisMedium = _GUICtrlComboAddString($GraphicQuality,"Medium")
$GraphicQualityisHigh = _GUICtrlComboAddString($GraphicQuality,"High")
$GraphicQualityisBest = _GUICtrlComboAddString($GraphicQuality,"Best")

;OK button
$OKButton = GUICtrlCreateButton("OK", 450,450)

;Close button
$CLOSEButton = GUICtrlCreateButton("Close",400,450)

HotKeySet("{ESCAPE}", "Terminate")



;GUI CONTROL STUFF
GuiSetState()

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $CLOSEButton
            ExitLoop
        Case $msg = $OKButton
            Main()
    EndSelect
WEnd
Exit


Func Main()
    GetGUIStuff()
    Sleep(1000)
    WinActivate("Web RPG")
    Sleep(1000)
    SetGraphicQuality()
    Sleep(1000)
    EquipWeapon()
    While 1
    Sleep(2500)
    GoToWarlic() ;pixelsearches for warlic and clicks on him
    Sleep(2500)
    TalkToWarlic() ;does all the talking stuff and starts the quest
    Sleep(5000)
    GoToRightSide() ;makes character go to the right side of the screen
    Sleep(2500)
    $InBattle = SeeIfInBattle() ;returns 1 if in battle, 0 if not.
    If $InBattle = 1 Then ; we are in battle
        DoMageBattle()
        Else ;we arent in the battle :(
        GoToRightSide();makes character go to the right side of the screen again
        Sleep(5000)
        $InBattle = SeeIfInBattle() ;returns 1 if in battle, 0 if not.
        If $InBattle = 1 Then DoMageBattle()
        EndIf
ClickOKButton()
Sleep(2500)
$SearchForLvl = PixelSearch(490,350,530,395,0xFF0000)
If IsArray($SearchForLvl) Then
    PressOKOnLevelUp()
    EndIf
;Done with first battle!!!

GoToRightSide();go to next dog thing
Sleep(2500)
    $InBattle = SeeIfInBattle() ;returns 1 if in battle, 0 if not.
    If $InBattle = 1 Then ; we are in battle
        DoMageBattle() ;battle the dog
        Else
        GoToRightSide()
        Sleep(5000)
        $InBattle = SeeIfInBattle() ;returns 1 if in battle, 0 if not.
        If $InBattle = 1 Then DoMageBattle()
        EndIf
        ClickOKButton()
        Sleep(2500)
        $SearchForLvl = PixelSearch(490,350,530,395,0xFF0000)
If IsArray($SearchForLvl) Then
    PressOKOnLevelUp()
    EndIf
        ;If all goes well... we should be done with the second battle by now :)
        Sleep(2500)
        GoToLeftSide() ;go back to abandom quest
        Sleep(5000)
        ClickYESOnAbandonQuest() ;isnt it obvious?
        Sleep(15000)
        ClickOnHealthManaSpot() ;heal yourself! ZOMGH
        Sleep(1000)
        WEnd
        Exit
EndFunc


#cs
Func Main()
    GetGUIStuff()
    Sleep(1000)
    WinActivate("Web RPG")
    Sleep(1000)
    SetGraphicQuality()
    Sleep(1000)
    EquipWeapon()
    While 1
    Sleep(2500)
    GoToWarlic() ;pixelsearches for warlic and clicks on him
    Sleep(2500)
    TalkToWarlic(5000) ;does all the talking stuff and starts the quest
    Sleep(5000)
    GoToRightSide() ;makes character go to the right side of the screen
    Sleep(2500)
    $InBattle = SeeIfInBattle() ;returns 1 if in battle, 0 if not.
    If $InBattle = 1 Then
    $BattleType = GetBattleType()
    Select
        Case $BattleType = "Mage"
            DoMageBattle()
        Case $BattleType = "Rogue"
            DoRogueBattle()
        Case $BattleType = "Warrior"
            DoWarriorBattle()
    EndSelect
    ClickOKButton()
            Else ;we arent in the battle :(
        GoToRightSide();makes character go to the right side of the screen again
        Sleep(5000)
        $InBattle = SeeIfInBattle() ;returns 1 if in battle, 0 if not.
        If $InBattle = 1 Then 
            $BattleType = GetBattleType()
    Select
        Case $BattleType = "Mage"
            DoMageBattle()
        Case $BattleType = "Rogue"
            DoRogueBattle()
        Case $BattleType = "Warrior"
            DoWarriorBattle()
            EndSelect
        EndIf
        ClickOKButton()
        ;If all goes well... we should be done with the second battle by now :)
        Sleep(2500)
        GoToLeftSide() ;go back to abandom quest
        Sleep(5000)
        ClickYESOnAbandonQuest() ;isnt it obvious?
        Sleep(15000)
        ClickOnHealthManaSpot() ;heal yourself! ZOMGH
        Sleep(1000)
            
            
            
            
EndFunc
#ce


Func GetGUIStuff()
    $Charlvl = _GUICtrlComboGetCurSel($Charlvl)
    $WeaponSlot = _GUICtrlComboGetCurSel($WeaponSlot)
    $CharClass = _GUICtrlComboGetCurSel($CharClass)
    $GraphicQuality = _GUICtrlComboGetCurSel($GraphicQuality)
    GUIDelete($MainWindow)
    
    
    If $Charlvl <> 0 And $WeaponSlot <> 0 And $CharClass <> 0 And $GraphicQuality = 1 Then ;if everything goes right...
        
        
        ;set $CharClass to what it really is
    Select
        Case $CharClass = "1"
            $CharClass = "Mage"
        Case $CharClass = "2"
            $CharClass = "Rogue"
        Case $CharClass = "3"
            $CharClass = "Warrior"
            EndSelect


;set $GraphicQuality to what it really is
Select
    Case $GraphicQuality = 1
        $GraphicQuality = "Low"
    Case $GraphicQuality = 2
        $GraphicQuality = "Medium"
    Case $GraphicQuality = 3
        $GraphicQuality = "High"
    Case $GraphicQuality = 4
        $GraphicQuality = "Best"    
EndSelect


    MsgBox(0,"DragonFable BOT", "The Character Level picked is:  " & $Charlvl & @CRLF & _
    "The Character Class picked is:  " & $CharClass & @CRLF & _
    "The Weapon Slot picked is:  " & $WeaponSlot & @CRLF & _
    "The Graphic Quality to be used is:  " & $GraphicQuality)
;ElseIf $CharClass = 2 Or $CharClass = 3 Then
;   MsgBox(0,"DragonFable BOT By KickassJoe", "This Character Class IS NOT supported yet!")
    
ElseIf $GraphicQuality = 2 Or $GraphicQuality = 3 Or $GraphicQuality = 4 Then
    MsgBox(0,"DragonFable BOT By KickassJoe", "Choose a different Graphical Quality!")
Else
    MsgBox(0, "DragonFable BOT", "You have not completely filled out this form.")
    Exit
    EndIf
EndFunc



Func SetGraphicQuality()
    MouseClick("left",525,630,1,0) ;click on the options button
    Sleep(2500);wait for window to come up
    MouseClick("left",735,285,1,0);click on low (for now)
    Sleep(1500)
    MouseClick("left",500,550,1,0);click back button
EndFunc

Func EquipWeapon()
    #cs
    $WeaponSlotCoords1 > 246 And < 272
    $WeaponSlotCoords2 > 272 And < 298
    $WeaponSlotCoords3 > 298 And < 324
    $WeaponSlotCoords4 > 324 And < 350
    $WeaponSlotCoords5 > 350 And < 376
    $WeaponSlotCoords6 > 376 And < 402
    $WeaponSlotCoords7 > 402 And < 428
    $WeaponSlotCoords8 > 428 And < 454
    $WeaponSlotCoords9 > 454 And < 480
    $WeaponSlotCoordsDefaultwep  < 245
    #ce
    MouseClick("left",450,600,1,0);click on inventory spot
    Sleep(1500)
    $LookForEquippedWep = PixelSearch(375,230,475,475,0xEBC299)
    If IsArray($LookForEquippedWep) Then
        Select
            Case $LookForEquippedWep[1] < 245
                $WeaponThatsEquipped = "Default"
            Case $LookForEquippedWep[1] > 246 And $LookForEquippedWep[1] < 272
                $WeaponThatsEquipped = 1
            Case $LookForEquippedWep[1] > 272 And $LookForEquippedWep[1] < 298
                $WeaponThatsEquipped = 2
            Case $LookForEquippedWep[1] > 298 And $LookForEquippedWep[1] < 324
                $WeaponThatsEquipped = 3
            Case $LookForEquippedWep[1] > 324 And $LookForEquippedWep[1] < 350
                $WeaponThatsEquipped = 4
            Case $LookForEquippedWep[1] > 350 And $LookForEquippedWep[1] < 376
                $WeaponThatsEquipped = 5
            Case $LookForEquippedWep[1] > 376 And $LookForEquippedWep[1] < 402
                $WeaponThatsEquipped = 6
            Case $LookForEquippedWep[1] > 402 And $LookForEquippedWep[1] < 428
                $WeaponThatsEquipped = 7
            Case $LookForEquippedWep[1] > 428 And $LookForEquippedWep[1] < 454
                $WeaponThatsEquipped = 8
            Case $LookForEquippedWep[1] > 454 And $LookForEquippedWep[1] < 480
                $WeaponThatsEquipped = 9
        EndSelect
        EndIf
        
        If $WeaponThatsEquipped <> $WeaponSlot Then
        Select 
            Case $WeaponSlot = 1
                MouseClick("left", 400, 260)
            Case $WeaponSlot = 2
                MouseClick("left", 400, 286)
            Case $WeaponSlot = 3
                MouseClick("left", 400, 312)
            Case $WeaponSlot = 4
                MouseClick("left", 400, 338)
            Case $WeaponSlot = 5
                MouseClick("left", 400, 364)
            Case $WeaponSlot = 6
                MouseClick("left", 400, 390)
            Case $WeaponSlot = 7
                MouseClick("left", 400, 416)
            Case $WeaponSlot = 8
                MouseClick("left", 400, 442)
            Case $WeaponSlot = 9
                MouseClick("left", 400, 468)
        EndSelect
        Sleep(1000)
        MouseClick("left",700,500,1,0) ;click equip
        Sleep(3500)
        MouseClick("left",400,540,1,0) ;close inventory
        
    Else
        MouseClick("left",400,540,1,0) ;close inventory
        EndIf
EndFunc

Func GoToWarlic()
    $WarlicSearch = PixelSearch(675,260,715,380,0xEAC853)
    If IsArray($WarlicSearch) Then
        MouseClick("left", $WarlicSearch[0], $WarlicSearch[1],1,0)
        Sleep(1000)
        EndIf
EndFunc

Func TalkToWarlic()
    MouseClick("Left",775,125,1,0)
    Sleep(7500)
    MouseClick("Left",525,345,1,0)
    Sleep(3000)
    MouseClick("Left",545,315,1,0)
EndFunc

Func GoToRightSide()
    MouseClick("Left",865,300,1,0);click on wind attack
    EndFunc

Func SeeIfInBattle()
    $Search = PixelSearch(130,215,175,280,0x246890)
    If IsArray($Search) Then
        Return(1)
    Else
        Return(0)
        EndIf
    EndFunc
    
    Func DoMageBattle()
        If $Charlvl <= 5 Then
            MouseClick("Left",500,500,1,0)
        ElseIf $Charlvl >= 6 And $Charlvl <= 25 Then
        MouseClick("Left",680,500,1,0) ;click on wind attack
    EndIf
        Sleep(2500)
        $SearchForOK = PixelSearch(505,475,515,485,0xE1705B) ;search for OK button
        Do
            $Search = SeeIfInBattle()
        If $Charlvl <= 5 Then
            MouseClick("Left",500,500,1,0)
        ElseIf $Charlvl >= 6 And $Charlvl <= 25 Then
        MouseClick("Left",680,500,1,0) ;click on wind attack
    EndIf
            Sleep(2500)
            $SearchForOK = PixelSearch(505,475,515,485,0xE1705B)
            Sleep(5000)
            Until IsArray($SearchForOK) Or $Search = @error
        EndFunc
        
        Func ClickOKButton()
            MouseClick("Left",510,490,1,0)
        EndFunc
        
        Func GoToLeftSide()
            MouseClick("Left",130,325,1,0)
        EndFunc
        
        Func ClickYESOnAbandonQuest()
            MouseClick("Left",450,380,1,0)
        EndFunc
        
        Func ClickOnHealthManaSpot()
            MouseClick("Left",500,400,1,0)
        EndFunc
        
        Func GetBattleType()
            Select
                Case $CharClass = "Mage"
                    Return("Mage")
                Case $CharClass = "Rogue"
                    Return("Rogue")
                Case $CharClass = "Warrior"
                    Return("Warrior")
                    EndSelect
                EndFunc

Func DoRogueBattle()
    MouseClick("Left",500,500,1,0)
    Sleep(2500)
    $SearchForOK = PixelSearch(505,475,515,485,0xE1705B) ;search for OK button
    Do
            SeeIfInBattle()
            MouseClick("Left",500,500,1,0);click attack button
            Sleep(2500)
            $SearchForOK = PixelSearch(505,475,515,485,0xE1705B)
            Sleep(5000)
            Until IsArray($SearchForOK) Or $Search = @error
EndFunc

Func DoWarriorBattle()
        MouseClick("Left",500,500,1,0)
    Sleep(2500)
    $SearchForOK = PixelSearch(505,475,515,485,0xE1705B) ;search for OK button
    Do
            SeeIfInBattle()
            MouseClick("Left",500,500,1,0);click attack button
            Sleep(2500)
            $SearchForOK = PixelSearch(505,475,515,485,0xE1705B)
            Sleep(5000)
            Until IsArray($SearchForOK) Or $Search = @error
EndFunc

Func PressOKOnLevelUp()
    MouseClick("Left",510,515,1,0)
    Sleep(5000)
    EndFunc
    
    Func Terminate()
        Exit
        EndFunc

To use it you have to...

1. have your res 768x1024.

2. go to dragonfable and make a mage character

3. go to the same screen that Warlic is on.

4. follow steps 1 and 2 and 3

Note: you will have to set the graphic quality to low in the gui and have to be a mage to use this... and lvl doesn't do anything yet, the script is still in the process of being made. Right now all it does is the first screen of the quest and then go back and do it over again, but it is still worth leaving it on at night :P

I will be updating it as I continue to program it...

Edited by Kickassjoe

What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites



Is this a single player game?

You made a bot for a single player game?

:P

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Well the first thing i notice when looking at this is you could replace lines 11 - 35 with these three

For $i = 1 to 25 Step 1
    Assign("Charlvlis" & $i,_GUICtrlComboAddString($Charlvl,$i),2)
Next

Maybe do something similar with the other ones too

Edited by Hallman

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

its a single player online game.. that is soon to be multiplayer..... and i dont care if you like it... it was meant for my own personal use.

@hallman, thanks i will try that!

@Rad... y not.... it gave me sumthing to do... and you can still talk about the game IRL.

Edited by Kickassjoe

What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites

no1 plays? :P


What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites

i dont have a guicombo.au3

Share this post


Link to post
Share on other sites

Or better yet, the release. There is no current beta right now. Just get 3.2.0.1

Share this post


Link to post
Share on other sites

no1 plays? :)

I just started looking into AutoIt today and so far it seems very interesting. I play DragonFable it is an incredible game! Have you abandoned your bot project? I would be very interested if you are still working on it! Keep us updated!

Share this post


Link to post
Share on other sites

I may aswell try the game, I played adventure quest, And got hooked, well, only for a day or so xD


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

i got like 90 errors.... one is the fact that it clicked around like crazy untill it said error, something about $weapon not equipped


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

is it a good game


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

I work on it every now and then... not that often, i will update the script in a minute... now if you put your lvl under 6 it will attack with your weapon... still use mage tho... I don't feel like writing anymore to it tonight.


What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites

I work on it every now and then... not that often, i will update the script in a minute... now if you put your lvl under 6 it will attack with your weapon... still use mage tho... I don't feel like writing anymore to it tonight.

I love the new update! Adding the search for the Level Up dialog makes this bot incredible - Thanks for posting!

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

i tryed it to... but i only get the wepon message... i think it misses the targets, it just presses the screen at ranmdom... i tryed to move the screen to fit the after where it presses to, but no luck there... pleas update as soon as you have time^^ i would love a bot to DF

Maybe i am using wrong browser? i tryed mozila and Explorer... it still dont hit hes targets... it seams that you use a smaler verson of the game, you always hit it just a couple cm off...

Edited by lonew666

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

lone, is it a couple off on the x axis or y axis? (a couple off left and right, or up and down?)

Edited by Kickassjoe

What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites

hmmm.........doesnt work for me

i keep getting an error about this weapon thingy

wen you have the time can you plz fix it? :P

i have a lvl 19 warrior btw :)

Share this post


Link to post
Share on other sites

i tryed it to... but i only get the wepon message... i think it misses the targets, it just presses the screen at ranmdom... i tryed to move the screen to fit the after where it presses to, but no luck there... pleas update as soon as you have time^^ i would love a bot to DF

Maybe i am using wrong browser? i tryed mozila and Explorer... it still dont hit hes targets... it seams that you use a smaler verson of the game, you always hit it just a couple cm off...

The exact screen positions change with the resolution of your desktop. The AutoIT Window Info tool can be used to modify the source with the correct coordinates specific to your screen. I had to modify the coordinates slightly for it to work for me - I'm loving it now that I've got it working!

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

Here is another dragonfable script. Thanks to Kickassjoe for the original DF script. Since I'm not very experienced with AutoIt, I wasn't sure what to do in the Include section - I just used the same thing that Joe did. This one is not nearly as complex but it served me well in getting a PowerTog so I thought I'd share.

Here's the deal with this one...

1. My screen resolution was set to 1280x1024

2. I used Firefox with multiple tabs open (having more than one tab open changes the screen size)

3. Start the script when on the first screen talking to Dr. Voltabolt

4. This is for a rouge with a high enough level to use Sleep

5. I strongly recommend using an energy weapon

6. There is no code to deal with leveling up...yet ( I may change it later ) *Now it does!!!*

7. Change the Increment number in line 38 to the number of scrap metal pieces you need

8. This is my first AutoIt script...Let me know what you think!

#include<GUIConstants.au3>
#Include <GuiCombo.au3>
AutoItSetOption("wintitlematchmode", 2)

;The pixels here are based on a screen resolution of 1280x1024
;Using Firefox with multiple tabs open
;Start the script when on the first screen talking to Dr. Voltabolt
;This requires a Rouge with a high enough level to use sleep
;Change the Increment number in line 38 to the number of scrap metal pieces you need
;Thanks goes to Kissassjoe for the original DF script that help me write this one!


WinActivate("Web RPG")

$Increment = 0
Do 
ClickOnHeal()
Sleep(2500)
ClickOnQuest()
Sleep(2500)
EnterHouse()
Sleep(2500)
ClickOnDistract()
Sleep(9000)
$InBattle = CheckInBattle()
Do
$Rapid = CheckRapid()
    If $Rapid = 1 Then
        ClickOnRapid()
    Else
        ClickOnAttack()
    EndIf
$InBattle = CheckInBattle()

Until $InBattle = 0
ClickOKButton()
$Increment = $Increment + 1
Until $Increment = 85

Func CheckInBattle()
    $Search = PixelSearch(630,210,645,225,0x7A7A7A)
    If IsArray($Search) Then
        Return(1)
    Else
        Return(0)
    EndIf
EndFunc

Func ClickOnAttack()
    MouseClick("Left",642,532,1,0)
    Sleep (9000)
EndFunc

Func CheckRapid()
    $Search = PixelSearch(739,544,743,547,0xBA2525)
    If IsArray($Search) Then
        Return(1)
    Else
        Return(0)
    EndIf
EndFunc

Func ClickOnRapid()
    MouseClick("Left",739,544,1,0)
    Sleep (9000)
EndFunc

Func ClickOnDistract()
    MouseClick("Left",498,534,1,0)
EndFunc

Func ClickOKButton()
    MouseClick("Left",623,518,1,0);click ok
    Sleep (2500)
    $Level = CheckforLevel()
    If $Level = 1 Then
        ClickOnBattleOn()
        AbandonQuest()
    Else
        MouseClick("Left",618,541,1,0);click close
        Sleep (2500)
        MouseClick("Left",615,539,1,0);click keep
        Sleep (2500)
    EndIf
    
EndFunc

Func CheckforLevel()
    $Search = PixelSearch(654,256,660,262,0x000000)
    If IsArray($Search) Then
        Return(1)
    Else
        Return(0)
    EndIf
EndFunc

Func ClickOnBattleOn()
    Sleep (9000)
    MouseClick("Left",650,548,1,0)
    Sleep (2500)
EndFunc

Func ClickOnHeal()
    MouseClick("Left",581,401,1,0);click heal
    Sleep (2500)
    MouseClick("Left",556,311,1,0);click back
EndFunc

Func ClickOnQuest()
    MouseClick("Left",615,339,1,0)
EndFunc

Func EnterHouse()
    MouseClick("Left",888,487,1,0)
    Sleep (2500)
    MouseClick("Left",885,335,1,0)
EndFunc

Func AbandonQuest()
    MouseClick("Left",268,455,1,0);Go to left side of screen
    Sleep (5000)
    MouseClick("Left",566,409,1,0);Click Yes to abandon quest
    Sleep (5000)
EndFunc

I also have a version of this that works for a mage. If anyone is interested, let me know and I'll post it too.

Edited by NeptuneIT

Share this post


Link to post
Share on other sites

I've now updated the script to allow for leveling up! Enjoy!

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