Jump to content

Having a hard time tying everything together.


Recommended Posts

Global $Paused
HotKeySet("{PGUP}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

$Rounds = 0
$NewFightX = Random( 863, 928)
$NewFightY = Random( 100, 115)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
$ReviveX = Random( 684, 732)
$ReviveY = Random( 179, 194)
$BankX = Random( 833, 858)
$BankY = Random( 142, 159)
$EastX = Random( 1324, 1366)
$EastY = Random( 167, 181)
$WestX = Random( 1214, 1255)
$WestY = Random( 166, 180)
$NorthX = Random( 1269, 1311)
$NorthY = Random( 141, 155)
$SouthX = Random( 1267, 1310)
$SouthY = Random( 165, 180)
$SleepMOVE = Random( 800, 1000)
$SleepFIGHT = Random( 1800, 2100)
$StatDexX = Random(695, 726)
$StatDexY = Random(197, 335)
$StatDexX2 = Random(695, 726)
$StatDexY2 = Random(197, 335)


Sleep(5000)
Do
PixelSearch(29, 463, 972, 616, 0x66CCCC) ;;;;;;;;;;;;; Macro Check
If Not @error Then
MouseClick("Left", 1310, 10, 1, 5)
Sleep(1000)
MouseClick("Left", 1311, 101, 2, 5)
Sleep(500)

Exit
EndIF


PixelSearch(103, 74, 149, 70, 0xD2D0D0) ;;;;;;;;;;;;; Died
If Not @error Then
Sleep($SleepMOVE)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $ReviveX, $ReviveY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep(2000)
EndIf

PixelSearch(495, 319, 685, 542, 0xD4D0C8) ;;;;;;;;;;;; Leveled
If Not @error Then
MouseClick("Left", $StatDexX, $StatDexY, 1, 5)
Sleep(500)
MouseClick("Left", $StatDexX2, $StatDexY2, 1, 5)
Sleep($SleepFIGHT)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $BankX, $BankY, 1, 5)
Sleep($SleepFIGHT)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep(4000)
EndIf

PixelSearch(806, 151, 855, 151, 0xFFDB31) ;;;;;;;;;;;; Skip Veteran
If Not @error Then
MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)
EndIf

PixelSearch(809, 151, 855, 151, 0xD098B0) ;;;;;;;;;;;; Skip Fanatic
If Not @error Then
MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)
EndIf

PixelSearch(800, 151, 863, 151, 0x43F0FF) ;;;;;;;;;;;; Skip Illusionist
If Not @error Then
MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)
EndIf

;PixelSearch(794, 229, 1151, 372, 0xFFC90E) ;;;;;;;;;;;; Skip Saint
;If Not @error Then
;MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
;Sleep($SleepFIGHT)
;EndIf

PixelSearch(895, 287, 940, 287, 0xFFDB31) ;;;;;;;;;;;; Skip Veteran
If Not @error Then
MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)
EndIf

PixelSearch(895, 287, 940, 287, 0xD098B0) ;;;;;;;;;;;; Skip Fanatic
If Not @error Then
MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)
EndIf


PixelSearch(880, 287, 943, 287, 0x43F0FF) ;;;;;;;;;;;; Skip Illusionist
If Not @error Then
MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)
EndIf

;PixelSearch(794, 229, 1151, 372, 0xFFC90E) ;;;;;;;;;;;; Skip Saint
;If Not @error Then
;MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
;Sleep($SleepFIGHT)
;EndIf

PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf

PixelSearch(495, 319, 685, 542, 0xD4D0C8) ;;;;;;;;;;;; Leveled
If Not @error Then
MouseClick("Left", $StatDexX, $StatDexY, 1, 5)
Sleep(500)
MouseClick("Left", $StatDexX2, $StatDexY2, 1, 5)
Sleep($SleepFIGHT)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $BankX, $BankY, 1, 5)
Sleep($SleepFIGHT)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep(4000)
EndIf

PixelSearch(103, 74, 149, 70, 0xD2D0D0) ;;;;;;;;;;;;; Died
If Not @error Then
Sleep($SleepMOVE)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $WestX, $WestY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $ReviveX, $ReviveY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep($SleepMOVE)
MouseClick("Left", $EastX, $EastY, 1, 5)
Sleep(2000)
EndIf


MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)




$NewFightX = Random( 863, 928)
$NewFightY = Random( 100, 115)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
$ReviveX = Random( 684, 732)
$ReviveY = Random( 179, 194)
$BankX = Random( 833, 858)
$BankY = Random( 142, 159)
$EastX = Random( 1324, 1366)
$EastY = Random( 167, 181)
$WestX = Random( 1214, 1255)
$WestY = Random( 166, 180)
$NorthX = Random( 1269, 1311)
$NorthY = Random( 141, 155)
$SouthX = Random( 1267, 1310)
$SouthY = Random( 165, 180)
$SleepMOVE = Random( 800, 1000)
$SleepFIGHT = Random( 1800, 2100)


$Rounds = $Rounds + 1
Until $Rounds = 9999999999999999999999999999999999999999999999999





Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc

Closer to the bottom,

Line 809 above,

MouseClick("Left", $NewFightX, $NewFightY, 1, 5)
Sleep($SleepFIGHT)

It just ignores, everything else in the script, but it won't do anything if I semi colon or delete it.  Any thoughts on how to fix that line to abide by the rest of the script?  Code works, but it ignores everything else and I can't figure out how to "tie" it into

PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack
If Not @error Then
MouseClick("Left", $AttackX, $AttackY, 1, 5)
Sleep($SleepFIGHT)
$AttackX = Random( 608, 686)
$AttackY = Random( 124, 139)
EndIf
Edited by NarishDoUrden
Link to comment
Share on other sites

  • Moderators

NarishDoUrden.

michaelslamet is quite right - please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. :naughty:

But welcome to the AutoIt forum - and see you soon with a legitimate question I hope. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...