Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

Autoit Mmo Tarzı Oyunlarda Bot


hursevez
 Share

Recommended Posts

autoit mmo tarzı oyunlarda bot

autoit öğreniyorum merak ettiğim bir konu var; MMO tarzı oyunlarda hile yapımı. Mesela "darkorbit" adlı oyunda bot/hile yapıyorlar. Uzay geminiz kendi kendine yapıyor istediklerinizi. Böyle bir uygulama geliştirmek için nasıl bir algoritma geliştirmeli yardımcı olur musunuz ?

Link to comment
Share on other sites

#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=include\robot-icono-9322.ico
#AutoIt3Wrapper_Outfile=m.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Fileversion=0.0.0.64
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: loop88
Script Function:
Pixel Bot Para DarkOrbit
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here

#include <Misc.au3>
#include <EditConstants.au3>
#include <windowsconstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ImageSearch.au3>
#include <MsgBoxConstants.au3>
#include <ComboConstants.au3>
#include <GuiStatusBar.au3>
#include <Process.au3>
#include <INet.au3>
#include <MD5.au3>
#include <Array.au3>

HotKeySet("{F2}", "_exit")
HotKeySet("{PAUSE}", "_pause")
HotKeySet("{ESC}", "_exitbot")

;Version
Global $ver = "0.0.13"
;-------
Global $msga, $msgb, $msgc
; variables a declarar==START
;_Pausa
Global $pausa
Global $EXITBOT = 0
;_GUI_set
Global $fraction
;_donated_version
Global $username_info
;_run_bot
Global $jump = 1
Global $palladium_sleeptime = 1500
Global $box_sleeptime = 400
;_screen_coordinates
Global $screencoordinates12_x1, $screencoordinates12_y1, $screencoordinates12_x2, $screencoordinates12_y2, $a, $b
Global $screencoordinates11_x1, $screencoordinates11_y1, $screencoordinates11_x2, $screencoordinates11_y2
Global $screencoordinates10_x1, $screencoordinates10_y1, $screencoordinates10_x2, $screencoordinates10_y2
Global $screencoordinates9_x1, $screencoordinates9_y1, $screencoordinates9_x2, $screencoordinates9_y2
Global $screencoordinates8_x1, $screencoordinates8_y1, $screencoordinates8_x2, $screencoordinates8_y2
Global $screencoordinates7_x1, $screencoordinates7_y1, $screencoordinates7_x2, $screencoordinates7_y2
Global $screencoordinates6_x1, $screencoordinates6_y1, $screencoordinates6_x2, $screencoordinates6_y2
Global $screencoordinates5_x1, $screencoordinates5_y1, $screencoordinates5_x2, $screencoordinates5_y2
Global $screencoordinates4_x1, $screencoordinates4_y1, $screencoordinates4_x2, $screencoordinates4_y2
Global $screencoordinates3_x1, $screencoordinates3_y1, $screencoordinates3_x2, $screencoordinates3_y2
Global $screencoordinates2_x1, $screencoordinates2_y1, $screencoordinates2_x2, $screencoordinates2_y2
Global $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2

Global $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2

;_map_coordinates
Global $map_coordinates_up_x
Global $map_coordinates_up_y
Global $map_coordinates_down_x
Global $map_coordinates_down_y
Global $map_search_state_up_x
Global $map_search_state_up_y
Global $map_search_state_down_x
Global $map_search_state_down_y
; cordenadas resultado
Global $found_x, $found_y, $found_x_fire, $found_y_fire, $found_x_npc, $found_y_npc
;imagenes

Global $bonusboxIMG = "src/collect/bonusbox.bmp"
Global $cargoboxIMG = "src/collect/cargobox.bmp"
Global $neweventboxIMG = "src/collect/helixbox.bmp"
Global $helixboxIMG = "src/collect/helixbox.bmp"
Global $greenbootyIMG = "src/collect/greenbooty.bmp"
Global $yellowbootyIMG = "src/collect/yellowbooty.bmp"
Global $bluebootyIMG = "src/collect/bluebooty.bmp"
Global $redbootyIMG = "src/collect/redbooty.bmp"
Global $cargofullIMG = "src/collect/cargofull.bmp"
Global $fountcargoIMG = "src/collect/fountcargo.bmp"
Global $palladiumIMG = "src/collect/palladium.bmp"

Global $shipstatusIMG = "src/shipstatus.bmp"

Global $mapcoordinatesIMG = "src/map/select_map_coordinates.bmp"
Global $mapsearchstateIMG = "src/map/map_search_state.bmp"
Global $mapgateIMG = "src/map/gate.bmp"
Global $mapopenIMG = "src/map/open_map.bmp"
Global $fleex2shipIMG = "src/map/ship.bmp"

Global $1enemieIMG = "src/map/1enemie.bmp"
Global $2enemieIMG = "src/map/2enemie.bmp"
Global $3enemieIMG = "src/map/3enemie.bmp"
Global $4enemieIMG = "src/map/4enemie.bmp"
Global $5enemieIMG = "src/map/5enemie.bmp"
Global $map21IMG = "src/map/2-1.bmp"
Global $map22IMG = "src/map/2-2.bmp"
Global $map23IMG = "src/map/2-3.bmp"
Global $map24IMG = "src/map/2-4.bmp"

Global $aegislife10IMG = "src/aegis/life10.bmp"
Global $aegislife20IMG = "src/aegis/life20.bmp"
Global $aegislife30IMG = "src/aegis/life30.bmp"
Global $aegislife40IMG = "src/aegis/life40.bmp"
Global $aegislife50IMG = "src/aegis/life50.bmp"
Global $aegislife60IMG = "src/aegis/life60.bmp"
Global $aegislife70IMG = "src/aegis/life70.bmp"
Global $aegislife80IMG = "src/aegis/life80.bmp"
Global $aegislife90IMG = "src/aegis/life90.bmp"
Global $aegislife100IMG = "src/aegis/life100.bmp"


Global $aegisshield10IMG = "src/aegis/shield10.bmp"
Global $aegisshield20IMG = "src/aegis/shield20.bmp"
Global $aegisshield30IMG = "src/aegis/shield30.bmp"
Global $aegisshield40IMG = "src/aegis/shield40.bmp"
Global $aegisshield50IMG = "src/aegis/shield50.bmp"
Global $aegisshield60IMG = "src/aegis/shield60.bmp"
Global $aegisshield70IMG = "src/aegis/shield70.bmp"
Global $aegisshield80IMG = "src/aegis/shield80.bmp"
Global $aegisshield90IMG = "src/aegis/shield90.bmp"
Global $aegisshield100IMG = "src/aegis/shield100.bmp"

Global $lifeIMG = "src/aegis/life.bmp"
Global $shieldIMG = "src/aegis/shield.bmp"
Global $beaconIMG = "src/aegis/beacon.bmp"

Global $x1IMG = "src/npc/x1.bmp"
Global $x2IMG = "src/npc/x2.bmp"
Global $x3IMG = "src/npc/x3.bmp"
Global $x4IMG = "src/npc/x4.bmp"
Global $muni1IMG = "src/npc/muni1.bmp"
Global $muni2IMG = "src/npc/muni2.bmp"
Global $muni3IMG = "src/npc/muni3.bmp"
Global $muni4IMG = "src/npc/muni4.bmp"

Global $palladium_npcIMG = "src/npc/palladiumnpc.bmp"
Global $npc_lordakiaIMG = "src/npc/npc_lordakia.bmp"
Global $npc_streunerIMG = "src/npc/npc_streuner.bmp"
Global $npc_bosslordakiaIMG = "src/npc/npc_bosslordakia.bmp"
Global $npc_bossstreunerIMG = "src/npc/npc_bossstreuner.bmp"
Global $npcfireIMG = "src/npc/npcfire.bmp"
Global $npcmapIMG = "src/npc/npcmap.bmp"

Global $npc_mordonIMG = "src/npc/npc_mordon.bmp"
Global $npc_bossmordonIMG = "src/npc/npc_bossmordon.bmp"

Global $npc_saimonIMG = "src/npc/npc_saimon.bm"
Global $npc_bosssaimonIMG = "src/npc/npc_bosssaimon.bmp"

Global $petantibugIMG = "src/pet/petantibug.bmp"
Global $petopenIMG = "src/pet/petopen.bmp"
Global $petrepairIMG = "src/pet/petrepair.bmp"
Global $petmenuIMG = "src/pet/petmenu.bmp"
Global $petcloseIMG = "src/pet/petclose.bmp"
Global $petlootIMG = "src/pet/petloot.bmp"
Global $petresIMG = "src/pet/petres.bmp"
Global $petoptionIMG = "src/pet/petoption.bmp"
Global $petmapIMG = "src/pet/petmap.bmp"
Global $petlootstatusIMG = "src/pet/petlootstatus.bmp"
Global $petresstatusIMG = "src/pet/petresstatus.bmp"

Global $kloakcpu10IMG = "src/kloakcpu10.bmp"
Global $kloakcpu50IMG = "src/kloakcpu50.bmp"
Global $kloakedcpu10IMG = "src/kloakedcpu10.bmp"
Global $kloakedcpu50IMG = "src/kloakedcpu50.bmp"

Global $spearheadreconIMG = "src/spearhead/recon.bmp"
Global $spearheadcloakingIMG = "src/spearhead/cloaking.bmp"

Global $rapairgateIMG = "src/repair/rapairgate.bmp"
Global $repairbaseIMG = "src/repair/repairbase.bmp"
Global $repairspotIMG = "src/repair/repairspot.bmp"
Global $repairbottonIMG = "src/repair/repairbotton.bmp"
Global $connectionlostIMG = "src/repair/connectionlost.bmp"

;INI
Global $filesettingsINI = @ScriptDir & "\src\settings.ini"
;GUI_read
Global $collect_bonusbox, $collect_cargobox, $green_booty, $collect_palladium, $kill_palladium_npc, $killnpc, $blue_booty, $red_booty, $yellow_booty
Global $disconnect_after_time, $time_calc, $disconnect_after_select, $time_msg
Global $antiban, $mouse_time, $aegislife, $aegisbeacon, $aegisshield
;GUI_set
Global $fleex2, $usepet, $fleex2_enemies, $fleex2IMG, $repairpet, $autolooterpet, $resoursepet, $kloakcpu
;aegis
Global $useaegis, $aegisbeaconrepair, $aegisliferepair, $aegisshieldrepair, $aegislifeIMG, $aegisshieldIMG, $aegisbeaconIMG, $notuseship
Global $usespearhead, $spearheadautocloaking, $spearheadcloaking, $spearheadnocloaking, $spearheadrecon, $spearheadnorecon, $cloaking, $recon
Global $repairbase, $repairgate, $repairspot, $maxrepairtimes, $maxrepaircounter, $reviveship, $revivewaittime, $revive_calc
;killnpc
Global $fire2, $npc, $lordakia, $boss_lordakia, $streuner, $boss_streuner, $saimon, $boss_saimon, $mordon, $boss_mordon
Global $npc1, $npc2, $npc3, $npc4, $npc5, $npc6, $npc7, $npc8
Global $map1, $map2
; variables a declarar==END

Func _exit() ;para el bot
GUISetState(@SW_RESTORE)
_bot_menu()
EndFunc ;==>_exit

Func _exitbot() ;cierra el bot
Exit
EndFunc ;==>_exitbot

Func _pause() ;Para el programa asta nuevo aviso
$pausa = Not $pausa
EndFunc ;==>_pause

_start()

Func _start()

FileInstall('C:\Users\loop\Desktop\m_XZ\include\sr c.zip', @ScriptDir & '\src.zip', 1)
FileInstall('C:\Users\loop\Desktop\m_XZ\include\7z .dll', @ScriptDir & '\7z.dll', 1)
FileInstall('C:\Users\loop\Desktop\m_XZ\include\7z .exe', @ScriptDir & '\7z.exe', 1)
$unzip = "7z x -aoa "
$archiv = "src.zip"
_RunDos($unzip & $archiv)
FileDelete("src.zip")
FileDelete("7z.dll")
FileDelete("7z.exe")

IniWrite($filesettingsINI, "update", "version", '"' & $ver & '"')

If Not FileExists(@ScriptDir & "\ImageSearchDLL.dll") Then
FileInstall('C:\Users\loop\Desktop\m_XZ\ImageSearc hDLL.dll', @ScriptDir & '\ImageSearchDLL.dll', 1)
EndIf

If FileExists($filesettingsINI) Then
$fraction = Int(IniRead($filesettingsINI, "user_fraction", "fraction", 0))
If Not ($fraction = 1 Or $fraction = 2 Or $fraction = 3) Then
_select_fraction()
EndIf
Else
_select_fraction()
EndIf
_update()
EndFunc ;==>_start

Func _select_fraction()
#Region ### START Koda GUI section ### Form=
$Form3 = GUICreate("Select you Fraction | Do bot", 413, 281, 191, 124)
$Pic1 = GUICtrlCreatePic("src/fraction/MMO_Mascot.bmp", 8, 8, 124, 212)
$Pic2 = GUICtrlCreatePic("src/fraction/EIC_Mascot.bmp", 141, 9, 124, 212)
$Pic3 = GUICtrlCreatePic("src/fraction/VRU_Mascot.bmp", 277, 9, 124, 212)
$mmo = GUICtrlCreateRadio("MMO", 40, 232, 81, 25)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$eic = GUICtrlCreateRadio("EIC", 176, 232, 81, 25)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$vru = GUICtrlCreateRadio("VRU", 312, 232, 81, 25)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $mmo
$fraction = 1
IniWrite($filesettingsINI, "user_fraction", "fraction", $fraction)
GUIDelete($Form3)
ExitLoop
Case $eic
$fraction = 2
IniWrite($filesettingsINI, "user_fraction", "fraction", $fraction)
GUIDelete($Form3)
ExitLoop
Case $vru
$fraction = 3
IniWrite($filesettingsINI, "user_fraction", "fraction", $fraction)
GUIDelete($Form3)
ExitLoop
EndSwitch
WEnd
EndFunc ;==>_select_fraction

#Region ### START Koda GUI section ### Form=C:\Users\loop\Documents\Form1_1.kxf
$Form1 = GUICreate("Do bot", 591, 419, 322, 151)
$MenuItem1 = GUICtrlCreateMenu("&Menu")
$m_save_settings = GUICtrlCreateMenuItem("Save Settings" & @TAB & "Alt+NUMERO 5", $MenuItem1)
$m_start_bot = GUICtrlCreateMenuItem("- Start Bot -" & @TAB & "Shift+Ctrl+Alt+,", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenu("&Aboud")
$MenuItem3 = GUICtrlCreateMenuItem("Do Bot" & @TAB & "Alt+H", $MenuItem4)
$MenuItem5 = GUICtrlCreateMenuItem("Help" & @TAB & "Alt+ALT", $MenuItem4)
$Tab1 = GUICtrlCreateTab(0, 0, 585, 393)
$TabSheet1 = GUICtrlCreateTabItem("Home")
$l_welcome = GUICtrlCreateLabel("Welcome to Do bot", 128, 26, 336, 28)
GUICtrlSetFont(-1, 16, 800, 2, "Arial")
GUICtrlSetColor(-1, 0x008000)
$NEWS = GUICtrlCreateEdit("", 8, 62, 273, 305)
GUICtrlSetData(-1, "")
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TabSheet2 = GUICtrlCreateTabItem("Collect")
$checkbox_bonusbox = GUICtrlCreateCheckbox("Bonus and Eventboxes", 16, 46, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$checkbox_cargobox = GUICtrlCreateCheckbox("Cargoboxes", 16, 78, 137, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$Group2 = GUICtrlCreateGroup("Booty", 20, 113, 137, 145)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$checkbox_y_booty = GUICtrlCreateCheckbox("Yellow Booty", 46, 166, 105, 17)
$checkbox_g_booty = GUICtrlCreateCheckbox("Green Booty", 46, 134, 105, 17)
$checkbox_r_booty = GUICtrlCreateCheckbox("Red Booty", 46, 198, 105, 17)
$checkbox_b_booty = GUICtrlCreateCheckbox("Blue Booty", 46, 230, 105, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Maps", 196, 41, 353, 193)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$combo_map1 = GUICtrlCreateCombo("", 212, 105, 121, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
$combo_map2 = GUICtrlCreateCombo("", 404, 105, 121, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
$Label4 = GUICtrlCreateLabel("Map 1", 260, 81, 33, 18)
$Label5 = GUICtrlCreateLabel("Map 2", 444, 81, 33, 18)
$input_switch_map_time = GUICtrlCreateInput("", 285, 169, 87, 22)
$combo_switch_map_time = GUICtrlCreateCombo("", 400, 169, 81, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
$Label6 = GUICtrlCreateLabel("<--->", 356, 105, 24, 18)
$Checkbox_switch_map = GUICtrlCreateCheckbox("Switch map", 324, 145, 89, 17)
$Label7 = GUICtrlCreateLabel("Every", 228, 169, 35, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet4 = GUICtrlCreateTabItem("Npc Killer")
$checkbox_kill_npc = GUICtrlCreateCheckbox("Kill NPC", 8, 22, 81, 25)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_streuner = GUICtrlCreateCheckbox("Streuner", 8, 54, 81, 25)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_boss_streuner = GUICtrlCreateCheckbox("Boss Streuner", 8, 86, 89, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_lordakia = GUICtrlCreateCheckbox("Lordakia", 8, 118, 89, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_boss_lordakia = GUICtrlCreateCheckbox("Boss Lordakia", 9, 146, 89, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_saimon = GUICtrlCreateCheckbox("Saimon", 106, 57, 81, 25)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_boss_saimon = GUICtrlCreateCheckbox("Boss Saimon", 106, 89, 89, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_mordon = GUICtrlCreateCheckbox("Mordon", 106, 121, 89, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_boss_mordon = GUICtrlCreateCheckbox("Boss Mordon", 107, 149, 89, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label13 = GUICtrlCreateLabel("Warning slow and buggy, use at your own risk !!", 28, 313, 501, 31)
GUICtrlSetFont(-1, 14, 800, 0, "Arial Black")
GUICtrlSetColor(-1, 0xFF0000)
$TabSheet6 = GUICtrlCreateTabItem("Settings")
$Group5 = GUICtrlCreateGroup("Disconnect after", 12, 29, 225, 65)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$input_disconnect_after = GUICtrlCreateInput("", 28, 53, 97, 22, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
$combo_disconnect_after = GUICtrlCreateCombo("", 140, 53, 81, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "Off|Minutes|Hours")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group6 = GUICtrlCreateGroup("Flee x2", 12, 107, 313, 81)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_fleex2 = GUICtrlCreateCheckbox("Flee on", 36, 139, 57, 17)
$l_fleex2 = GUICtrlCreateLabel("", 92, 139, 21, 18)
$combo_fleex2 = GUICtrlCreateCombo("", 236, 131, 81, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|3|4|5")
$Label9 = GUICtrlCreateLabel("when enemies on map", 116, 139, 113, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group7 = GUICtrlCreateGroup("Reconnect after", 244, 29, 225, 65)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$input_reconnect_after = GUICtrlCreateInput("", 260, 53, 97, 22, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
$combo_reconnect_after = GUICtrlCreateCombo("", 372, 53, 81, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "Minutes|Hours")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group8 = GUICtrlCreateGroup("Anti Ban", 333, 116, 145, 65)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$combo_antiban = GUICtrlCreateCombo("", 342, 142, 129, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "Off|Low|High")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group11 = GUICtrlCreateGroup("Cloaking CPU", 12, 195, 193, 73)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$combo_kloakcpu = GUICtrlCreateCombo("", 106, 234, 81, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "Off|1|2|3|4|5|6|7|8|9|0")
$Label28 = GUICtrlCreateLabel("Quickslot bar", 20, 235, 67, 18)
$Label23 = GUICtrlCreateLabel("Cloak if not Cloaked", 52, 213, 98, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group16 = GUICtrlCreateGroup("Revive", 12, 269, 401, 105)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$checkbox_reviveship = GUICtrlCreateCheckbox("Revive when being destroyed", 28, 285, 177, 17)
$radio_repairbase = GUICtrlCreateRadio("At Base", 52, 309, 89, 25)
$radio_repairgate = GUICtrlCreateRadio("At Gate", 156, 309, 97, 25)
$radio_repairspot = GUICtrlCreateRadio("On Spot", 284, 309, 97, 25)
$Label29 = GUICtrlCreateLabel("Maximun", 204, 285, 46, 18)
$Label30 = GUICtrlCreateLabel("times", 356, 285, 29, 18)
$input_maxrepairtimes = GUICtrlCreateInput("0", 260, 285, 81, 22)
$Label31 = GUICtrlCreateLabel("After Being destroyed wait", 68, 341, 135, 18)
$combo_revivewaittime = GUICtrlCreateCombo("", 220, 339, 97, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "10 seconds|20 seconds|30 seconds|40 seconds|50 seconds|1 Minustes|2 Minustes|3 Minustes")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet7 = GUICtrlCreateTabItem("Palladium")
$checkbox_palladium = GUICtrlCreateCheckbox("Collect palladium", 204, 149, 137, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$checkbox_palladium_npc = GUICtrlCreateCheckbox("Kill Palladium NPC", 204, 181, 137, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$TabSheet3 = GUICtrlCreateTabItem("Ship Abilities")
$Group9 = GUICtrlCreateGroup("Ship", 116, 37, 113, 129)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$radio_aegis = GUICtrlCreateRadio("Aegis", 132, 53, 81, 17)
$radio_spearhea = GUICtrlCreateRadio("Spearhead", 132, 77, 81, 17)
$radio_notuse = GUICtrlCreateRadio("Not use", 132, 101, 81, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group10 = GUICtrlCreateGroup("Aegis", 68, 203, 217, 145)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$combo_aegis_life = GUICtrlCreateCombo("", 76, 243, 57, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0")
$combo_aegis_shield = GUICtrlCreateCombo("", 76, 275, 57, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0")
$combo_aegis_beacon = GUICtrlCreateCombo("", 76, 307, 57, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0")
$combo_aegislife_repair = GUICtrlCreateCombo("", 204, 307, 57, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "10|20|30|40|50|60|70|80|90|100")
$combo_aegisshield_repair = GUICtrlCreateCombo("", 204, 275, 57, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "10|20|30|40|50|60|70|80|90|100")
$combo_aegisbeacon_repair = GUICtrlCreateCombo("", 204, 243, 57, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "10|20|30|40|50|60|70|80|90|100")
$Label8 = GUICtrlCreateLabel("Hp", 152, 246, 22, 18)
$Label10 = GUICtrlCreateLabel("Shield", 144, 278, 33, 18)
$Label11 = GUICtrlCreateLabel("Pod", 152, 310, 25, 18)
$Label12 = GUICtrlCreateLabel("Use when less x%", 180, 219, 85, 18)
$Label26 = GUICtrlCreateLabel("Quickslot bar", 76, 219, 67, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group13 = GUICtrlCreateGroup("Spearhead", 356, 44, 185, 289)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Group14 = GUICtrlCreateGroup("Ultimate Cloaking", 360, 139, 177, 89)
$radio_spearhead_autocloaking = GUICtrlCreateRadio("With enemy is near", 368, 155, 145, 17)
$radio_spearhead_cloaking = GUICtrlCreateRadio("Use when can", 368, 171, 129, 25)
$radio_spearhead_nocloaking = GUICtrlCreateRadio("Not use", 368, 195, 129, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group15 = GUICtrlCreateGroup("Recon", 360, 59, 177, 73)
$radio_spearhead_recon = GUICtrlCreateRadio("Use when can", 384, 75, 129, 17)
$radio_spearhead_norecon = GUICtrlCreateRadio("Not use", 384, 99, 129, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$combo_spearhead_recon = GUICtrlCreateCombo("", 368, 267, 65, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0")
$combo_spearhead_cloaking = GUICtrlCreateCombo("", 368, 299, 65, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0")
$Label24 = GUICtrlCreateLabel("Recon", 448, 267, 35, 18)
$Label25 = GUICtrlCreateLabel("Ultimate Cloaking", 448, 299, 88, 18)
$Label27 = GUICtrlCreateLabel("Quickslot bar", 365, 239, 67, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet5 = GUICtrlCreateTabItem("P.E.T.")
$Group3 = GUICtrlCreateGroup("P.E.T.", 127, 148, 297, 65)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$checkbox_use_pet = GUICtrlCreateCheckbox("Use P.E.T.", 135, 164, 81, 17)
$checkbox_repair_pet = GUICtrlCreateCheckbox("Repair P.E.T.", 135, 188, 81, 17)
$radio_autolooter_pet = GUICtrlCreateRadio("Auto Looter", 255, 164, 153, 17)
$radio_resourse_pet = GUICtrlCreateRadio("Resourse Collector", 255, 188, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet8 = GUICtrlCreateTabItem("Settings and Controls")
$Label14 = GUICtrlCreateLabel("1. [Graphics] LOW", 8, 48, 150, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label15 = GUICtrlCreateLabel("2. [Show Hp warning] OFF", 8, 80, 213, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label16 = GUICtrlCreateLabel("3. [Display game performance messages] OFF", 8, 112, 373, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label17 = GUICtrlCreateLabel("4. [Show minimap background] OFF", 8, 144, 288, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label18 = GUICtrlCreateLabel("5. [Show drones] OFF", 8, 176, 178, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label19 = GUICtrlCreateLabel("6. Set Minimap to SMALLEST", 8, 208, 241, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label20 = GUICtrlCreateLabel("Hotkey [F2] Stop Bot", 191, 246, 172, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label21 = GUICtrlCreateLabel("Hotkey [PAUSE] Pause Bot", 192, 281, 223, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label22 = GUICtrlCreateLabel("Hotkey [ESC] Close Bot", 193, 312, 333, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUICtrlSetState($NEWS, $GUI_DISABLE)
GUICtrlSetData($combo_disconnect_after, "Off")
GUICtrlSetData($combo_antiban, "Off")
GUICtrlSetData($combo_kloakcpu, "Off")
GUICtrlSetData($combo_revivewaittime, "40 seconds")
GUICtrlSetState($radio_notuse, $GUI_CHECKED)

;desactivados
GUICtrlSetState($input_reconnect_after, $GUI_DISABLE)
GUICtrlSetState($combo_reconnect_after, $GUI_DISABLE)


#CS
GUICtrlSetState($combo_map1, $GUI_DISABLE)
GUICtrlSetState($combo_map2, $GUI_DISABLE)
GUICtrlSetState($input_switch_map_time, $GUI_DISABLE)
GUICtrlSetState($Checkbox_switch_map, $GUI_DISABLE)
GUICtrlSetState($combo_switch_map_time, $GUI_DISABLE)
#CE


GUICtrlSetState($checkbox_fleex2, $GUI_DISABLE)
GUICtrlSetState($combo_fleex2, $GUI_DISABLE)

;---------------

$msg = "NEWS : Do bot 2015 by loop."
$msg &= @CRLF & @CRLF
$msg &= "Many improvements and new things."
$msg &= @CRLF & @CRLF
$msg &= "Helix boxes added. [18/06/2015]"
$msg &= @CRLF
$msg &= "[23/06/2015]"
$msg &= @CRLF
$msg &= "Blue and Red bootys added."
$msg &= @CRLF
$msg &= "Reconnection to lose the connection added."
$msg &= @CRLF
$msg &= "Connection lost System improved. [25/06/2015]"
$msg &= @CRLF & @CRLF
$msg &= "yellow bootys added. [26/06/2015]"
$msg &= @CRLF & @CRLF
$msg &= "Happy botig."
GUICtrlSetData($NEWS, $msg)
#CS
GUICtrlSetState($checkbox_fleex2, $GUI_ENABLE)
GUICtrlSetState($combo_fleex2, $GUI_DISABLE)
#CE
GUICtrlSetState($checkbox_g_booty, $GUI_ENABLE)
GUICtrlSetState($checkbox_y_booty, $GUI_ENABLE)
GUICtrlSetState($checkbox_r_booty, $GUI_ENABLE)
GUICtrlSetState($checkbox_b_booty, $GUI_ENABLE)

GUICtrlSetState($input_disconnect_after, $GUI_ENABLE)
GUICtrlSetState($combo_disconnect_after, $GUI_ENABLE)

GUICtrlSetState($m_save_settings, $GUI_DISABLE)

GUICtrlSetState($checkbox_use_pet, $GUI_ENABLE)
GUICtrlSetState($checkbox_repair_pet, $GUI_DISABLE)
GUICtrlSetState($radio_autolooter_pet, $GUI_DISABLE)
GUICtrlSetState($radio_resourse_pet, $GUI_DISABLE)
GUICtrlSetState($combo_antiban, $GUI_ENABLE)
GUICtrlSetState($checkbox_palladium, $GUI_ENABLE)
GUICtrlSetState($checkbox_palladium_npc, $GUI_DISABLE)
GUICtrlSetState($combo_kloakcpu, $GUI_ENABLE)
GUICtrlSetState($checkbox_reviveship, $GUI_ENABLE)

GUICtrlSetState($radio_aegis, $GUI_ENABLE)
GUICtrlSetState($radio_spearhea, $GUI_ENABLE)
GUICtrlSetState($radio_notuse, $GUI_ENABLE)

;-----------

_GUI_set()
_bot_menu()

Func _bot_menu()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $m_start_bot
_GUI_read()
If $collect_palladium = 1 And $collect_bonusbox = 1 Or ($collect_palladium = 1 And $killnpc = 1) Then
MsgBox(0, "error", "Palladium and Bonusbox or Kill NPC already selected, disable any befor start")
Else
_start_bot()
EndIf
Case $checkbox_fleex2
_GUI_read()
_GUI_set()
Case $checkbox_use_pet
_GUI_read()
_GUI_set()
Case $checkbox_palladium
_GUI_read()
_GUI_set()
Case $checkbox_reviveship
_GUI_read()
_GUI_set()
Case $radio_aegis
_GUI_read()
_GUI_set()
Case $radio_spearhea
_GUI_read()
_GUI_set()
Case $radio_notuse
_GUI_read()
_GUI_set()
EndSwitch
WEnd
EndFunc ;==>_bot_menu

Func _update()

#CS
$version = IniRead($filesettingsINI, "update", "version", 0)
$get = _INetGetSource("........./ver.php")
If Not ($get = $version) Then
$msg = "Do bbot Update available"
$msg &= @LF
$msg &= @LF & "Current version : " & $version
$msg &= @LF & "Available version : " & $get
$msg &= @LF
$msg &= @LF & "¿Download it?"
$msgbox = MsgBox(36, "Update", $msg)
If $msgbox = 6 Then
ProgressOn("Update Download", "Downloadig...", "0%")
$URL = "....../m.exe"
$folder = @ScriptDir & "\update.exe" ;Set folder
$hInet = InetGet($URL, $folder, 1, 1) ;Forces a reload from the remote site and return immediately and download in the background
$FileSize = InetGetSize($URL) ;Get file size
While Not InetGetInfo($hInet, 2) ;Loop until download is finished
Sleep(500) ;Sleep for half a second to avoid flicker in the progress bar
$BytesReceived = InetGetInfo($hInet, 0) ;Get bytes received
$Pct = Int($BytesReceived / $FileSize * 100) ;Calculate percentage
ProgressSet($Pct, $Pct & "%") ;Set progress bar
WEnd
ProgressOff()
FileMove(@ScriptDir & '\update.exe', @TempDir & '\update.exe', 1)
FileMove(@ScriptDir & '\m.exe', @TempDir & '\old.exe', 1)
FileMove(@TempDir & '\update.exe', @ScriptDir & '\ma.exe', 1)
Sleep(500)
MsgBox(64, "Update", "Update completed")
Run("m.exe")
Exit
EndIf
EndIf
#CE

EndFunc ;==>_update

Func _GUI_read()
$collect_bonusbox = GUICtrlRead($checkbox_bonusbox)
$collect_cargobox = GUICtrlRead($checkbox_cargobox)
$collect_palladium = GUICtrlRead($checkbox_palladium)
$kill_palladium_npc = GUICtrlRead($checkbox_palladium_npc)
$yellow_booty = GUICtrlRead($checkbox_y_booty)
$green_booty = GUICtrlRead($checkbox_g_booty)
$red_booty = GUICtrlRead($checkbox_r_booty)
$blue_booty = GUICtrlRead($checkbox_b_booty)
$disconnect_after_time = GUICtrlRead($input_disconnect_after)
$disconnect_after_select = GUICtrlRead($combo_disconnect_after)
$fleex2 = GUICtrlRead($checkbox_fleex2)
$fleex2_enemies = GUICtrlRead($combo_fleex2)
$usepet = GUICtrlRead($checkbox_use_pet)
$repairpet = GUICtrlRead($checkbox_repair_pet)
$autolooterpet = GUICtrlRead($radio_autolooter_pet)
$resoursepet = GUICtrlRead($radio_resourse_pet)
$useaegis = GUICtrlRead($radio_aegis)
$aegislife = GUICtrlRead($combo_aegis_life)
$aegisshield = GUICtrlRead($combo_aegis_shield)
$aegisbeacon = GUICtrlRead($combo_aegis_beacon)
$aegisliferepair = GUICtrlRead($combo_aegislife_repair)
$aegisshieldrepair = GUICtrlRead($combo_aegisshield_repair)
$aegisbeaconrepair = GUICtrlRead($combo_aegisbeacon_repair)
$kloakcpu = GUICtrlRead($combo_kloakcpu)
$killnpc = GUICtrlRead($checkbox_kill_npc)
$antiban = GUICtrlRead($combo_antiban)
$streuner = GUICtrlRead($checkbox_streuner)
$boss_streuner = GUICtrlRead($checkbox_boss_streuner)
$lordakia = GUICtrlRead($checkbox_lordakia)
$boss_lordakia = GUICtrlRead($checkbox_boss_lordakia)
$saimon = GUICtrlRead($checkbox_saimon)
$boss_saimon = GUICtrlRead($checkbox_boss_saimon)
$mordon = GUICtrlRead($checkbox_mordon)
$boss_mordon = GUICtrlRead($checkbox_boss_mordon)
$usespearhead = GUICtrlRead($radio_spearhea)
$spearheadautocloaking = GUICtrlRead($radio_spearhead_autocloaking)
$spearheadcloaking = GUICtrlRead($radio_spearhead_cloaking)
$spearheadnocloaking = GUICtrlRead($radio_spearhead_nocloaking)
$spearheadrecon = GUICtrlRead($radio_spearhead_recon)
$spearheadnorecon = GUICtrlRead($radio_spearhead_norecon)
$cloaking = GUICtrlRead($combo_spearhead_cloaking)
$recon = GUICtrlRead($combo_spearhead_recon)
$repairbase = GUICtrlRead($radio_repairbase)
$repairgate = GUICtrlRead($radio_repairgate)
$repairspot = GUICtrlRead($radio_repairspot)
$maxrepairtimes = GUICtrlRead($input_maxrepairtimes)
$revivewaittime = GUICtrlRead($combo_revivewaittime)
$reviveship = GUICtrlRead($checkbox_reviveship)
$notuseship = GUICtrlRead($radio_notuse)
$map1 = GUICtrlRead($combo_map1)
$map2 = GUICtrlRead($combo_map2)

EndFunc ;==>_GUI_read

Func _GUI_set()
If $fraction = 1 Then
GUICtrlSetData($l_fleex2, "1-2")
GUICtrlSetData($combo_map1, "1-1|1-2|1-3|1-4|1-8|1-7|1-6|1-5", "1-1")
GUICtrlSetData($combo_map2, "1-1|1-2|1-3|1-4|1-8|1-7|1-6|1-5", "1-1")
ElseIf $fraction = 2 Then
GUICtrlSetData($l_fleex2, "2-2")
GUICtrlSetData($combo_map1, "2-1|2-2|2-3|2-4|2-8|2-7|2-6|2-5", "2-1")
GUICtrlSetData($combo_map2, "2-1|2-2|2-3|2-4|2-8|2-7|2-6|2-5", "2-1")
ElseIf $fraction = 3 Then
GUICtrlSetData($l_fleex2, "3-2")
GUICtrlSetData($combo_map1, "3-1|3-2|3-3|3-4|3-8|3-7|3-6|3-5", "3-1")
GUICtrlSetData($combo_map1, "3-1|3-2|3-3|3-4|3-8|3-7|3-6|3-5", "3-1")
EndIf


If $fleex2 = 1 Then
GUICtrlSetState($checkbox_fleex2, $GUI_CHECKED)
GUICtrlSetState($combo_fleex2, $GUI_ENABLE)
Else
GUICtrlSetState($checkbox_fleex2, $GUI_UNCHECKED)
GUICtrlSetState($combo_fleex2, $GUI_DISABLE)
EndIf

If $repairpet = 1 Then
GUICtrlSetState($checkbox_repair_pet, $GUI_CHECKED)
GUICtrlSetState($checkbox_repair_pet, $GUI_ENABLE)
Else
GUICtrlSetState($checkbox_repair_pet, $GUI_UNCHECKED)
GUICtrlSetState($checkbox_repair_pet, $GUI_ENABLE)
EndIf

If $autolooterpet = 1 Then
GUICtrlSetState($radio_autolooter_pet, $GUI_CHECKED)
GUICtrlSetState($radio_autolooter_pet, $GUI_ENABLE)
GUICtrlSetState($radio_resourse_pet, $GUI_UNCHECKED)
GUICtrlSetState($radio_resourse_pet, $GUI_ENABLE)
EndIf

If $resoursepet = 1 Then
GUICtrlSetState($radio_autolooter_pet, $GUI_UNCHECKED)
GUICtrlSetState($radio_autolooter_pet, $GUI_ENABLE)
GUICtrlSetState($radio_resourse_pet, $GUI_CHECKED)
GUICtrlSetState($radio_resourse_pet, $GUI_ENABLE)
EndIf

If $usepet = 1 Then
GUICtrlSetState($checkbox_use_pet, $GUI_ENABLE)
GUICtrlSetState($checkbox_use_pet, $GUI_CHECKED)
GUICtrlSetState($checkbox_repair_pet, $GUI_ENABLE)
GUICtrlSetState($radio_autolooter_pet, $GUI_ENABLE)
GUICtrlSetState($radio_resourse_pet, $GUI_ENABLE)
Else
GUICtrlSetState($checkbox_use_pet, $GUI_ENABLE)
GUICtrlSetState($checkbox_repair_pet, $GUI_UNCHECKED)
GUICtrlSetState($checkbox_repair_pet, $GUI_DISABLE)
GUICtrlSetState($radio_autolooter_pet, $GUI_DISABLE)
GUICtrlSetState($radio_autolooter_pet, $GUI_UNCHECKED)
GUICtrlSetState($radio_resourse_pet, $GUI_DISABLE)
GUICtrlSetState($radio_resourse_pet, $GUI_UNCHECKED)
EndIf

If $collect_palladium = 1 Then
GUICtrlSetState($checkbox_palladium_npc, $GUI_ENABLE)
Else
GUICtrlSetState($checkbox_palladium_npc, $GUI_DISABLE)
GUICtrlSetState($checkbox_palladium_npc, $GUI_UNCHECKED)
EndIf

If $reviveship = 1 Then
GUICtrlSetState($checkbox_reviveship, $GUI_ENABLE)
GUICtrlSetState($checkbox_reviveship, $GUI_CHECKED)

GUICtrlSetState($radio_repairbase, $GUI_ENABLE)
GUICtrlSetState($radio_repairgate, $GUI_ENABLE)
GUICtrlSetState($radio_repairspot, $GUI_ENABLE)
GUICtrlSetState($input_maxrepairtimes, $GUI_ENABLE)
GUICtrlSetState($combo_revivewaittime, $GUI_ENABLE)
Else
GUICtrlSetState($checkbox_reviveship, $GUI_ENABLE)
GUICtrlSetState($checkbox_reviveship, $GUI_UNCHECKED)

GUICtrlSetState($radio_repairbase, $GUI_DISABLE)
GUICtrlSetState($radio_repairgate, $GUI_DISABLE)
GUICtrlSetState($radio_repairspot, $GUI_DISABLE)
GUICtrlSetState($input_maxrepairtimes, $GUI_DISABLE)
GUICtrlSetState($combo_revivewaittime, $GUI_DISABLE)
EndIf

If $useaegis = 1 Then
GUICtrlSetState($combo_aegis_life, $GUI_ENABLE)
GUICtrlSetState($combo_aegis_shield, $GUI_ENABLE)
GUICtrlSetState($combo_aegis_beacon, $GUI_ENABLE)
GUICtrlSetState($combo_aegislife_repair, $GUI_ENABLE)
GUICtrlSetState($combo_aegisshield_repair, $GUI_ENABLE)
GUICtrlSetState($combo_aegisbeacon_repair, $GUI_ENABLE)

GUICtrlSetState($radio_spearhead_autocloaking, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_cloaking, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_nocloaking, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_recon, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_norecon, $GUI_DISABLE)
GUICtrlSetState($combo_spearhead_recon, $GUI_DISABLE)
GUICtrlSetState($combo_spearhead_cloaking, $GUI_DISABLE)
ElseIf $usespearhead = 1 Then
GUICtrlSetState($radio_spearhead_autocloaking, $GUI_ENABLE)
GUICtrlSetState($radio_spearhead_cloaking, $GUI_ENABLE)
GUICtrlSetState($radio_spearhead_nocloaking, $GUI_ENABLE)
GUICtrlSetState($radio_spearhead_recon, $GUI_ENABLE)
GUICtrlSetState($radio_spearhead_norecon, $GUI_ENABLE)
GUICtrlSetState($combo_spearhead_recon, $GUI_ENABLE)
GUICtrlSetState($combo_spearhead_cloaking, $GUI_ENABLE)

GUICtrlSetState($combo_aegis_life, $GUI_DISABLE)
GUICtrlSetState($combo_aegis_shield, $GUI_DISABLE)
GUICtrlSetState($combo_aegis_beacon, $GUI_DISABLE)
GUICtrlSetState($combo_aegislife_repair, $GUI_DISABLE)
GUICtrlSetState($combo_aegisshield_repair, $GUI_DISABLE)
GUICtrlSetState($combo_aegisbeacon_repair, $GUI_DISABLE)
ElseIf $notuseship = 1 Then
GUICtrlSetState($radio_spearhead_autocloaking, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_cloaking, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_nocloaking, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_recon, $GUI_DISABLE)
GUICtrlSetState($radio_spearhead_norecon, $GUI_DISABLE)
GUICtrlSetState($combo_spearhead_recon, $GUI_DISABLE)
GUICtrlSetState($combo_spearhead_cloaking, $GUI_DISABLE)

GUICtrlSetState($combo_aegis_life, $GUI_DISABLE)
GUICtrlSetState($combo_aegis_shield, $GUI_DISABLE)
GUICtrlSetState($combo_aegis_beacon, $GUI_DISABLE)
GUICtrlSetState($combo_aegislife_repair, $GUI_DISABLE)
GUICtrlSetState($combo_aegisshield_repair, $GUI_DISABLE)
GUICtrlSetState($combo_aegisbeacon_repair, $GUI_DISABLE)
EndIf

EndFunc ;==>_GUI_set

Func _start_bot()
GUISetState(@SW_MINIMIZE)
_GUI_read()
_screen_coordinates()
_revive_time()
_antiban()
_fleex2_enemies()
_disconnect_timer_calc()
_aegis_life()
_run_bot()
EndFunc ;==>_start_bot

Func _aegis_life()
If $useaegis = 1 Then
If $aegisliferepair = "10" Then
$aegislifeIMG = $aegislife10IMG
ElseIf $aegisliferepair = "20" Then
$aegislifeIMG = $aegislife20IMG
ElseIf $aegisliferepair = "30" Then
$aegislifeIMG = $aegislife30IMG
ElseIf $aegisliferepair = "40" Then
$aegislifeIMG = $aegislife40IMG
ElseIf $aegisliferepair = "50" Then
$aegislifeIMG = $aegislife50IMG
ElseIf $aegisliferepair = "60" Then
$aegislifeIMG = $aegislife60IMG
ElseIf $aegisliferepair = "70" Then
$aegislifeIMG = $aegislife70IMG
ElseIf $aegisliferepair = "80" Then
$aegislifeIMG = $aegislife80IMG
ElseIf $aegisliferepair = "90" Then
$aegislifeIMG = $aegislife90IMG
ElseIf $aegisliferepair = "100" Then
$aegislifeIMG = $aegislife100IMG
EndIf

If $aegisshieldrepair = "10" Then
$aegisshieldIMG = $aegisshield10IMG
ElseIf $aegisshieldrepair = "20" Then
$aegisshieldIMG = $aegisshield20IMG
ElseIf $aegisshieldrepair = "30" Then
$aegisshieldIMG = $aegisshield30IMG
ElseIf $aegisshieldrepair = "40" Then
$aegisshieldIMG = $aegisshield40IMG
ElseIf $aegisshieldrepair = "50" Then
$aegisshieldIMG = $aegisshield50IMG
ElseIf $aegisshieldrepair = "60" Then
$aegisshieldIMG = $aegisshield60IMG
ElseIf $aegisshieldrepair = "70" Then
$aegisshieldIMG = $aegisshield70IMG
ElseIf $aegisshieldrepair = "80" Then
$aegisshieldIMG = $aegisshield80IMG
ElseIf $aegisshieldrepair = "90" Then
$aegisshieldIMG = $aegisshield90IMG
ElseIf $aegisshieldrepair = "100" Then
$aegisshieldIMG = $aegisshield100IMG
EndIf

If $aegisbeaconrepair = "10" Then
$aegisbeaconIMG = $aegislife10IMG
ElseIf $aegisbeaconrepair = "20" Then
$aegisbeaconIMG = $aegislife20IMG
ElseIf $aegisbeaconrepair = "30" Then
$aegisbeaconIMG = $aegislife30IMG
ElseIf $aegisbeaconrepair = "40" Then
$aegisbeaconIMG = $aegislife40IMG
ElseIf $aegisbeaconrepair = "50" Then
$aegisbeaconIMG = $aegislife50IMG
ElseIf $aegisbeaconrepair = "60" Then
$aegisbeaconIMG = $aegislife60IMG
ElseIf $aegisbeaconrepair = "70" Then
$aegisbeaconIMG = $aegislife70IMG
ElseIf $aegisbeaconrepair = "80" Then
$aegisbeaconIMG = $aegislife80IMG
ElseIf $aegisbeaconrepair = "90" Then
$aegisbeaconIMG = $aegislife90IMG
ElseIf $aegisbeaconrepair = "100" Then
$aegisbeaconIMG = $aegislife100IMG
EndIf
EndIf

EndFunc ;==>_aegis_life

Func _revive_time()
If $revivewaittime = "10 seconds" Then
$revive_calc = "10"
ElseIf $revivewaittime = "20 seconds" Then
$revive_calc = "20"
ElseIf $revivewaittime = "30 seconds" Then
$revive_calc = "30"
ElseIf $revivewaittime = "40 seconds" Then
$revive_calc = "40"
ElseIf $revivewaittime = "50 seconds" Then
$revive_calc = "50"
ElseIf $revivewaittime = "1 Minustes" Then
$revive_calc = "60"
ElseIf $revivewaittime = "2 Minustes" Then
$revive_calc = "120"
ElseIf $revivewaittime = "3 Minustes" Then
$revive_calc = "180"
EndIf
EndFunc ;==>_revive_time

Func _antiban()
If $antiban = "Off" Then
$mouse_time = 0
ElseIf $antiban = "Low" Then
$mouse_time = 5
ElseIf $antiban = "High" Then
$mouse_time = 10
EndIf
EndFunc ;==>_antiban

Func _fleex2_enemies()
If $fleex2_enemies = 1 Then
$fleex2IMG = $1enemieIMG
ElseIf $fleex2_enemies = 2 Then
$fleex2IMG = $2enemieIMG
ElseIf $fleex2_enemies = 3 Then
$fleex2IMG = $3enemieIMG
ElseIf $fleex2_enemies = 4 Then
$fleex2IMG = $4enemieIMG
ElseIf $fleex2_enemies = 5 Then
$fleex2IMG = $5enemieIMG
EndIf
EndFunc ;==>_fleex2_enemies

Func _disconnect_timer_calc()
Global $disconnect_timer = TimerInit()
If $disconnect_after_select = "Minutes" Then
$time_calc = ($disconnect_after_time * 60000)
ElseIf $disconnect_after_select = "Hours" Then
$time_calc = ($disconnect_after_time * 3600000)
EndIf
$time_msg = $disconnect_after_select
EndFunc ;==>_disconnect_timer_calc

Func _screen_coordinates()
$xwidth = @DesktopWidth / 2
$yheight = @DesktopHeight / 2
$screencoordinates1_x1 = $xwidth - $xwidth
$screencoordinates1_y1 = $yheight - $yheight
$screencoordinates1_x2 = $xwidth + $xwidth
$screencoordinates1_y2 = $yheight + $yheight

$a = $screencoordinates1_x2 - $screencoordinates1_x1 ; Largo de pantalla
$b = $screencoordinates1_y2 - $screencoordinates1_y1; Alto de pantalla

$screencoordinates2_x1 = $screencoordinates1_x1 + $a / 24
$screencoordinates2_y1 = $screencoordinates1_y1 + $b / 24

$screencoordinates2_x2 = $screencoordinates2_x1 + $a * 11 / 12
$screencoordinates2_y2 = $screencoordinates2_y1 + $b * 11 / 12

$screencoordinates3_x1 = $screencoordinates2_x1 + $a / 24
$screencoordinates3_y1 = $screencoordinates2_y1 + $b / 24

$screencoordinates3_x2 = $screencoordinates3_x1 + $a * 5 / 6
$screencoordinates3_y2 = $screencoordinates3_y1 + $b * 5 / 6

$screencoordinates4_x1 = $screencoordinates3_x1 + $a / 24
$screencoordinates4_y1 = $screencoordinates3_y1 + $b / 24

$screencoordinates4_x2 = $screencoordinates4_x1 + $a * 3 / 4
$screencoordinates4_y2 = $screencoordinates4_y1 + $b * 3 / 4

$screencoordinates5_x1 = $screencoordinates4_x1 + $a / 24
$screencoordinates5_y1 = $screencoordinates4_y1 + $b / 24

$screencoordinates5_x2 = $screencoordinates5_x1 + $a * 2 / 3
$screencoordinates5_y2 = $screencoordinates5_y1 + $b * 2 / 3

$screencoordinates6_x1 = $screencoordinates5_x1 + $a / 24
$screencoordinates6_y1 = $screencoordinates5_y1 + $b / 24

$screencoordinates6_x2 = $screencoordinates6_x1 + $a * 7 / 12
$screencoordinates6_y2 = $screencoordinates6_y1 + $b * 7 / 12

$screencoordinates7_x1 = $screencoordinates6_x1 + $a / 24
$screencoordinates7_y1 = $screencoordinates6_y1 + $b / 24

$screencoordinates7_x2 = $screencoordinates7_x1 + $a / 2
$screencoordinates7_y2 = $screencoordinates7_y1 + $b / 2

$screencoordinates8_x1 = $screencoordinates7_x1 + $a / 24
$screencoordinates8_y1 = $screencoordinates7_y1 + $b / 24

$screencoordinates8_x2 = $screencoordinates8_x1 + $a * 5 / 12
$screencoordinates8_y2 = $screencoordinates8_y1 + $b * 5 / 12

$screencoordinates9_x1 = $screencoordinates8_x1 + $a / 24
$screencoordinates9_y1 = $screencoordinates8_y1 + $b / 24

$screencoordinates9_x2 = $screencoordinates9_x1 + $a / 3
$screencoordinates9_y2 = $screencoordinates9_y1 + $b / 3

$screencoordinates10_x1 = $screencoordinates9_x1 + $a / 24
$screencoordinates10_y1 = $screencoordinates9_y1 + $b / 24

$screencoordinates10_x2 = $screencoordinates10_x1 + $a / 4
$screencoordinates10_y2 = $screencoordinates10_y1 + $b / 4

$screencoordinates11_x1 = $screencoordinates10_x1 + $a / 24
$screencoordinates11_y1 = $screencoordinates10_y1 + $b / 24

$screencoordinates11_x2 = $screencoordinates11_x1 + $a / 6
$screencoordinates11_y2 = $screencoordinates11_y1 + $b / 6

$screencoordinates12_x1 = $screencoordinates11_x1 + $a / 24
$screencoordinates12_y1 = $screencoordinates11_y1 + $b / 24

$screencoordinates12_x2 = $screencoordinates12_x1 + $a / 12
$screencoordinates12_y2 = $screencoordinates12_y1 + $b / 12

EndFunc ;==>_screen_coordinates


Func _run_bot()
Sleep(2000)
MouseClick("left", $a / 2, $b / 2, 1, 0)
Send("H")
Sleep(3000)
_map()
While True
If Not $pausa Then
Select
Case $jump = 1
_run_control()
Case $jump = 2
;_area1()
$screencoordinates_x1 = $screencoordinates12_x1
$screencoordinates_y1 = $screencoordinates12_y1
$screencoordinates_x2 = $screencoordinates12_x2
$screencoordinates_y2 = $screencoordinates12_y2
_search_area()
Case $jump = 3
;_area2()
$screencoordinates_x1 = $screencoordinates11_x1
$screencoordinates_y1 = $screencoordinates11_y1
$screencoordinates_x2 = $screencoordinates11_x2
$screencoordinates_y2 = $screencoordinates11_y2
_search_area()
Case $jump = 4
;_area3()
$screencoordinates_x1 = $screencoordinates10_x1
$screencoordinates_y1 = $screencoordinates10_y1
$screencoordinates_x2 = $screencoordinates10_x2
$screencoordinates_y2 = $screencoordinates10_y2
_search_area()
Case $jump = 5
;_area4()
$screencoordinates_x1 = $screencoordinates9_x1
$screencoordinates_y1 = $screencoordinates9_y1
$screencoordinates_x2 = $screencoordinates9_x2
$screencoordinates_y2 = $screencoordinates9_y2
_search_area()
Case $jump = 6
;_area5()
$screencoordinates_x1 = $screencoordinates8_x1
$screencoordinates_y1 = $screencoordinates8_y1
$screencoordinates_x2 = $screencoordinates8_x2
$screencoordinates_y2 = $screencoordinates8_y2
_search_area()
Case $jump = 7
;_area6()
$screencoordinates_x1 = $screencoordinates7_x1
$screencoordinates_y1 = $screencoordinates7_y1
$screencoordinates_x2 = $screencoordinates7_x2
$screencoordinates_y2 = $screencoordinates7_y2
_search_area()
Case $jump = 8
;_area7()
$screencoordinates_x1 = $screencoordinates6_x1
$screencoordinates_y1 = $screencoordinates6_y1
$screencoordinates_x2 = $screencoordinates6_x2
$screencoordinates_y2 = $screencoordinates6_y2
_search_area()
Case $jump = 9
;_area8()
$screencoordinates_x1 = $screencoordinates5_x1
$screencoordinates_y1 = $screencoordinates5_y1
$screencoordinates_x2 = $screencoordinates5_x2
$screencoordinates_y2 = $screencoordinates5_y2
_search_area()
Case $jump = 10
;_area9()
$screencoordinates_x1 = $screencoordinates4_x1
$screencoordinates_y1 = $screencoordinates4_y1
$screencoordinates_x2 = $screencoordinates4_x2
$screencoordinates_y2 = $screencoordinates4_y2
_search_area()
Case $jump = 11
;_area10()
$screencoordinates_x1 = $screencoordinates3_x1
$screencoordinates_y1 = $screencoordinates3_y1
$screencoordinates_x2 = $screencoordinates3_x2
$screencoordinates_y2 = $screencoordinates3_y2
_search_area()
Case $jump = 12
;_area11()
$screencoordinates_x1 = $screencoordinates2_x1
$screencoordinates_y1 = $screencoordinates2_y1
$screencoordinates_x2 = $screencoordinates2_x2
$screencoordinates_y2 = $screencoordinates2_y2
_search_area()
Case $jump = 13
;_area12()
$screencoordinates_x1 = $screencoordinates1_x1
$screencoordinates_y1 = $screencoordinates1_y1
$screencoordinates_x2 = $screencoordinates1_x2
$screencoordinates_y2 = $screencoordinates1_y2
_search_area()
Case $jump = 14
_map_search()
EndSelect
EndIf
WEnd
EndFunc ;==>_run_bot

Func _run_control()
If $collect_cargobox = 1 Then
_cargo_control()
EndIf
If $kill_palladium_npc = 1 Or $killnpc = 1 Then
_npc_killer()
EndIf
_connection_lost()
If $reviveship = 1 Then
_repair()
EndIf
If Not ($disconnect_after_select = "Off") Then
_disconnect_after_time()
EndIf
If $fleex2 = 1 Then
_flee_x2()
EndIf
If $useaegis = 1 Then
_aegis()
EndIf
If $usespearhead = 1 Then
_spearhead()
EndIf
If $usepet = 1 Then
_PET()
EndIf
If Not ($kloakcpu = "Off") Then
_kloakcpu()
EndIf
$jump = 2
EndFunc ;==>_run_control


Func _search_area()
$jump = $jump + 1
If $collect_bonusbox = 1 Then
$helixeventbox = _ImageSearchArea($helixboxIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
$neweventbox = _ImageSearchArea($neweventboxIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
If $neweventbox = 1 Or $helixeventbox = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep($box_sleeptime)
$jump = 1
EndIf
EndIf

If $collect_bonusbox = 1 Then
$bonusbox = _ImageSearchArea($bonusboxIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
If $bonusbox = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep($box_sleeptime)
$jump = 1
EndIf
EndIf

If $collect_cargobox = 1 Then
$cargobox = _ImageSearchArea($cargoboxIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
If $cargobox = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep($box_sleeptime)
$jump = 1
EndIf
EndIf

If $green_booty = 1 Then
$g_booty = _ImageSearchArea($greenbootyIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
If $g_booty = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(5000)
$jump = 1
EndIf
EndIf

If $yellow_booty = 1 Then
$g_booty = _ImageSearchArea($yellowbootyIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
If $g_booty = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(5000)
$jump = 1
EndIf
EndIf

If $blue_booty = 1 Then
$b_booty = _ImageSearchArea($bluebootyIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
If $b_booty = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(5000)
$jump = 1
EndIf
EndIf

If $red_booty = 1 Then
$r_booty = _ImageSearchArea($redbootyIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 50)
If $r_booty = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(5000)
$jump = 1
EndIf
EndIf

If $collect_palladium = 1 Then
$palladium = _ImageSearchArea($palladiumIMG, 1, $screencoordinates_x1, $screencoordinates_y1, $screencoordinates_x2, $screencoordinates_y2, $found_x, $found_y, 30)
If $palladium = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep($palladium_sleeptime)
$jump = 1
EndIf
EndIf

If $killnpc = 1 Then
$npc = _ImageSearchArea($palladium_npcIMG, 0, $screencoordinates7_x1, $screencoordinates7_y1, $screencoordinates7_x2, $screencoordinates7_y2, $found_x, $found_y, 40)
If $npc = 1 Then
_npc_killer()
$jump = 1
EndIf
EndIf
EndFunc ;==>_search_area



Func _repair()
If $repairbase = 1 Or $repairgate = 1 Or $repairspot = 1 Then
If $maxrepairtimes = $maxrepaircounter Then
Sleep(2000)
Send("l")
MsgBox(0, "Ship destroyed and Disconnected", "ship Disconnected after " & $maxrepaircounter & " destructions", 0)
_exit()
EndIf
EndIf
If $repairbase = 1 Then
$rep = _ImageSearchArea($repairbaseIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $rep = 1 Then
$repbutton = _ImageSearchArea($repairbottonIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
Sleep(5000)
;Send("l")
;MsgBox(0, "Ship destroyed and Disconnected", "Ship destroyed and Disconnected", 0)
_map()
EndIf

EndIf

If $repairgate = 1 Then
$rep = _ImageSearchArea($rapairgateIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $rep = 1 Then
Sleep(1000)
MouseClick("left", $found_x, $found_y, 1, 0)
Sleep(1000)
$repbutton = _ImageSearchArea($repairbottonIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $repbutton = 1 Then
_repair_menu()
MouseClick("left", $found_x, $found_y, 1, 0)
$maxrepaircounter = $maxrepaircounter + 1
EndIf
EndIf
EndIf


If $repairspot = 1 Then
$rep = _ImageSearchArea($repairspotIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $rep = 1 Then
Sleep(1000)
MouseClick("left", $found_x, $found_y, 1, 0)
Sleep(1000)
$repbutton = _ImageSearchArea($repairbottonIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $repbutton = 1 Then
_repair_menu()
MouseClick("left", $found_x, $found_y, 1, 0)
$maxrepaircounter = $maxrepaircounter + 1
EndIf
EndIf
EndIf
EndFunc ;==>_repair


Func _repair_menu()
#Region ### START Koda GUI section ### Form=
$Form5 = GUICreate("Revive | Do Bot", 332, 50, 0, 886)
$Label1 = GUICtrlCreateLabel("Time befor Revive :", 24, 8, 196, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$l_time_revive = GUICtrlCreateLabel("", 240, 8, 58, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetData($l_time_revive, $revive_calc)
For $revive = $revive_calc To 0 Step -1
Sleep(1000)
GUICtrlSetData($l_time_revive, $revive)
Next
GUIDelete($Form5)
Sleep(1000)
EndFunc ;==>_repair_menu

Func _map()
Local $sleepmap = 7000
_map_not_found()
$map21 = _ImageSearchArea($map21IMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
$map22 = _ImageSearchArea($map22IMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
$map23 = _ImageSearchArea($map23IMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
$map24 = _ImageSearchArea($map24IMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)

If $map21 = 1 Then ; Mapa 2-1
If $map1 = "2-2" Then
_gate3()
ElseIf $map1 = "2-3" Then
_gate3()
Sleep($sleepmap)
_gate3()
ElseIf $map1 = "2-4" Then
_gate3()
Sleep($sleepmap)
_gate4()
EndIf
ElseIf $map22 = 1 Then ; Mapa 2-2
If $map1 = "2-3" Then
_gate3()
ElseIf $map1 = "2-4" Then
_gate4()
EndIf
ElseIf $map23 = 1 Then ; Mapa 2-3
If $map1 = "2-2" Then
_gate2()
ElseIf $map1 = "2-4" Then
_gate4()
EndIf
ElseIf $map24 = 1 Then ; Mapa 2-4
If $map1 = "2-2" Then
_gate1()
ElseIf $map1 = "2-3" Then
_gate2()
EndIf
EndIf
EndFunc ;==>_map

Func _gate1()
Sleep(1000)
_map_not_found()
Sleep(1000)
$mapscoordinates = _ImageSearchArea($mapcoordinatesIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
MouseClick("left", $found_x - 153, $found_y + 41, 1, 0)
While 1
Sleep(1000)
$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $map_search_state = 0 Then
ExitLoop
EndIf
WEnd
Send("J")
EndFunc ;==>_gate1

Func _gate2()
Sleep(1000)
_map_not_found()
Sleep(1000)
$mapscoordinates = _ImageSearchArea($mapcoordinatesIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
MouseClick("left", $found_x - 3, $found_y + 41, 1, 0)
While 1
Sleep(1000)
$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $map_search_state = 0 Then
ExitLoop
EndIf
WEnd
Send("J")
EndFunc ;==>_gate2

Func _gate3()
Sleep(1000)
_map_not_found()
Sleep(1000)
$mapscoordinates = _ImageSearchArea($mapcoordinatesIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
MouseClick("left", $found_x - 153, $found_y + 127, 1, 0)
While 1
Sleep(1000)
$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $map_search_state = 0 Then
ExitLoop
EndIf
WEnd
Send("J")
EndFunc ;==>_gate3

Func _gate4()
Sleep(1000)
_map_not_found()
Sleep(1000)
$mapscoordinates = _ImageSearchArea($mapcoordinatesIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
MouseClick("left", $found_x - 3, $found_y + 127, 1, 0)
While 1
Sleep(1000)
$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $map_search_state = 0 Then
ExitLoop
EndIf
WEnd
Send("J")
EndFunc ;==>_gate4

Func _kloakcpu()
$kloakedcpu10 = _ImageSearchArea($kloakedcpu10IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$kloakedcpu50 = _ImageSearchArea($kloakedcpu50IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If Not ($kloakedcpu10 = 1 Or $kloakedcpu50 = 1) Then
$kloakcpu10 = _ImageSearchArea($kloakcpu10IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$kloakcpu50 = _ImageSearchArea($kloakcpu50IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $kloakcpu10 = 1 Or $kloakcpu50 = 1 Then
Send("{" & $kloakcpu & "}")
EndIf
EndIf
EndFunc ;==>_kloakcpu

Func _aegis()
_life_control()
Local $IMG1, $IMG2, $IMG3, $IMG4, $IMG5, $IMG6
$IMG1 = _ImageSearchArea($lifeIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$IMG2 = _ImageSearchArea($shieldIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$IMG3 = _ImageSearchArea($beaconIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$IMG4 = _ImageSearchArea($aegislifeIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$IMG5 = _ImageSearchArea($aegisshieldIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$IMG6 = _ImageSearchArea($aegisbeaconIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If Not $IMG4 = 1 And $IMG1 = 1 Then
Send("{" & $aegislife & "}")
EndIf
If Not $IMG5 = 1 And $IMG2 = 1 Then
Send("{" & $aegisshield & "}")
EndIf
If Not $IMG6 = 1 And $IMG3 = 1 Then
Send("{" & $aegisbeacon & "}")
Sleep(7000)
EndIf
EndFunc ;==>_aegis

Func _spearhead()
Local $IMG1, $IMG2, $IMG3
If $spearheadautocloaking = 1 Then
$enemymap = _ImageSearchArea($npcmapIMG, 0, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 20)
If $enemymap = 1 Then
$IMG1 = _ImageSearchArea($spearheadcloakingIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 1)
If $IMG1 = 1 Then
;MsgBox(0,"cloak",$cloaking)
Send("{" & $cloaking & "}")
EndIf
EndIf
EndIf

If $spearheadcloaking = 1 Then
$IMG2 = _ImageSearchArea($spearheadcloakingIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 1)
If $IMG2 = 1 Then
;MsgBox(0,"cloak","ok")
Send("{" & $cloaking & "}")
EndIf
EndIf

If $spearheadrecon = 1 Then
$IMG3 = _ImageSearchArea($spearheadreconIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 1)
If $IMG3 = 1 Then
;MsgBox(0,"recon",$recon)
Send("{" & $recon & "}")
EndIf
EndIf
EndFunc ;==>_spearhead

Func _life_control()
$fountcargo = _ImageSearchArea($fountcargoIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $fountcargo = 0 Then
$shipstatus = _ImageSearchArea($shipstatusIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
MouseClick("left", $found_x, $found_y, 1, 0)
Sleep(2000)
EndIf
EndFunc ;==>_life_control

Func _cargo_control()
$fountcargo = _ImageSearchArea($fountcargoIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $fountcargo = 1 Then
$cargofull = _ImageSearchArea($cargofullIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $cargofull = 1 Then
If $collect_cargobox = 1 Then
$collect_cargobox = 0
EndIf
EndIf
Else
$shipstatus = _ImageSearchArea($shipstatusIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
MouseClick("left", $found_x, $found_y, 1, 0)
Sleep(2000)
EndIf
EndFunc ;==>_cargo_control

Func _connection_lost()
Local $IMG1, $time_conecction
$IMG1 = _ImageSearchArea($connectionlostIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $IMG1 = 1 Then
#Region ### START Koda GUI section ### Form=
$Form5 = GUICreate("Connection lost | Do bot", 326, 122, 0, 812)
$Label1 = GUICtrlCreateLabel("Time befor Reconnect :", 24, 8, 228, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$l_time_connection = GUICtrlCreateLabel("40", 264, 8, 26, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label3 = GUICtrlCreateLabel("Attempts :", 96, 88, 96, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$l_attemps_connection = GUICtrlCreateLabel("0", 200, 88, 34, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("Time for next attempt :", 16, 48, 252, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$l_attemps_time = GUICtrlCreateLabel("10", 280, 48, 26, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$attemps_connection = 0
While 1
_INetGetSource("http://www.darkorbit.com/")
If Not @error Then
GUICtrlSetData($l_time_connection, "40")
For $time_conecction = 40 To 0 Step -1
Sleep(1000)
GUICtrlSetData($l_time_connection, $time_conecction)
Next
MouseClick("left", $found_x + 10, $found_y + 170, 1, 0)
GUIDelete($Form5)
ExitLoop
Else
GUICtrlSetData($l_attemps_time, "10")
For $time_conecction = 10 To 0 Step -1
Sleep(1000)
GUICtrlSetData($l_attemps_time, $time_conecction)
Next
$attemps_connection = $attemps_connection + 1
GUICtrlSetData($l_attemps_connection, $attemps_connection)
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete($Form5)
_exit()
EndSwitch
WEnd
EndIf

EndFunc ;==>_connection_lost

Func _disconnect_after_time()
$disconnect_timed = TimerDiff($disconnect_timer)
If $disconnect_timed > $time_calc Then
_disconnect_ship()
EndIf
EndFunc ;==>_disconnect_after_time

Func _disconnect_ship()
$mapgate = _ImageSearchArea($mapgateIMG, 1, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 50)
MouseClick("left", $found_x, $found_y, 1, 0)
While True
Sleep(2000)
;$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $map_search_state_up_x, $map_search_state_up_y, $map_search_state_down_x, $map_search_state_down_y, $found_x, $found_y, 50)
$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $map_search_state = 0 Then
ExitLoop
EndIf
WEnd
Send("L")
MsgBox(0, "Disconnect", "Ship disconnected after : " & $disconnect_after_time & " " & $time_msg)
_exit()
EndFunc ;==>_disconnect_ship

Func _fleex2_map_coordinates()

#CS
_map_not_found()
$mapscoordinates = _ImageSearchArea($mapcoordinatesIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $mapscoordinates = 1 Then
$map_coordinates_up_x = $found_x - 168
$map_coordinates_up_y = $found_y + 27
$map_coordinates_down_x = $found_x + 15
$map_coordinates_down_y = $found_y + 138
EndIf
$fleex2_map_up = $map_coordinates_up_x + $map_coordinates_down_x
$fleex2_map_down = $map_coordinates_up_y + $map_coordinates_down_y
$fleex2_map_x = $fleex2_map_up /2 ;center
$fleex2_map_y = $fleex2_map_down /2 ;center

MouseClick("left", $map_coordinates_up_x, $map_coordinates_up_y) ;sect 1
MouseClick("left", $fleex2_map_x, $fleex2_map_y);center
MouseClick("left", $fleex2_map_x, $fleex2_map_y);center

MsgBox(0,"",$fleex2_map_x & " " & $fleex2_map_y)
;MsgBox(0,"",$x2 & " " & $y2)
;MouseClick("left", $x2, $y2)

Exit



$xwidth = @DesktopWidth / 2
$yheight = @DesktopHeight / 2
$screencoordinates1_x1 = $xwidth - $xwidth
$screencoordinates1_y1 = $yheight - $yheight
$screencoordinates1_x2 = $xwidth + $xwidth
$screencoordinates1_y2 = $yheight + $yheight

$a = $screencoordinates1_x2 - $screencoordinates1_x1 ; Largo de pantalla
$b = $screencoordinates1_y2 - $screencoordinates1_y1; Alto de pantalla
#CE

EndFunc ;==>_fleex2_map_coordinates

Func _flee_x2()
;_map_coordinates()
$fleex2enemies = _ImageSearchArea($fleex2IMG, 1, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 50)
If $fleex2enemies = 1 Then
$mapgate = _ImageSearchArea($mapgateIMG, 1, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 50)
MouseClick("left", $found_x, $found_y, 1, 0)
While True
$fleex2enemies = _ImageSearchArea($fleex2IMG, 1, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 50)
If $fleex2enemies = 0 Then
ExitLoop
EndIf
WEnd
EndIf
#CS
_fleex2_map_coordinates()
$fleex2enemies = _ImageSearchArea($fleex2IMG, 1,$map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 50)
If $fleex2enemies = 1 Then
$fleex2ship = _ImageSearchArea($fleex2shipIMG, 1, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 20)
If $fleex2 = 1 Then
MsgBox(0,"test","test")
MouseClick("left", $found_x, $found_y)
EndIf
EndIf
#CE

EndFunc ;==>_flee_x2

Func _npc_killer()

$premuni1 = _ImageSearchArea($x1IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $premuni1 = 1 Then
;MsgBox (0, "Muni","x1",0)
$muni = _ImageSearchArea($muni1IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 30)
;MouseClick("left", $CorMuni_X-22, $CorMuni_Y+16, 1, 0)

EndIf

$premuni2 = _ImageSearchArea($x2IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $premuni2 = 1 Then
;MsgBox (0, "Muni","x2",0)
$muni = _ImageSearchArea($muni2IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 30)
;MouseClick("left", $CorMuni_X-22, $CorMuni_Y+16, 1, 0)
EndIf

$premuni3 = _ImageSearchArea($x3IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $premuni3 = 1 Then
;MsgBox (0, "Muni","x3",0)
$muni = _ImageSearchArea($muni3IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 30)
;MouseClick("left", $CorMuni_X-22, $CorMuni_Y+16, 1, 0)
EndIf

$premuni4 = _ImageSearchArea($x4IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $premuni4 = 1 Then
;MsgBox (0, "Muni","x4",0)
$muni = _ImageSearchArea($muni4IMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 30)
;MouseClick("left", $CorMuni_X-22, $CorMuni_Y+16, 1, 0)
EndIf

If $kill_palladium_npc = 1 Then
$fire1 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
If $fire1 = $fire2 Then
$palladium_npc = _ImageSearchArea($palladium_npcIMG, 0, $screencoordinates7_x1, $screencoordinates7_y1, $screencoordinates7_x2, $screencoordinates7_y2, $found_x, $found_y, 40)
If $palladium_npc = 1 Then
MouseClick("left", $found_x + 30, $found_y - 30, 1, 0)
Sleep(600)
Send("{LCTRL}")
Sleep(2000)
EndIf
EndIf
$fire2 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
EndIf

If $killnpc = 1 Then
If $streuner = 1 Then
$npc1 = _ImageSearchArea($npc_streunerIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf
If $boss_streuner = 1 Then
$npc2 = _ImageSearchArea($npc_bossstreunerIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf
If $lordakia = 1 Then
$npc3 = _ImageSearchArea($npc_lordakiaIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf
If $boss_lordakia = 1 Then
$npc4 = _ImageSearchArea($npc_bosslordakiaIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf
If $mordon = 1 Then
$npc5 = _ImageSearchArea($npc_mordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf
If $boss_mordon = 1 Then
$npc6 = _ImageSearchArea($npc_bossmordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf
If $saimon = 1 Then
$npc7 = _ImageSearchArea($npc_saimonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf
If $boss_saimon = 1 Then
$npc8 = _ImageSearchArea($npc_bosssaimonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
EndIf

#CS
$npc5 = _ImageSearchArea($npc_mordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
$npc5 = _ImageSearchArea($npc_mordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
$npc5 = _ImageSearchArea($npc_mordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
$npc5 = _ImageSearchArea($npc_mordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
$npc5 = _ImageSearchArea($npc_mordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)
$npc5 = _ImageSearchArea($npc_mordonIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_npc, $found_y_npc, 60)

#CE
If $npc1 = 1 Or $npc2 = 1 Or $npc3 = 1 Or $npc4 = 1 Or $npc5 = 1 Or $npc6 = 1 Or $npc7 = 1 Or $npc8 = 1 Then
$fire1 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
If $fire1 = $fire2 Then
MouseClick("left", $found_x_npc + 30, $found_y_npc - 30, 1, 0)
Sleep(600)
Send("{LCTRL}")
Sleep(2000)
While True
$fire1 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
$npcfire = _ImageSearchArea($npcfireIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_fire, $found_y_fire, 60)
If $npcfire = 0 Then
$fire1 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
If $fire1 = $fire2 Then
ExitLoop
EndIf
Sleep(1000)
$fire2 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
ElseIf $npcfire = 1 Then
;MsgBox(0,"ok","ok")
MouseClick("left", $found_x_fire - 45, $found_y_fire, 1, 0)
EndIf
Sleep(600)
$fire2 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)

#CS
If $fire1 = $fire2 Then
While True
$fire1 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
If $fire1 = $fire2 Then
ExitLoop
EndIf
Sleep(1000)
$fire2 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
WEnd
EndIf
#CE

WEnd
EndIf
$fire2 = PixelChecksum($found_x - 22, $found_y + 16, $found_x + 6, $found_y + 22)
EndIf
EndIf
EndFunc ;==>_npc_killer

Func _PET()
Local $found_x_move, $found_y_move

$petantibug = _ImageSearchArea($petantibugIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x_move, $found_y_move, 40)
If $petantibug = 0 Then
$petmenu = _ImageSearchArea($petmenuIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
MouseClick("left", $found_x, $found_y, 1, 0)
Sleep(2000)
EndIf

If $repairpet = 1 Then
$petopen = _ImageSearchArea($petopenIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
$petrepair = _ImageSearchArea($petrepairIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petopen = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
Sleep(600)
ElseIf $petrepair = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
Sleep(600)
EndIf
EndIf

If $autolooterpet = 1 Then
$petopen = _ImageSearchArea($petopenIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petopen = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
Sleep(600)
EndIf
$petclose = _ImageSearchArea($petcloseIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
$petlootstatus = _ImageSearchArea($petlootstatusIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petclose = 1 And $petlootstatus = 0 Then
$petoption = _ImageSearchArea($petoptionIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petoption = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
Sleep(600)
$petloot = _ImageSearchArea($petlootIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petloot = 1 Then
Sleep(600)
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
EndIf
EndIf
EndIf
EndIf


If $resoursepet = 1 Then
$petopen = _ImageSearchArea($petopenIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petopen = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
Sleep(600)
EndIf
$petclose = _ImageSearchArea($petcloseIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
$petlootstatus = _ImageSearchArea($petresstatusIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petclose = 1 And $petlootstatus = 0 Then
$petoption = _ImageSearchArea($petoptionIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petoption = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
Sleep(600)
$petloot = _ImageSearchArea($petresIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $petloot = 1 Then
Sleep(600)
MouseClick("left", $found_x, $found_y, 1, 0)
MouseMove($found_x_move, $found_y_move, 0)
EndIf
EndIf
EndIf
EndIf
EndFunc ;==>_PET

Func _map_coordinates()
_map_not_found()
$mapscoordinates = _ImageSearchArea($mapcoordinatesIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $mapscoordinates = 1 Then
If $collect_palladium = 1 Then
$map_coordinates_up_x = $found_x - 116
$map_coordinates_up_y = $found_y + 105
$map_coordinates_down_x = $found_x - 25
$map_coordinates_down_y = $found_y + 139
Else
$map_coordinates_up_x = $found_x - 168
$map_coordinates_up_y = $found_y + 27
$map_coordinates_down_x = $found_x + 15
$map_coordinates_down_y = $found_y + 138
EndIf

#CS
$map_search_state_up_x = $found_x - 175
$map_search_state_up_y = $found_y
$map_search_state_down_x = $found_x
$map_search_state_down_y = $found_y + 20
#CE

EndIf
EndFunc ;==>_map_coordinates

Func _map_not_found()
$mapscoordinates = _ImageSearchArea($mapcoordinatesIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $mapscoordinates = 0 Then
$mapopen = _ImageSearchArea($mapopenIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
MouseClick("left", $found_x, $found_y, 1, 0)
Sleep(2000)
EndIf
EndFunc ;==>_map_not_found

Func _map_search()
_map_coordinates()
If $killnpc = 1 Then
$npcmap = _ImageSearchArea($npcmapIMG, 0, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 20)
If $npcmap = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
Else
$random_map_x = Random($map_coordinates_up_x, $map_coordinates_down_x, 1)
$random_map_y = Random($map_coordinates_up_y, $map_coordinates_down_y, 1)
MouseClick("left", $random_map_x, $random_map_y, 1, 0)
EndIf
Else
$random_map_x = Random($map_coordinates_up_x, $map_coordinates_down_x, 1)
$random_map_y = Random($map_coordinates_up_y, $map_coordinates_down_y, 1)
MouseClick("left", $random_map_x, $random_map_y, 1, 0)
EndIf

While True
If $collect_bonusbox = 1 Then
$helixeventbox = _ImageSearchArea($neweventboxIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$neweventbox = _ImageSearchArea($neweventboxIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
$bonusbox = _ImageSearchArea($bonusboxIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $bonusbox = 1 Or $neweventbox = 1 Or $helixeventbox = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(500)
ExitLoop
EndIf
EndIf

If $collect_cargobox = 1 Then
$cargobox = _ImageSearchArea($cargoboxIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $cargobox = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(500)
ExitLoop
EndIf
EndIf

If $green_booty = 1 Then
$g_booty = _ImageSearchArea($greenbootyIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $g_booty = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(500)
ExitLoop
EndIf
EndIf

If $collect_palladium = 1 Then
$palladium = _ImageSearchArea($palladiumIMG, 1, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 30)
If $palladium = 1 Then
MouseClick("left", $found_x, $found_y, 1, $mouse_time)
Sleep(500)
ExitLoop
EndIf
EndIf

If $killnpc = 1 Then

#CS
$npc = _ImageSearchArea($palladium_npcIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 40)
If $npc = 1 Then
_npc_killer()
ExitLoop
EndIf
#CE

$npcmap = _ImageSearchArea($npcmapIMG, 0, $map_coordinates_up_x, $map_coordinates_up_y, $map_coordinates_down_x, $map_coordinates_down_y, $found_x, $found_y, 20)
If $npcmap = 1 Then
MouseClick("left", $found_x, $found_y, 1, 0)
Sleep(500)
ExitLoop
EndIf
EndIf

;$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $map_search_state_up_x, $map_search_state_up_y, $map_search_state_down_x, $map_search_state_down_y, $found_x, $found_y, 50)
$map_search_state = _ImageSearchArea($mapsearchstateIMG, 0, $screencoordinates1_x1, $screencoordinates1_y1, $screencoordinates1_x2, $screencoordinates1_y2, $found_x, $found_y, 50)
If $map_search_state = 0 Then
ExitLoop
EndIf
WEnd
$jump = 1

EndFunc ;==>_map_search

 

 

Azıcık Kurcala

  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...