Jump to content

EVE-Online Mining Bot., Building a new one...


Recommended Posts

Dear Community,

I am working on a free multi-client mining bot for EVE Online for a month and now decided to release it... Yes, another boring mining bot for EVE!

The raw structure is now up but it needs several technical improvements and since i am programming now for say 3 month i assume the code needs some cleanup as well.

Feel free to send any comments or improvements! Hoping the bot evolves...

Steve

First Part:

Identify the WarpEntry and Wait for WarpFinish

Instructions: Start the script and initiate a warp

Identification works most of the time but not rock solid. Do you have any suggestions ?

CODE
;; -------------------------------------

;; Begin

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

Global $clientPos[2] = [0,0]

Global $w1clientPos[2] = [0,0]

Global $infowindow[2] = [940,872]

Global $loops

Global $warpEntryCycles

Global $warping1

Global $warpStatus

Global $standort

Global $undockbutton[2] = [22,766]

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

;; Begin Main

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

For $loops = 1 to 9999

WarpEntry()

;WarpWait()

Next

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

;; Begin Functions

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

Func WarpEntry() ;v.222

For $warpEntryCycles = 1 to 100

$warping1=PixelGetColor($clientPos[0]+526, $clientPos[1]+748)

If $warping1>=1910834 And $Warping1<=5263439 Then

ToolTip ( $warping1, $infowindow[0], $infowindow[1], "warp ok" )

Sleep (10)

$warpStatus=1

Else

ToolTip ( $warping1, $infowindow[0], $infowindow[1], "warp not ok" )

Sleep (10)

$warpStatus=0

EndIf

Next

EndFunc

Func WarpWait() ;v.222

$standort=PixelGetColor($clientPos[0]+$undockbutton[0], $clientPos[1]+$undockbutton[1])

If $standort < 16000000 Then ;in space

For $i = 1 to 1000

$warping1=PixelGetColor($clientPos[0]+526, $clientPos[1]+748)

If $warping1>=1910834 And $warping1<=5263439 Then

ToolTip ( $warping1, $infowindow[0], $infowindow[1], "wait warp" )

$warpStatus=1

Sleep (10)

EndIf

Next

;~ ToolTip ( $warping1, $infowindow[0], $infowindow[1], "warp finished" )

Sleep (2500)

$warpStatus=0

EndIf

EndFunc

Contact via PM or steve.wakue[at]web.de

Thank you for your interest!

Link to comment
Share on other sites

  • 7 months later...

Hey Community!

since I havent enough fun to do this alone anymore I let it free.

It is working fairly good.

EVE Online Multiclient Mining Bot [8 Clients atm]

Supporting up to 8 clients atm (design prepared for an unlimited

number of clients, but practically more than 10 at the same time

wont be needed (except you are using a 42inch panel and your

machine is doing this^^)). I ran 8 clients with stable results.

Since I started programming and scripting just a few month ago, code

wont be optimal and can be improved in several ways. If you do, be

fair enough and provide it here.

I wish a lot of fun with this.

wakuezu[at]web.de

Languages: English, Deutsch

; ---------------------------------------------------------------------------
;
; AutoIt Version:   3.3.3
; Author:           wakuezu aka steve.wakue[at]web.de
;
; Script Function:  EVE-Online Multiclient Miningbot
;   
;   
; ---------------------------------------------------------------------------
#include <GuiConstantsEx.au3>
#include <Date.au3>
#include <WindowsConstants.au3>
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("^!x", "Terminate")               ; Ctrl-Alt-X

Global $clientwidth     = 1280
Global $clientheight    = 1024
Global $i
Global $infodisplay     = 1
Global $infowindow[2]   = [940,980]
global $debug           = 1
Global $loops
Global $miningtime
Global $mousespeed      = 0
Global $paused
Global $targetingspeed  = 7
Global $menuespeed      = 12
Global $version         = "v.280"
Global $pfad            ="C:\Programme\CCP\EVE\eve.exe"
       $logFile = FileOpen("C:\Dokumente und Einstellungen\intc\Eigene Dateien\logfile.txt",1)
Global $client                                                                      ; Func clientchange(), definition of positions
Global $clientpos[2]
Global $w1clientpos[2]  = [0,0]
Global $w2clientpos[2]  = [36,29]
Global $w3clientpos[2]  = [72,58]
Global $w4clientpos[2]  = [108,87]
Global $w5clientpos[2]  = [144,116]
Global $w6clientpos[2]  = [180,145]
Global $w7clientpos[2]  = [216,174]
;~ Global $w8clientpos[2]  = [251,203]
Global $w8clientpos[2]  = [560,203]
Global $w9clientpos[2]  = [287,232]
Global $w10clientpos[2] = [323,261]
Global $w1windowstatus
Global $w2windowstatus
Global $w3windowstatus
Global $w4windowstatus
Global $w5windowstatus
Global $w6windowstatus
Global $w7windowstatus
Global $w8windowstatus
Global $w9windowstatus
Global $w10windowstatus
;; Database of Checkspots
;;
Global $itemsbutton[2] = [22,766]                                                   ; Unload
Global $undockbutton[2] = [22,766]                                                  ; Dock
Global $RightArrow                                                                  ; Undock
Global $RightArrows[2] = [565,707]

; Selected Item
Global $Func1[2] = [793,106]                                                        ; = AlignTo
Global $Func2[2] = [827,106]                                                        ; = warpTo
Global $Func3[2] = [860,106]                                                        ; = Orbit
Global $Func4[2] = [891,106]                                                        ; = HoldDistance
Global $Func6[2] = [959,106]                                                        ; = LookAt
Global $Func7[2] = [991,106]                                                        ; = ShowInfo
; Overview standard position
$selecteditemswindowstatus="closed"
If  $selecteditemswindowstatus="closed" Then Global $openovarrow[2] = [767,71]
If  $selecteditemswindowstatus="open" Then Global $openovarrow[2] = [767,145]       ; Measurementpoint, triangle in front of overview
; Overview upper right corner
;~ $selecteditemswindowstatus="closed"
;~ If   $selecteditemswindowstatus="closed" Then Global $openovarrow[2] = [783,55]
;~ If   $selecteditemswindowstatus="open" Then Global $openovarrow[2] = [783,148]       ; Measurementpoint, triangle in front of overview
Global $view                                                                        ; SelectViews
Global $view1[2] = [$openovarrow[0]+27,$openovarrow[1]+10]                          ; 810,158
Global $view2[2] = [$openovarrow[0]+27,$openovarrow[1]+26]                          ; 810,174
Global $view3[2] = [$openovarrow[0]+27,$openovarrow[1]+40]                          ; 810,188
Global $view4[2] = [$openovarrow[0]+27,$openovarrow[1]+55]                          ; 810,204
Global $view5[2] = [$openovarrow[0]+27,$openovarrow[1]+70]                          ; 810,218
Global $view6[2] = [$openovarrow[0]+27,$openovarrow[1]+85]                          ; 810,233
Global $view7[2] = [$openovarrow[0]+27,$openovarrow[1]+100]                         ; 810,248
Global $view8[2] = [$openovarrow[0]+27,$openovarrow[1]+117]                         ; 810,265
Global $view9[2] = [$openovarrow[0]+27,$openovarrow[1]+131]                         ; 810,279
Global $tab
Global $Tab1[2] = [$openovarrow[0]+10,$openovarrow[1]+17]                           ; = [793,165] ; Tabs
Global $Tab2[2] = [$openovarrow[0]+44,$openovarrow[1]+17]                           ; = [827,165]
Global $Tab3[2] = [$openovarrow[0]+77,$openovarrow[1]+17]                           ; = [860,165]
Global $Tab4[2] = [$openovarrow[0]+108,$openovarrow[1]+17]                          ; = [891,165]

Global $viereck[2] = [$openovarrow[0]+9,$openovarrow[1]+52]                         ; = [792,200]                                                       ; standort
Global $viereck2[2] = [$openovarrow[0]+10,$openovarrow[1]+52]                       ; = [793,200]                                                       ; standort

Global $target                                                                      ; warpbeltov
Global $target1[2]  = [$openovarrow[0]+44,$openovarrow[1]+58]                       ; closed 827,113 ; open XP 827,206 ; = Vista [827,200]
Global $target2[2] = [$openovarrow[0]+44,$openovarrow[1]+58+1*19]
Global $target3[2] = [$openovarrow[0]+44,$openovarrow[1]+58+2*19]
Global $target4[2] = [$openovarrow[0]+44,$openovarrow[1]+58+3*19]
Global $target5[2] = [$openovarrow[0]+44,$openovarrow[1]+58+4*19]
Global $target6[2] = [$openovarrow[0]+44,$openovarrow[1]+58+5*19]
Global $target7[2] = [$openovarrow[0]+44,$openovarrow[1]+58+6*19]
Global $target8[2] = [$openovarrow[0]+44,$openovarrow[1]+58+7*19]
Global $target9[2] = [$openovarrow[0]+44,$openovarrow[1]+58+8*19]
Global $target10[2] = [$openovarrow[0]+44,$openovarrow[1]+58+9*19]
Global $target11[2] = [$openovarrow[0]+44,$openovarrow[1]+58+10*19]
Global $target12[2] = [$openovarrow[0]+44,$openovarrow[1]+58+11*19]
Global $target13[2] = [$openovarrow[0]+44,$openovarrow[1]+58+12*19]
Global $target14[2] = [$openovarrow[0]+44,$openovarrow[1]+58+13*19]
Global $target15[2] = [$openovarrow[0]+44,$openovarrow[1]+58+14*19]
Global $target16[2] = [$openovarrow[0]+44,$openovarrow[1]+58+15*19]
Global $target17[2] = [$openovarrow[0]+44,$openovarrow[1]+58+16*19]
Global $target18[2] = [$openovarrow[0]+44,$openovarrow[1]+58+17*19]
Global $target19[2] = [$openovarrow[0]+44,$openovarrow[1]+58+18*19]
Global $target20[2] = [$openovarrow[0]+44,$openovarrow[1]+58+19*19]
Global $target21[2] = [$openovarrow[0]+44,$openovarrow[1]+58+20*19]
Global $target22[2] = [$openovarrow[0]+44,$openovarrow[1]+58+21*19]

Global $targetlocked
Global $targetloc1[2] = [$openovarrow[0]+77,$openovarrow[1]+58]                     ; = XP [860,206] ; = Vista [860,200]
Global $targetloc2[2] = [$openovarrow[0]+77,$openovarrow[1]+58+1*19]
Global $targetloc3[2] = [$openovarrow[0]+77,$openovarrow[1]+58+2*19]
Global $targetloc4[2] = [$openovarrow[0]+77,$openovarrow[1]+58+3*19]
Global $targetloc5[2] = [$openovarrow[0]+77,$openovarrow[1]+58+4*19]
Global $targetloc6[2] = [$openovarrow[0]+77,$openovarrow[1]+58+5*19]

; createbookmarks(), updatebookmarks()
Global $w1bm_active
Global $w2bm_active
Global $w3bm_active
Global $w4bm_active
Global $w5bm_active
Global $w6bm_active
Global $w7bm_active
Global $w8bm_active
Global $w9bm_active
Global $w10bm_active

Global $firstic                                                                     ; Checkfirstic
Global $pruefquadrantic1[4] = [$openovarrow[0]+1,$openovarrow[1]+52,$openovarrow[0]+9,$openovarrow[1]+60]           ; [784,200,792,208]
Global $pruefquadrantdist1[4] = [$openovarrow[0]+27,$openovarrow[1]+52,$openovarrow[0]+31,$openovarrow[1]+56]           ; [810,200,813,203]
Global $firstsymbol
Global $dreieck[10]         = [3367389035,3161483080,2673362795,1879010428,1933242,3509340023,718563357,1833533583]
Global $viereck1[10]        = [1836200654,169892293,3888215909]
Global $lockedtarget[20]    = [2367949054,2176074382,1836335758,2820344062,1836335758,3934809710,3934809710,3734586238,1539075934,905910120]
Global $blackbackground[20] = [15925249,2185837518,976447838,4128718017,2919328337,1044123441]
Global $sentrygun5[10]      = [896280810]
Global $stargate[10]        = [163667615,1862548859,914192388,2467904960,1868652419,2842720515]
Global $ratsssx[10]         = [2939230533,3709614674,4085076860]

Global $bookmark                                                                    ; Bookmarks     
Global $bookmark1[2] = [120,184] ; Measurementpoint, FirstBookmark (=station)
Global $bookmark2[2] = [$bookmark1[0],$bookmark1[1]+1*19]                           ; 120,203
Global $bookmark3[2] = [$bookmark1[0],$bookmark1[1]+2*19]                           ; 120,222
Global $bookmark4[2] = [$bookmark1[0],$bookmark1[1]+3*19]                           ; 120,241
Global $bookmark5[2] = [$bookmark1[0],$bookmark1[1]+4*19]                           ; 120,260
Global $bookmark6[2] = [$bookmark1[0],$bookmark1[1]+5*19]                           ; 120,279
Global $bookmark7[2] = [$bookmark1[0],$bookmark1[1]+6*19]                           ; 120,298
Global $bookmark8[2] = [$bookmark1[0],$bookmark1[1]+7*19]                           ; 120,317
Global $bookmark9[2] = [$bookmark1[0],$bookmark1[1]+8*19]                           ; 120,336
Global $bookmark10[2] = [$bookmark1[0],$bookmark1[1]+9*19]                          ; 120,355
Global $bookmark11[2] = [$bookmark1[0],$bookmark1[1]+10*19]                         ; 120,374
Global $bookmark12[2] = [$bookmark1[0],$bookmark1[1]+11*19]                         ; 120,392
Global $bookmark13[2] = [$bookmark1[0],$bookmark1[1]+12*19]                         ; 120,411
Global $bookmark14[2] = [$bookmark1[0],$bookmark1[1]+13*19]                         ; 120,430
Global $bookmark15[2] = [$bookmark1[0],$bookmark1[1]+14*19]                         ; 120,449
Global $bookmark16[2] = [$bookmark1[0],$bookmark1[1]+15*19]                         ; 120,449
Global $bookmark17[2] = [$bookmark1[0],$bookmark1[1]+16*19]                         ; 120,449
Global $bookmark18[2] = [$bookmark1[0],$bookmark1[1]+17*19]                         ; 120,449
Global $bookmark19[2] = [$bookmark1[0],$bookmark1[1]+18*19]                         ; 120,449
Global $bookmark20[2] = [$bookmark1[0],$bookmark1[1]+19*19]                         ; 120,449
Global $bookmark21[2] = [$bookmark1[0],$bookmark1[1]+20*19]                         ; 120,449
Global $bookmark22[2] = [$bookmark1[0],$bookmark1[1]+21*19]                         ; 120,449

Global $bmwindow[2] = [480,502] ; 16777215 = white                                  ; createbookmarks() / updatebookmarks()
Global $bmwindowverify[2] = [372,306] ; 16054516

Global $warnmeldung1                                                                ; Check warnmeldung
Global $warnmeldung2

Global $targetsymb1                                                                 ; Locktarget
Global $targetsymb2
Global $targetsymb3
Global $targetsymb4
Global $targetsymb5
Global $targetsymb6
; ov standard position
Global $targetsymbol1[2] = [$openovarrow[0]-109,$openovarrow[1]+25] ; [658,96]
Global $targetsymbol2[2] = [$openovarrow[0]-206,$openovarrow[1]+25] ; [561,96]
Global $targetsymbol3[2] = [$openovarrow[0]-305,$openovarrow[1]+25] ; [462,96]
Global $targetsymbol4[2] = [$openovarrow[0]-404,$openovarrow[1]+25] ; [363,96]
Global $targetsymbol5[2] = [$openovarrow[0]-501,$openovarrow[1]+25] ; [266,96]
Global $targetsymbol6[2] = [$openovarrow[0]-599,$openovarrow[1]+25] ; [168,96]
; ov upper right corner
;~ Global $targetsymbol1[2] = [$openovarrow[0]-109,$openovarrow[1]+25] ; [674,80]
;~ Global $targetsymbol2[2] = [$openovarrow[0]-206,$openovarrow[1]+25] ; [577,80]
;~ Global $targetsymbol3[2] = [$openovarrow[0]-305,$openovarrow[1]+25] ; [478,80]
;~ Global $targetsymbol4[2] = [$openovarrow[0]-404,$openovarrow[1]+25] ; [379,80]
;~ Global $targetsymbol5[2] = [$openovarrow[0]-501,$openovarrow[1]+25] ; [279,80]
;~ Global $targetsymbol6[2] = [$openovarrow[0]-599,$openovarrow[1]+25] ; [184,80]

Global $highslot1[2] = [615,677]                                                    ; activateHS
Global $highslot2[2] = [666,677]
Global $highslot3[2] = [717,677]
Global $hsinactive; = 0

Global $shieldstatus                                                                ; underfire
Global $underfire5
Global $underfire8
Global $underfire9
Global $underfire50[2] = [515,630]
Global $underfire80[2] = [580,686] ;12763842
Global $underfire95[2] = [579,679]
Global $medslot1[2] = [640,721]
Global $medslot2[2] = [691,721]
Global $medslot3[2] = [742,721]

Global $total   = 0                                                                 ; Checkcargohold
Global $w1volumen   = 0 
Global $w2volumen   = 0 
Global $w3volumen   = 0
Global $w4volumen   = 0
Global $w5volumen   = 0
Global $w6volumen   = 0
Global $w7volumen   = 0
Global $w8volumen   = 0
Global $w9volumen   = 0
Global $w10volumen  = 0
;Global $cargofield[4] = [44,673,289,685]
;~ Global $MyCargo00[2] = [ 46,674] ; = empty
;~ Global $MyCargo10[2] = [ 69,673] ; = 1000 m3
;~ Global $MyCargo20[2] = [ 92,673] ; = 2000 m3
;~ Global $MyCargo30[2] = [115,673] ; = 3000 m3
;~ Global $MyCargo40[2] = [138,673] ; = 4000 m3
;~ Global $MyCargo50[2] = [166,673] ; = 5000 m3
;~ Global $MyCargo60[2] = [188,673] ; = 6000 m3
;~ Global $MyCargo70[2] = [230,673] ; = 7000 m3
;~ Global $MyCargo75[2] = [241,674] ; = 7500 m3
;~ Global $MyCargo80[2] = [252,673] ; = 8000 m3
;~ Global $MyCargo85[2] = [263,673] ; = 8500 m3
;~ Global $MyCargo90[2] = [274,673] ; = 9000 m3
;~ Global $MyCargo95[2] = [280,673] ; = 9500 m3
;~ Global $MyCargo99[2] = [283,673] ; = full
Global $cargohold

Global $action                              ; Logfile

;; error correction
;~ Global $f11erroroccured = 0

;;
;; Database of PixelColors
;;
$black = 0x000000
$grey  = 0xC0C0C0
$white = 0xFFFFFF
$menucolor = 0xA0A0A0

$openovarrowcolor = 13684944
$hsinactivecolor = 0x1C1C1C ;0x1B1B1B ;Intel  
$msinactivecolor = 0x1C1C1C ;0x1B1B1B ;Intel  
;~ $hsinactivecolor = 0x1B1B1B ; AMD
;~ $msinactivecolor = 0x1B1B1B ; AMD 


;; Begin 
;; -------------------------------------
LogWrite("start")
;; w1 Miningbot
;; -------------------------------------
Global $w1bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w1bookmark                              ; Start
Global $w1targettotal                           ; total number of rows in overview 
Global $w1target                                ; Start
Global $w1startbelt
$w1bookmarkmin = 14
$w1targetavoid=0
Global $w1selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w1selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w1approachtime=0                               ; Funktion mit target ausführen
$w1orbit=0
$w1targetsunlock=0

$w1view=2
$w1status=99                                    ; status unknown at the beginning (99) don´t change!!!
;; w2 Miningbot
;; -------------------------------------
Global $w2bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w2bookmark                              ; Start
Global $w2targettotal                           ; total number of rows in overview 
Global $w2target                                ; Start
Global $w2startbelt
$w2bookmarkmin = 16
$w2targetavoid=0
Global $w2selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w2selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w2approachtime=0                               ; Funktion mit target ausführen
$w2Orbit=0
$w2targetsunlock=0

$w2view=2
$w2status=99                                    ; status unknown at the beginning (99) don´t change!!!
;; w3 Miningbot
;; -------------------------------------
Global $w3bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w3bookmark                              ; Start
Global $w3targettotal                           ; total number of rows in overview 
Global $w3target                                ; Start
Global $w3startbelt
$w3bookmarkmin = 16
$w3targetavoid=0
Global $w3selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w3selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w3approachtime=0                               ; Funktion mit target ausführen
$w3Orbit=0
$w3targetsunlock=0

$w3view=2
$w3status=99                                    ; status unknown at the beginning (99) don´t change!!!
;; w4 Miningbot
;; -------------------------------------
Global $w4bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w4bookmark                              ; Start
Global $w4targettotal                           ; total number of rows in overview 
Global $w4target                                ; Start
Global $w4startbelt
$w4bookmarkmin = 18
$w4targetavoid=0
Global $w4selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w4selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w4approachtime=0                               ; Funktion mit target ausführen
$w4Orbit=0
$w4targetsunlock=0

$w4view=2
$w4status=99                                    ; status unknown at the beginning (99) don´t change!!!
;; w5 Miningbot
;; -------------------------------------
Global $w5bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w5bookmark                              ; Start
Global $w5targettotal                           ; total number of rows in overview 
Global $w5target                                ; Start
Global $w5startbelt
$w5bookmarkmin = 15
$w5targetavoid=0
Global $w5selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w5selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w5approachtime=0                               ; Funktion mit target ausführen
$w5Orbit=0
$w5targetsunlock=0

$w5view=2
$w5status=99                                    ; status unknown at the beginning (99) don´t change!!!
;; w6 Miningbot
;; -------------------------------------
Global $w6bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w6bookmark                              ; Start
Global $w6targettotal                           ; total number of rows in overview 
Global $w6target                                ; Start
Global $w6startbelt
$w6bookmarkmin = 12
$w6targetavoid=0
Global $w6selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w6selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w6approachtime=0                               ; Funktion mit target ausführen
$w6Orbit=0
$w6targetsunlock=0

$w6view=2
$w6status=99                                    ; status unknown at the beginning (99) don´t change!!!
;; w7 Miningbot
;; -------------------------------------
Global $w7bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w7bookmark                              ; Start
Global $w7targettotal                           ; total number of rows in overview 
Global $w7target                                ; Start
Global $w7startbelt                             ; Startbelt for overview mode
$w7bookmarkmin = 14
$w7targetavoid=0
Global $w7selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w7selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w7approachtime=0                               ; Funktion mit target ausführen
$w7Orbit=0
$w7targetsunlock=0

$w7view=2
$w7status=99                                    ; status unknown at the beginning (99) don´t change!!!
;; w8 Miningbot
;; -------------------------------------
Global $w8bookmarktotal                         ; total number of bookmarks to be used (starting from top)
Global $w8bookmark                              ; Start
Global $w8targettotal                           ; total number of rows in overview 
Global $w8target                                ; Start
Global $w8startbelt                             ; Startbelt for overview mode
$w8bookmarkmin = 8
$w8targetavoid=0
Global $w8selectmethod                          ; Wo soll ausgewählt werden    ; 1=bookmarks   2=overview
$w8selectstyle=1                                ; Wie soll ausgewählt werden   ; 1=aufsteigend 2=random

$w8approachtime=0                               ; Funktion mit target ausführen
$w8Orbit=0
$w8targetsunlock=0

$w8view=2
$w8status=99                                    ; status unknown at the beginning (99) don´t change!!!

;; w9-10 Miningbot
;; -------------------------------------




$w9status=99                                    ; status unknown at the beginning (99) don´t change!!!
$w10status=99                                   ; status unknown at the beginning (99) don´t change!!!


;; Begin Main
For $loops = 1 to 9999
;~      fixoverviewerror()
;~      clientcheckalive()
;~      $target=1
;~      createbookmarks()
;~      countbelts()
;~      countbookmarks()
;~      checkcargohold()
;~      underfire()
        w1modul()
        w2modul()
        w3modul()
        w4modul()
        w5modul()
        w6modul()
        w7modul()
        w8modul()
;~      waitdt()
;~      clientintegrity()
;~      miningtime()
Next
;; moduls
Func w1modul()                  ; v.276
    $client=1
    clientchange()      
    If $w1status=98 Then                            ;w1 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w1status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w1status=99 Then                            ;w1 status Unknown  --> check position
        checktime()
        If $w1status<>98 Then
            checkwarnmeldung()          
            ;Prüfe Undockbutton
            $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w1standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w1standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w1status=10                ; = Unloading
            EndIf
            If $w1standort < 16000000 Then  ; = in space
                FixOverviewError()  
                fixlocalwindow()
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w1standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w1view=2 Then SelectViews(1)
    ;~          If $w1view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w1station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w1station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w1station=0xFFFFFF or $w1station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w1status=2         ; = warpToBelt
                    Else
                        $w1status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;;If $debug=1 Then logwrite("debug")
    If $w1status=9 Then                             ;w1 docking
        dockstation()
    EndIf       
    If $w1status=10 Then                            ;w1 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;;If $debug=1 Then logwrite("debug")    
    If $w1status=12 Then                            ;w1 undock
        undock()
    EndIf
    If $w1status=2 Then                             ;w1 warptobelt
        countbookmarks()
        If $w1bookmarktotal>=$w1bookmarkmin Then 
            $w1selectmethod=1
        Else
            $w1selectmethod=2
            $w1startbelt=$w1bookmarktotal
        EndIf
        If $w1selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w1selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w1bm minimum   ; " & $w1bookmarkmin )
        If $debug=1 Then logwrite("w1countedbm    ; " & $w1bookmarktotal )
        If $debug=1 Then logwrite("w1selectmethod ; " & $w1selectmethod )
        If $debug=1 Then logwrite("w1countedbelts ; " & $w1targettotal )
        If $debug=1 Then logwrite("w1startbelt    ; " & $w1startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w1status=4 Then                             ;w1 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w1approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w1view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w1view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w1status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w1status=5 Then                             ;w1 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w1station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w1station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w1station=0xFFFFFF or $w1station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w1status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w1status=5 Then
            If $w1targetsunlock=1 Then              ;w1 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w1selectmethod=2 And $w1bm_active=1 And $w1bookmarktotal<$w1bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w1selectmethod=1 And $w1bm_active=1 And $targetlocked=0 Then 
                If $w1station<>0xFFFFFF or $w1station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w1status=2 Then
;~                  $w1selectstyle=3
                    warpbeltbm()
                Else 
                    If $w1orbit=1 Then actwithtarget(5)         ; orbit rock
                    If $hsinactive>0 Then actwithtarget(2)      ; approach rock         
                    If $hsinactive=0 And $w1orbit<>1 Then actwithtarget(800)    ; stop ship
                    $w1status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w1status=8 Then                             ;w1 warptostation
;~          w1warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w1stationBM=1
        ;Prüfe Undockbutton
        $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w1standort < 16000000 Then  ; in space  
            If $w1stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w1stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;;If $debug=1 Then logwrite("debug")    
EndFunc
Func w2modul()                  ; v.273
    $client=2
    clientchange()      
    If $w2status=98 Then                            ;w2 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w2status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w2status=99 Then                            ;w2 status Unknown  --> check position
        checktime()
        If $w2status<>98 Then
            checkwarnmeldung()          
            fixlocalwindow()
            ;Prüfe Undockbutton
            $w2standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w2standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w2standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w2status=10                ; = Unloading
            EndIf
            If $w2standort < 16000000 Then  ; = in space
                FixOverviewError()  
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w2standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w2view=2 Then SelectViews(1)
    ;~          If $w2view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w2station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w2station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w2station=0xFFFFFF or $w2station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w2status=2         ; = warpToBelt
                    Else
                        $w2status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;;If $debug=1 Then logwrite("debug")
    If $w2status=9 Then                             ;w2 docking
        dockstation()
    EndIf       
    If $w2status=10 Then                            ;w2 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;;If $debug=1 Then logwrite("debug")
    If $w2status=12 Then                            ;w2 undock
        undock()
    EndIf
    If $w2status=2 Then                             ;w2 warptobelt
        countbookmarks()
        If $w2bookmarktotal>=$w2bookmarkmin Then 
            $w2selectmethod=1
        Else
            $w2selectmethod=2
            $w2startbelt=$w2bookmarktotal
        EndIf
        If $w2selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w2selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w2bm minimum   ; " & $w2bookmarkmin )
        If $debug=1 Then logwrite("w2countedbm    ; " & $w2bookmarktotal )
        If $debug=1 Then logwrite("w2selectmethod ; " & $w2selectmethod )
        If $debug=1 Then logwrite("w2countedbelts ; " & $w2targettotal )
        If $debug=1 Then logwrite("w2startbelt    ; " & $w2startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w2status=4 Then                             ;w2 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w2approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w2view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w2view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w2status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w2status=5 Then                             ;w2 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w2station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w2station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w2station=0xFFFFFF or $w2station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w2status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w2status=5 Then
            If $w2targetsunlock=1 Then              ;w2 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w2selectmethod=2 And $w2bm_active=1 And $w2bookmarktotal<$w2bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w2selectmethod=1 And $w2bm_active=1 And $targetlocked=0 Then 
                If $w2station<>0xFFFFFF or $w2station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w2status=2 Then
;~                  $w2selectstyle=3
                    warpbeltbm()
                Else 
                    If $w2orbit=1 Then actwithtarget(5)     ;orbit rock
                    If $hsinactive>0 Then actwithtarget(2)  ;approach rock              
                    If $hsinactive=0 And $w2orbit<>1 Then actwithtarget(800)    ; stop ship
                    $w2status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w2status=8 Then                             ;w2 warptostation
;~          w2warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w2stationBM=1
        ;Prüfe Undockbutton
        $w2standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w2standort < 16000000 Then  ; in space  
            If $w2stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w2stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;;If $debug=1 Then logwrite("debug")
EndFunc
Func w3modul()                  ; v.273
    $client=3
    clientchange()      
    If $w3status=98 Then                            ;w3 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w3status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w3status=99 Then                            ;w3 status Unknown  --> check position
        checktime()
        If $w3status<>98 Then
            checkwarnmeldung()          
            fixlocalwindow()
            ;Prüfe Undockbutton
            $w3standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w3standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w3standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w3status=10                ; = Unloading
            EndIf
            If $w3standort < 16000000 Then  ; = in space
                FixOverviewError()  
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w3standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w3view=2 Then SelectViews(1)
    ;~          If $w3view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w3station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w3station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w3station=0xFFFFFF or $w3station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w3status=2         ; = warpToBelt
                    Else
                        $w3status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;;If $debug=1 Then logwrite("debug")
    If $w3status=9 Then                             ;w3 docking
        dockstation()
    EndIf       
    If $w3status=10 Then                            ;w3 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;;If $debug=1 Then logwrite("debug")
    If $w3status=12 Then                            ;w3 undock
        undock()
    EndIf
    If $w3status=2 Then                             ;w3 warptobelt
        countbookmarks()
        If $w3bookmarktotal>=$w3bookmarkmin Then 
            $w3selectmethod=1
        Else
            $w3selectmethod=2
            $w3startbelt=$w3bookmarktotal
        EndIf
        If $w3selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w3selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w3bm minimum   ; " & $w3bookmarkmin )
        If $debug=1 Then logwrite("w3countedbm    ; " & $w3bookmarktotal )
        If $debug=1 Then logwrite("w3selectmethod ; " & $w3selectmethod )
        If $debug=1 Then logwrite("w3countedbelts ; " & $w3targettotal )
        If $debug=1 Then logwrite("w3startbelt    ; " & $w3startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w3status=4 Then                             ;w3 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w3approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w3view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w3view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w3status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w3status=5 Then                             ;w3 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w3station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w3station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w3station=0xFFFFFF or $w3station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w3status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w3status=5 Then
            If $w3targetsunlock=1 Then              ;w3 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w3selectmethod=2 And $w3bm_active=1 And $w3bookmarktotal<$w3bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w3selectmethod=1 And $w3bm_active=1 And $targetlocked=0 Then 
                If $w3station<>0xFFFFFF or $w3station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w3status=2 Then
;~                  $w3selectstyle=3
                    warpbeltbm()
                Else 
                    If $w3orbit=1 Then actwithtarget(5)     ;orbit rock
                    If $hsinactive>0 Then actwithtarget(2)  ;approach rock              
                    If $hsinactive=0 And $w3orbit<>1 Then actwithtarget(800); stop ship
                    $w3status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w3status=8 Then                             ;w3 warptostation
;~          w3warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w3stationBM=1
        ;Prüfe Undockbutton
        $w3standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w3standort < 16000000 Then  ; in space  
            If $w3stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w3stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;;If $debug=1 Then logwrite("debug")
EndFunc
Func w4modul()                  ; v.273
    $client=4
    clientchange()      
    If $w4status=98 Then                            ;w4 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w4status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w4status=99 Then                            ;w4 status Unknown  --> check position
        checktime()
        If $w4status<>98 Then
            checkwarnmeldung()          
            fixlocalwindow()
            ;Prüfe Undockbutton
            $w4standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w4standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w4standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w4status=10                ; = Unloading
            EndIf
            If $w4standort < 16000000 Then  ; = in space
                FixOverviewError()  
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w4standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w4view=2 Then SelectViews(1)
    ;~          If $w4view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w4station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w4station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w4station=0xFFFFFF or $w4station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w4status=2         ; = warpToBelt
                    Else
                        $w4status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;;If $debug=1 Then logwrite("debug")
    If $w4status=9 Then                             ;w4 docking
        dockstation()
    EndIf       
    If $w4status=10 Then                            ;w4 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;;If $debug=1 Then logwrite("debug")
    If $w4status=12 Then                            ;w4 undock
        undock()
    EndIf
    If $w4status=2 Then                             ;w4 warptobelt
        countbookmarks()
        If $w4bookmarktotal>=$w4bookmarkmin Then 
            $w4selectmethod=1
        Else
            $w4selectmethod=2
            $w4startbelt=$w4bookmarktotal
        EndIf
        If $w4selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w4selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w4bm minimum   ; " & $w4bookmarkmin )
        If $debug=1 Then logwrite("w4countedbm    ; " & $w4bookmarktotal )
        If $debug=1 Then logwrite("w4selectmethod ; " & $w4selectmethod )
        If $debug=1 Then logwrite("w4countedbelts ; " & $w4targettotal )
        If $debug=1 Then logwrite("w4startbelt    ; " & $w4startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w4status=4 Then                             ;w4 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w4approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w4view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w4view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w4status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w4status=5 Then                             ;w4 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w4station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w4station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w4station=0xFFFFFF or $w4station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w4status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w4status=5 Then
            If $w4targetsunlock=1 Then              ;w4 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w4selectmethod=2 And $w4bm_active=1 And $w4bookmarktotal<$w4bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w4selectmethod=1 And $w4bm_active=1 And $targetlocked=0 Then 
                If $w4station<>0xFFFFFF or $w4station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w4status=2 Then
;~                  $w4selectstyle=3
                    warpbeltbm()
                Else 
                    If $w4orbit=1 Then actwithtarget(5)     ;orbit rock
                    If $hsinactive>0 Then actwithtarget(2)  ;approach rock              
                    If $hsinactive=0 And $w4orbit<>1 Then actwithtarget(800)    ; stop ship
                    $w4status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w4status=8 Then                             ;w4 warptostation
;~          w4warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w4stationBM=1
        ;Prüfe Undockbutton
        $w4standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w4standort < 16000000 Then  ; in space  
            If $w4stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w4stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;;If $debug=1 Then logwrite("debug")
EndFunc
Func w5modul()                  ; v.273
    $client=5
    clientchange()      
    If $w5status=98 Then                            ;w5 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w5status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w5status=99 Then                            ;w5 status Unknown  --> check position
        checktime()
        If $w5status<>98 Then
            checkwarnmeldung()          
            fixlocalwindow()
            ;Prüfe Undockbutton
            $w5standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w5standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w5standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w5status=10                ; = Unloading
            EndIf
            If $w5standort < 16000000 Then  ; = in space
                FixOverviewError()  
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w5standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w5view=2 Then SelectViews(1)
    ;~          If $w5view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w5station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w5station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w5station=0xFFFFFF or $w5station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w5status=2         ; = warpToBelt
                    Else
                        $w5status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w5status=9 Then                             ;w5 docking
        dockstation()
    EndIf       
    If $w5status=10 Then                            ;w5 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w5status=12 Then                            ;w5 undock
        undock()
    EndIf
    If $w5status=2 Then                             ;w5 warptobelt
        countbookmarks()
        If $w5bookmarktotal>=$w5bookmarkmin Then 
            $w5selectmethod=1
        Else
            $w5selectmethod=2
            $w5startbelt=$w5bookmarktotal
        EndIf
        If $w5selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w5selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w5bm minimum   ; " & $w5bookmarkmin )
        If $debug=1 Then logwrite("w5countedbm    ; " & $w5bookmarktotal )
        If $debug=1 Then logwrite("w5selectmethod ; " & $w5selectmethod )
        If $debug=1 Then logwrite("w5countedbelts ; " & $w5targettotal )
        If $debug=1 Then logwrite("w5startbelt    ; " & $w5startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w5status=4 Then                             ;w5 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w5approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w5view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w5view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w5status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w5status=5 Then                             ;w5 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w5station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w5station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w5station=0xFFFFFF or $w5station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w5status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w5status=5 Then
            If $w5targetsunlock=1 Then              ;w5 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w5selectmethod=2 And $w5bm_active=1 And $w5bookmarktotal<$w5bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w5selectmethod=1 And $w5bm_active=1 And $targetlocked=0 Then 
                If $w5station<>0xFFFFFF or $w5station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w5status=2 Then
;~                  $w5selectstyle=3
                    warpbeltbm()
                Else 
                    If $w5orbit=1 Then actwithtarget(5)     ;orbit rock
                    If $hsinactive>0 Then actwithtarget(2)  ;approach rock              
                    If $hsinactive=0 And $w5orbit<>1 Then actwithtarget(800)    ; stop ship
                    $w5status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w5status=8 Then                             ;w5 warptostation
;~          w5warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w5stationBM=1
        ;Prüfe Undockbutton
        $w5standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w5standort < 16000000 Then  ; in space  
            If $w5stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w5stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;If $debug=1 Then logwrite("debug")
EndFunc
Func w6modul()                  ; v.273
    $client=6
    clientchange()      
    If $w6status=98 Then                            ;w6 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w6status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w6status=99 Then                            ;w6 status Unknown  --> check position
        checktime()
        If $w6status<>98 Then
            checkwarnmeldung()          
            fixlocalwindow()
            ;Prüfe Undockbutton
            $w6standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w6standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w6standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w6status=10                ; = Unloading
            EndIf
            If $w6standort < 16000000 Then  ; = in space
                FixOverviewError()  
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w6standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w6view=2 Then SelectViews(1)
    ;~          If $w6view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w6station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w6station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w6station=0xFFFFFF or $w6station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w6status=2         ; = warpToBelt
                    Else
                        $w6status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w6status=9 Then                             ;w6 docking
        dockstation()
    EndIf       
    If $w6status=10 Then                            ;w6 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w6status=12 Then                            ;w6 undock
        undock()
    EndIf
    If $w6status=2 Then                             ;w6 warptobelt
        countbookmarks()
        If $w6bookmarktotal>=$w6bookmarkmin Then 
            $w6selectmethod=1
        Else
            $w6selectmethod=2
            $w6startbelt=$w6bookmarktotal
        EndIf
        If $w6selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w6selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w6bm minimum   ; " & $w6bookmarkmin )
        If $debug=1 Then logwrite("w6countedbm    ; " & $w6bookmarktotal )
        If $debug=1 Then logwrite("w6selectmethod ; " & $w6selectmethod )
        If $debug=1 Then logwrite("w6countedbelts ; " & $w6targettotal )
        If $debug=1 Then logwrite("w6startbelt    ; " & $w6startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w6status=4 Then                             ;w6 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w6approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w6view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w6view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w6status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w6status=5 Then                             ;w6 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w6station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w6station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w6station=0xFFFFFF or $w6station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w6status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w6status=5 Then
            If $w6targetsunlock=1 Then              ;w6 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w6selectmethod=2 And $w6bm_active=1 And $w6bookmarktotal<$w6bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w6selectmethod=1 And $w6bm_active=1 And $targetlocked=0 Then 
                If $w6station<>0xFFFFFF or $w6station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w6status=2 Then
;~                  $w6selectstyle=3
                    warpbeltbm()
                Else 
                    If $w6orbit=1 Then actwithtarget(5)     ;orbit rock
                    If $hsinactive>0 Then actwithtarget(2)  ;approach rock              
                    If $hsinactive=0 And $w6orbit<>1 Then actwithtarget(800)    ; stop ship
                    $w6status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w6status=8 Then                             ;w6 warptostation
;~          w6warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w6stationBM=1
        ;Prüfe Undockbutton
        $w6standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w6standort < 16000000 Then  ; in space  
            If $w6stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w6stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;If $debug=1 Then logwrite("debug")
EndFunc
Func w7modul()                  ; v.273
    $client=7
    clientchange()      
    If $w7status=98 Then                            ;w7 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w7status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w7status=99 Then                            ;w7 status Unknown  --> check position
        checktime()
        If $w7status<>98 Then
            checkwarnmeldung()          
            fixlocalwindow()
            ;Prüfe Undockbutton
            $w7standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w7standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w7standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w7status=10                ; = Unloading
            EndIf
            If $w7standort < 16000000 Then  ; = in space
                FixOverviewError()  
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w7standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w7view=2 Then SelectViews(1)
    ;~          If $w7view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w7station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w7station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w7station=0xFFFFFF or $w7station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w7status=2         ; = warpToBelt
                    Else
                        $w7status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w7status=9 Then                             ;w7 docking
        dockstation()
    EndIf       
    If $w7status=10 Then                            ;w7 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w7status=12 Then                            ;w7 undock
        undock()
    EndIf
    If $w7status=2 Then                             ;w7 warptobelt
        countbookmarks()
        If $w7bookmarktotal>=$w7bookmarkmin Then 
            $w7selectmethod=1
        Else
            $w7selectmethod=2
            $w7startbelt=$w7bookmarktotal
        EndIf
        If $w7selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w7selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w7bm minimum   ; " & $w7bookmarkmin )
        If $debug=1 Then logwrite("w7countedbm    ; " & $w7bookmarktotal )
        If $debug=1 Then logwrite("w7selectmethod ; " & $w7selectmethod )
        If $debug=1 Then logwrite("w7countedbelts ; " & $w7targettotal )
        If $debug=1 Then logwrite("w7startbelt    ; " & $w7startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w7status=4 Then                             ;w7 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w7approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w7view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w7view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w7status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w7status=5 Then                             ;w7 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w7station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w7station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w7station=0xFFFFFF or $w7station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w7status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w7status=5 Then
            If $w7targetsunlock=1 Then              ;w7 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w7selectmethod=2 And $w7bm_active=1 And $w7bookmarktotal<$w7bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w7selectmethod=1 And $w7bm_active=1 And $targetlocked=0 Then 
                If $w7station<>0xFFFFFF or $w7station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w7status=2 Then
;~                  $w7selectstyle=3
                    warpbeltbm()
                Else 
                    If $hsinactive>0 Then actwithtarget(2)  ;approach rock              
                    If $w7orbit=1 Then actwithtarget(5)     ;orbit rock
                    If $hsinactive=0 And $w7orbit<>1 Then actwithtarget(800)    ; stop ship
                    $w7status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w7status=8 Then                             ;w7 warptostation
;~          w7warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w7stationBM=1
        ;Prüfe Undockbutton
        $w7standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w7standort < 16000000 Then  ; in space  
            If $w7stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w7stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;If $debug=1 Then logwrite("debug")
EndFunc
Func w8modul()                  ; v.273
    $client=8
    clientchange()      
    If $w8status=98 Then                            ;w8 status Inactive during downtime
        If $infodisplay=1 Then ToolTip (  $w8status, $infowindow[0], $infowindow[1], "inactive (dt)"  )
        Sleep (1000)        
        If $debug=1 Then logwrite("inactive (dt)  ;")
    EndIf
    If $w8status=99 Then                            ;w8 status Unknown  --> check position
        checktime()
        If $w8status<>98 Then
            checkwarnmeldung()          
            fixlocalwindow()
            ;Prüfe Undockbutton
            $w8standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
            If $w8standort > 16000000 Then  ; = in station
                If $infodisplay=1 Then ToolTip ( $w8standort, $infowindow[0], $infowindow[1], "ids"  )
    ;~          Sleep (100)
                $w8status=10                ; = Unloading
            EndIf
            If $w8standort < 16000000 Then  ; = in space
                FixOverviewError()  
                warpWait()
                If $infodisplay=1 Then ToolTip ( $w8standort, $infowindow[0], $infowindow[1], "checkin'"  )
                SelectTab(1)
                ; sort of ore ----------------------
    ;~          If $w8view=2 Then SelectViews(1)
    ;~          If $w8view=2 Then SelectViews(2)
                ; ----------------------------------
                For $i = 1 To 6             ; = Schaue nach dem viereck (station)
                    $w8station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w8station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    if $w8station=0xFFFFFF or $w8station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w8status=2         ; = warpToBelt
                    Else
                        $w8status=4         ; = Approach target
                    EndIf
                Next                    
            EndIf
            underfire()
        EndIf
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w8status=9 Then                             ;w8 docking
        dockstation()
    EndIf       
    If $w8status=10 Then                            ;w8 empty cargo & checkdt
        unloadleft()
        clientclose()
    EndIf
    ;If $debug=1 Then logwrite("debug")
    If $w8status=12 Then                            ;w8 undock
        undock()
    EndIf
    If $w8status=2 Then                             ;w8 warptobelt
        countbookmarks()
        If $w8bookmarktotal>=$w8bookmarkmin Then 
            $w8selectmethod=1
        Else
            $w8selectmethod=2
            $w8startbelt=$w8bookmarktotal
        EndIf
        If $w8selectmethod=1 Then warpbeltbm()          ;via bookmarks
        If $w8selectmethod=2 Then warpbeltov()          ;via overview
        ;debug
        If $debug=1 Then logwrite("**************************")
        If $debug=1 Then logwrite("w8bm minimum   ; " & $w8bookmarkmin )
        If $debug=1 Then logwrite("w8countedbm    ; " & $w8bookmarktotal )
        If $debug=1 Then logwrite("w8selectmethod ; " & $w8selectmethod )
        If $debug=1 Then logwrite("w8countedbelts ; " & $w8targettotal )
        If $debug=1 Then logwrite("w8startbelt    ; " & $w8startbelt )
        If $debug=1 Then logwrite("**************************")
    EndIf
    If $w8status=4 Then                             ;w8 approach target
        ;SelectTab1()
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        If $targetsymb1=$black Then actwithtarget(2)
        For $i = $w8approachtime To 1 Step -1
            If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "approaching"  )       
            Sleep (1000)
        Next        
        ; sort of ore ----------------------
        If $loops=1 And $w8view=1 Then selectviews(1)   ; only veldspar
        If $loops=1 And $w8view=2 Then selectviews(2)   ; standard
        ; ----------------------------------
        $w8status=5                                 ;Ready for Mining
        ;Return 5
    EndIf 
    If $w8status=5 Then                             ;w8 lock target 
        ;SelectTab1()
        deactivateHS()
                ; check for station
                For $i = 1 To 3             ; = Schaue nach dem viereck (station)
                    $w8station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w8station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w8station=0xFFFFFF or $w8station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        $w8status=2         ; = warpToBelt
                    EndIf
                Next        
        CheckCargohold() ; set status to 8 (=wts) if cargohold full or status to 5 (=mining)
        If $w8status=5 Then
            If $w8targetsunlock=1 Then              ;w8 Unlock targets
                Do
                     MouseClick("right", $clientpos[0]+674, $clientpos[1]+80, 1, $mousespeed)
                     Sleep (500)
                     MouseClick("left", $clientpos[0]+705, $clientpos[1]+185, 1, $mousespeed)
                     Sleep (500)
                Until PixelGetColor ( $clientpos[0]+674, $clientpos[1]+80 ) = 0x000000
            EndIf 
            locktarget()  ; gives range, falls keine targets --> wXstatus=2 sonst wXstatus=5
            ; create bookmarks -----------------
            countbookmarks()
            If $w8selectmethod=2 And $w8bm_active=1 And $w8bookmarktotal<$w8bookmarkmin Then createbookmarks()
            ; update bookmarks -----------------
            If $w8selectmethod=1 And $w8bm_active=1 And $targetlocked=0 Then 
                If $w8station<>0xFFFFFF or $w8station2<>0xFFFFFF Then deletebookmarks()
                updatebookmarks()
            EndIf   
            activateHS()  ; gives # of hsinactives, targets locked but hs inactive
                If $w8status=2 Then
;~                  $w8selectstyle=3
                    warpbeltbm()
                Else 
                    If $hsinactive>0 Then actwithtarget(2)  ;approach rock              
                    If $w8orbit=1 Then actwithtarget(5)     ;orbit rock
                    If $hsinactive=0 And $w8orbit<>1 Then actwithtarget(800)    ; stop ship
                    $w8status=99
                EndIf
            If $debug=1 Then LogWrite("mining         ; ")
        EndIf
    EndIf
    If $w8status=8 Then                             ;w8 warptostation
;~          w8warpTostation()
    ;~  $client=1
    ;~  If clientchange() <> 1 Then Sleep (1000)
        $w8stationBM=1
        ;Prüfe Undockbutton
        $w8standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])   
        If $w8standort < 16000000 Then  ; in space  
            If $w8stationBM=1 Then      ; station1
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+126, $clientpos[1]+185, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+169, $clientpos[1]+244, 1, 0)
                Sleep (56)
            EndIf
            If $w8stationBM=2 Then      ; station2
                ;open P&P
                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                Sleep (2400)
                MouseClick("right", $clientpos[0]+135, $clientpos[1]+184, 1, 0)
                Sleep (700)
                MouseClick("left", $clientpos[0]+168, $clientpos[1]+195, 1, 0)
                Sleep (56)
            EndIf
                Send ("{F1}")   
                Send ("{F2}")   
                Send ("{F3}")       
            ;close P&P
    ;~      Sleep (300)
    ;~      MouseClick("left", $clientpos[0]+346, $clientpos[1]+38, 1, 0)
            ;SelectTab1() ;select ov 2 ore & station
        EndIf
        ;Return 9
        if $client=1 then $w1status=9
        if $client=2 then $w2status=9
        if $client=3 then $w3status=9
        if $client=4 then $w4status=9
        if $client=5 then $w5status=9
        if $client=6 then $w6status=9
        if $client=7 then $w7status=9
        if $client=8 then $w8status=9
        if $client=9 then $w9status=9
        if $client=10 then $w10status=9
    EndIf
    ;If $debug=1 Then logwrite("debug")
EndFunc
;; fix errors
Func fixlocalwindow()           ; v.274
Global $localwindow[2] = [974,649]
Global $localcolor  = 460551
    ;; check if you r in space
    $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
    If $w1standort < 16000000 Then  ; = in space
        ;; check for localwindow
        $checklocal=PixelGetColor($clientpos[0]+$localwindow[0], $clientpos[1]+$localwindow[1]) 
        If $checklocal = $localcolor Then   ; = local is open
            ; close localwindow
            Sleep (200)
            MouseClick("left", $clientpos[0]+$localwindow[0], $clientpos[1]+$localwindow[1], 2, $mousespeed)
            Sleep (200)
            If $debug=1 Then logwrite("local closed   ; " & $checklocal & " " )
        Else
;~          If $debug=1 Then $checklocal=PixelGetColor($clientpos[0]+$localwindow[0], $clientpos[1]+$localwindow[1])
;~          If $debug=1 Then logwrite("local is closed; " & $checklocal & " " ) 
        EndIf
    EndIf
EndFunc
Func fixoverviewerror()         ; v.275
    ; first condition: you r in space
    $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
    If $w1standort < 16000000 Then  ; = in space
        ;; Solarmap Error
        ; ----------------------------------------------------------------------------
        For $i = 1 to 3 
            ; read position of riangle in overview
            ; position if selecteditemswindow=closed and solarmap is shown
            $fixerror1=PixelGetColor($clientpos[0]+$openovarrow[0], $clientpos[1]+$openovarrow[1])
            ; position if selecteditemswindow=open and solarmap is shown
            $fixerror1b=PixelGetColor($clientpos[0]+$openovarrow[0], $clientpos[1]+$openovarrow[1]+145)
            ; position if selecteditemswindow=closed and solarmap is closed (=correct)
            $fixerror2=PixelGetColor($clientpos[0]+$openovarrow[0]+197, $clientpos[1]+$openovarrow[1])
            
;~          If $debug=1 Then logwrite("position 1     ; " & $fixerror1 )
;~          If $debug=1 Then logwrite("position 1b    ; " & $fixerror1b )
;~          If $debug=1 Then logwrite("position 2     ; " & $fixerror2 )

            If $fixerror1>526340 And $fixerror1<526350 Then
                If $fixerror2>592100 and $fixerror2<592200 Then
                    If $debug=1 Then logwrite("close f11      ; " & "Pos1; " & $fixerror1 & " Pos2; " & $fixerror2 )
;~                  $f11erroroccured=1
                    Send ("{F11}")
                    Sleep (2500)
                EndIf
            ElseIf $fixerror1b>4210750 And $fixerror1b<4210800 Then
                If $fixerror2>592100 and $fixerror2<592200 Then
                    If $debug=1 Then logwrite("close f11      ; " & "Pos1; " & $fixerror1 & " Pos2; " & $fixerror2 )
;~                  $f11erroroccured=1
                    Send ("{F11}")
                    Sleep (2500)                    
                EndIf
            EndIf
;~          $fixerror=PixelGetColor($clientpos[0]+742, $clientpos[1]+420)
;~          $fixerror2=PixelGetColor($clientpos[0]+850, $clientpos[1]+428)
;~          ;--------debug------------
;~          If $infodisplay=1 Then ToolTip ( $fixerror, $infowindow[0], $infowindow[1], "closing..."  )
;~          Sleep (10000)   
;~          If $infodisplay=1 Then ToolTip ( $fixerror2, $infowindow[0], $infowindow[1], "closing 2..."  )
;~          Sleep (10000)       
;~          ;-------------------------
;~          If $fixerror>2000000 and $fixerror2=8487297 Then
;~              Send ("{F11}")
;~              Sleep (2500)
;~          EndIf
        Next
;~      If $f11erroroccured=1 Then Sleep (2500)
        ;; Selected Items Window
        ; ----------------------------------------------------------------------------
        For $i = 1 to 3 
            $fixerror2=PixelGetColor($clientpos[0]+$openovarrow[0], $clientpos[1]+$openovarrow[1])              ; closed [767,71]
            If $fixerror2<10000000 and $selecteditemswindowstatus="closed" Then
                MouseClick("left", $clientpos[0]+900, $clientpos[1]+37, 2, $mousespeed)
                MouseClick("left", $clientpos[0]+$openovarrow[0]+193, $clientpos[1]+$openovarrow[1]-16, 2, $mousespeed)                         ; closed [960,55]
                If $infodisplay=1 Then ToolTip ( $fixerror2, $infowindow[0], $infowindow[1], "closing..."  )
                If $debug=1 Then logwrite("close selitems ; " & "Pos2; " & $fixerror2 )
                Sleep (700)
            EndIf
        Next        
;~      For $i = 1 to 3
;~          $fixerror2=PixelGetColor($clientpos[0]+$openovarrow[0], $clientpos[1]+$openovarrow[1])
;~          If $fixerror2>10000000 and $selecteditemswindowstatus="open" then ;=0xE6E6E6 then 
;~              MouseClick("left", $clientpos[0]+900, $clientpos[1]+37, 2, $mousespeed)
;~              If $infodisplay=1 Then ToolTip ( $fixerror2, $infowindow[0], $infowindow[1], "opening..."  )
;~          Sleep (700)
;~          EndIf
;~      Next
    EndIf
;~      For $i = 1 to 3
;~          $Wxstandort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
;~          If $Wxstandort < 16000000 Then  ; = in space
;~              $fixerrorF11=PixelGetColor($clientpos[0]+879, $clientpos[1]+614)
;~              If $fixerrorF11=$black Then ;=0xE6E6E6 then 
;~                  Send ("{F11}")
;~                  If $infodisplay=1 Then ToolTip ( $fixerrorF11, $infowindow[0], $infowindow[1], "Fehler 2"  )
;~              Sleep (700)
;~              EndIf
;~          EndIf
;~      Next

;~      For $i = 1 to 2
;~          $fixerror=PixelGetColor($clientpos[0]+830, $clientpos[1]+165)
;~          If $fixerror<850000 or $fixerror>855500 Then ;600000 then 
;~              MouseClick("left", $clientpos[0]+900, $clientpos[1]+147, 2, $mousespeed)
;~              If $infodisplay=1 Then ToolTip ( $fixerror, $infowindow[0], $infowindow[1], "Fehler 2"  )
;~          Sleep (800)
;~          EndIf
;~      Next
EndFunc
Func checkwarnmeldung()         ; v.332
    For $i = 1 To 2     ;Prüfe warnmeldung
        ;**** warnmeldung 1 + 2 prüfen ****
        $warnmeldung1=PixelGetColor ($clientpos[0]+375, $clientpos[1]+321)  ;Dialogfenster "Information"
        $warnmeldung2=PixelGetColor ($clientpos[0]+398, $clientpos[1]+342)  ;Dialogfenster "Set Quantity"
        $warnmeldung2=PixelGetColor ($clientpos[0]+512, $clientpos[1]+384)  ;Bildmitte
        if $warnmeldung1=0xFFFBFF then
            Send ("{ENTER}") 
;~              If $infodisplay=1 Then ToolTip ( $warnmeldung1, $infowindow[0], $infowindow[1], "warnmeldung 1 entdeckt"  )             
;~              Sleep (100)
;~              MouseClick("left", $clientpos[0]+516, $clientpos[1]+488, 1, 00) ;Press OK "Information"
;~      ElseIf $warnmeldung2=0x000000 then
;~          Send ("{ENTER}") 
;~              If $infodisplay=1 Then ToolTip ( $warnmeldung2, $infowindow[0], $infowindow[1], "warnmeldung 2 entdeckt"  )             
;~              Sleep (100)         
;~              MouseClick("left", $clientpos[0]+489, $clientpos[1]+423, 1, 00) ;Press OK "Set Quantity"
            ;Send ("{ENTER}") 
        EndIf
        Sleep (40) 
    Next
    For $i = 1 To 2     ;check editbookmark window
        ;**** eingabefenster prüfen ****
        $warnmeldung1=PixelGetColor ($clientpos[0]+390, $clientpos[1]+304)  ;Dialogfenster "in der nadel"
        $warnmeldung2=PixelGetColor ($clientpos[0]+479, $clientpos[1]+502)  ;Dialogfenster "above ok"
;~      $warnmeldung2=PixelGetColor ($clientpos[0]+512, $clientpos[1]+384)  ;Bildmitte
        If $warnmeldung1>15000000 And $warnmeldung2>10000000 Then
            MouseClick("left", $clientpos[0]+479, $clientpos[1]+510, 1, 00) ;Press OK
            If $infodisplay=1 Then ToolTip ( $warnmeldung1, $infowindow[0], $infowindow[1], "eingabefenster entdeckt"  )
            If $debug=1 Then logwrite("position 1     ; " & $warnmeldung1 & "position 2     ; " & $warnmeldung2)
        EndIf
        Sleep (40)
    Next    
EndFunc
;; core func
Func activatehs()               ; v.255
    For $i = 1 to 1             ; activate mininglasers

        ; Activate HS3 on targetsymbol 1
        If $targetsymb1<>$black Then
            $w1HS3=PixelGetColor ($clientpos[0]+$highslot3[0], $clientpos[1]+$highslot3[1])
            if $w1HS3=$hsinactivecolor Then
                MouseClick("left", $clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1], 1, $mousespeed)
                Send ("{F3}")
;~              Sleep (600)
            EndIf
        EndIf
        If $targetsymb3<>$black Then
            $w1HS1=PixelGetColor ($clientpos[0]+$highslot1[0], $clientpos[1]+$highslot1[1])
            if $w1HS1=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+244, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol3[0], $clientpos[1]+$targetsymbol3[1], 1, $targetingspeed)
                Send ("{F1}")   
;~              If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "activate HS3"  )      
;~              Sleep (800)
            EndIf
        EndIf       
        If $targetsymb2<>$black Then
            $w1HS2=PixelGetColor ($clientpos[0]+$highslot2[0], $clientpos[1]+$highslot2[1])
            if $w1HS2=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+226, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1], 1, $targetingspeed)
                Send ("{F2}")
;~              If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "activate HS2"  )      
                Sleep (1500)
            EndIf
        EndIf

    Next
    $hsinactive = 0
    ; Count active highslots
    $w1HS1=PixelGetColor ($clientpos[0]+$highslot1[0], $clientpos[1]+$highslot1[1])
    $w1HS2=PixelGetColor ($clientpos[0]+$highslot2[0], $clientpos[1]+$highslot2[1])
    $w1HS3=PixelGetColor ($clientpos[0]+$highslot3[0], $clientpos[1]+$highslot3[1])
    if $w1HS1=$hsinactivecolor Then $hsinactive=$hsinactive+1
    if $w1HS2=$hsinactivecolor Then $hsinactive=$hsinactive+1
    if $w1HS3=$hsinactivecolor Then $hsinactive=$hsinactive+1
            If $hsinactive>0 And $infodisplay=1 Then ToolTip ( $hsinactive, $infowindow[0], $infowindow[1], "hs inactive 1"  )
            If $hsinactive>0 Then Sleep (1000)          
    If $hsinactive>0 Then       
        ;Safety Activate HS3 on targetsymbol 2              
        If $targetsymb2<>$black Then    
            $w1HS3=PixelGetColor ($clientpos[0]+$highslot3[0], $clientpos[1]+$highslot3[1])
            if $w1HS3=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+205, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1], 1, $targetingspeed)
                Send ("{F3}")
    ;~          If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "activate HS3"  )      
                Sleep (1200)
            EndIf
        EndIf       
        ;Safety Activate HS3 on targetsymbol 3              
        If $targetsymb3<>$black Then
            $w1HS3=PixelGetColor ($clientpos[0]+$highslot3[0], $clientpos[1]+$highslot3[1])
            if $w1HS3=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+205, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol3[0], $clientpos[1]+$targetsymbol3[1], 1, $targetingspeed)
                Send ("{F3}")
                Sleep (1200)
            EndIf   
        EndIf       
        ;Safety Activate HS1 on targetsymbol 2
        If $targetsymb2<>$black Then    
            $w1HS1=PixelGetColor ($clientpos[0]+$highslot1[0], $clientpos[1]+$highslot1[1])
            if $w1HS1=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+244, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1], 1, $targetingspeed)
                Send ("{F1}")   
                Sleep (1200)
            EndIf
        EndIf
        ;Safety Activate HS1 on targetsymbol 1
        If $targetsymb1<>$black Then
            $w1HS1=PixelGetColor ($clientpos[0]+$highslot1[0], $clientpos[1]+$highslot1[1])
            if $w1HS1=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+244, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1], 1, $targetingspeed)
                Send ("{F1}")   
                Sleep (1200)
            EndIf
        EndIf       
        ;Safety Activate HS2 on targetsymbol 1          
        If $targetsymb1<>$black Then
            $w1HS2=PixelGetColor ($clientpos[0]+$highslot2[0], $clientpos[1]+$highslot2[1])
            if $w1HS2=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+226, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1], 1, $targetingspeed)
                Send ("{F2}")
                Sleep (1200)
            EndIf
        EndIf
        ;Safety Activate HS2 on targetsymbol 3          
        If $targetsymb3<>$black Then
            $w1HS2=PixelGetColor ($clientpos[0]+$highslot2[0], $clientpos[1]+$highslot2[1])
            If $w1HS2=$hsinactivecolor Then
                ;MouseClick("left", $clientpos[0]+860, $clientpos[1]+226, 1, $mousespeed)
                MouseClick("left", $clientpos[0]+$targetsymbol3[0], $clientpos[1]+$targetsymbol3[1], 1, $targetingspeed)
                Send ("{F2}")
                Sleep (1200)
            EndIf
        EndIf
    EndIf
    $hsinactive = 0 
    ; Count active highslots
    $w1HS1=PixelGetColor ($clientpos[0]+$highslot1[0], $clientpos[1]+$highslot1[1])
    $w1HS2=PixelGetColor ($clientpos[0]+$highslot2[0], $clientpos[1]+$highslot2[1])
    $w1HS3=PixelGetColor ($clientpos[0]+$highslot3[0], $clientpos[1]+$highslot3[1])
    if $w1HS1=$hsinactivecolor Then $hsinactive=$hsinactive+1
    if $w1HS2=$hsinactivecolor Then $hsinactive=$hsinactive+1
    if $w1HS3=$hsinactivecolor Then $hsinactive=$hsinactive+1
            If $hsinactive>0 And $infodisplay=1 Then ToolTip ( $hsinactive, $infowindow[0], $infowindow[1], "hs inactive 2"  )
            If $hsinactive>0 Then Sleep (1000)          
EndFunc
Func actwithtarget($act)        ; v.276
    Select
        Case $act =   1 ; = approach straight   
        Case $act =   2 ; = approach ; ov1  
            If $selecteditemswindowstatus="closed" Then
                MouseClick("right", $clientpos[0]+$targetloc1[0], $clientpos[1]+$targetloc1[1], 1, $mousespeed)
                Sleep (703)
                MouseClick("left", $clientpos[0]+$targetloc1[0]+5, $clientpos[1]+$targetloc1[1]+10, 1, $mousespeed)
            ElseIf $selecteditemswindowstatus="open" Then
                MouseClick("left", $clientpos[0]+$targetloc1[0], $clientpos[1]+$targetloc1[1], 1, $mousespeed)
                Sleep (984)
                MouseClick("left", $clientpos[0]+$Func3[0], $clientpos[1]+$Func3[1], 1, $mousespeed) ;orbit     
            EndIf       
        Case $act =   3 ; = approach    
        Case $act =   4 ; = free
        Case $act =   5 ; = orbit   
            $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
            $targetsymb2=PixelGetColor ($clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1])
            If $targetsymb2<>$black Then ; 577,80   677, 107   824,108    824,154
                If $selecteditemswindowstatus="closed" Then
                    MouseClick("right", $clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1], 1, $mousespeed)
                    Sleep (992)
                    MouseClick("left", $clientpos[0]+$targetsymbol2[0]+100, $clientpos[1]+$targetsymbol2[1]+27, 1, $menuespeed)
        ;~          Sleep (100)
                    MouseMove($clientpos[0]+824, $clientpos[1]+108, $menuespeed)
        ;~          MouseClick("left", $clientpos[0]+$targetsymbol2[0]+247, $clientpos[1]+$targetsymbol2[1]+27, 1, $menuespeed)
                    MouseClick("left", $clientpos[0]+$targetsymbol2[0]+247, $clientpos[1]+$targetsymbol2[1]+74, 1, $menuespeed)
                Elseif $selecteditemswindowstatus="open" Then
                    MouseClick("left", $clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1], 1, $mousespeed)
                    Sleep (962)
                    MouseClick("left", $clientpos[0]+$Func3[0], $clientpos[1]+$Func3[1], 1, $mousespeed) ;orbit
                EndIf

            ElseIf $targetsymb1<>$black Then
                If $selecteditemswindowstatus="closed" Then
                    MouseClick("right", $clientpos[0]+$targetloc1[0], $clientpos[1]+$targetloc1[1], 1, $mousespeed)
                    Sleep (703)
                    MouseClick("left", $clientpos[0]+$targetloc1[0]+5, $clientpos[1]+$targetloc1[1]+10, 1, $mousespeed)
                ElseIf $selecteditemswindowstatus="open" Then
                    MouseClick("left", $clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1], 1, $mousespeed)
                    Sleep (987)
                    MouseClick("left", $clientpos[0]+$Func3[0], $clientpos[1]+$Func3[1], 1, $mousespeed) ;orbit
                Endif
            Else
                If $selecteditemswindowstatus="closed" Then
                    MouseClick("right", $clientpos[0]+$targetloc1[0], $clientpos[1]+$targetloc1[1], 1, $mousespeed)
                    Sleep (703)
                    MouseClick("left", $clientpos[0]+$targetloc1[0]+5, $clientpos[1]+$targetloc1[1]+10, 1, $mousespeed)
                ElseIf $selecteditemswindowstatus="open" Then
                    MouseClick("left", $clientpos[0]+$targetloc1[0], $clientpos[1]+$targetloc1[1], 1, $mousespeed)
                    Sleep (984)
                    MouseClick("left", $clientpos[0]+$Func3[0], $clientpos[1]+$Func3[1], 1, $mousespeed) ;orbit     
                EndIf
            EndIf
            Sleep (110)     
        Case $act =   6 ; = orbit
        Case $act =   7 ; = orbit
        Case $act =   8 ; = orbit   
        Case $act =   9 ; = free    
        Case $act =  10 ; = free    
        Case $act = 800 ; = stop ship
            Send ("{CTRLDOWN}")
            Sleep (20)
            Send ("{SPACE}")
            Sleep (20)
            Send ("{CTRLUP}")
    EndSelect       
EndFunc
Func bookmarks()                ; v.256
    If $bookmark=1 Then ; = station 1
        If $debug=1 Then LogWrite("station        ; ")
;~      If $infodisplay=1 Then ToolTip ( $infowindow[0], $infowindow[1], "station"  )       
        MouseClick("right", $clientpos[0]+$bookmark1[0], $clientpos[1]+$bookmark1[1], 1, 0)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark1[0]+30, $clientpos[1]+$bookmark1[1]+60, 1, 0)
        ;MouseClick("left", 347,38, 1, 00)
    EndIf
    if $bookmark=2 Then
        MouseClick("right", $clientpos[0]+$bookmark2[0], $clientpos[1]+$bookmark2[1], 1, 0)  ;120,203
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark2[0]+30, $clientpos[1]+$bookmark2[1]+10, 1, 0)  ;150,213
        ;MouseClick("left", 347,38, 1, 00)
    EndIf
    if $bookmark=3 Then
        MouseClick("right", $clientpos[0]+$bookmark3[0], $clientpos[1]+$bookmark3[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark3[0]+30, $clientpos[1]+$bookmark3[1]+10, 1, 0)  
        ;MouseClick("left", 347,38, 1, 00)
    EndIf
    if $bookmark=4 Then
        MouseClick("right", $clientpos[0]+$bookmark4[0], $clientpos[1]+$bookmark4[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark4[0]+30, $clientpos[1]+$bookmark4[1]+10, 1, 0)  
        ;MouseClick("left", 347,38, 1, 00)
    EndIf
    if $bookmark=5 Then
        MouseClick("right", $clientpos[0]+$bookmark5[0], $clientpos[1]+$bookmark5[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark5[0]+30, $clientpos[1]+$bookmark5[1]+10, 1, 0)  
        ;MouseClick("left", 347,38, 1, 00)
    EndIf               
    if $bookmark=6 Then
        MouseClick("right", $clientpos[0]+$bookmark6[0], $clientpos[1]+$bookmark6[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark6[0]+30, $clientpos[1]+$bookmark6[1]+10, 1, 0)  
        ;MouseClick("left", 347,38, 1, 00)
    EndIf
    if $bookmark=7 Then
        MouseClick("right", $clientpos[0]+$bookmark7[0], $clientpos[1]+$bookmark7[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark7[0]+30, $clientpos[1]+$bookmark7[1]+10, 1, 0)  
        ;MouseClick("left", 347,38, 1, 00)
    EndIf
    if $bookmark=8 Then
        MouseClick("right", $clientpos[0]+$bookmark8[0], $clientpos[1]+$bookmark8[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark8[0]+30, $clientpos[1]+$bookmark8[1]+10, 1, 0)  
    EndIf
    if $bookmark=9 Then
        MouseClick("right", $clientpos[0]+$bookmark9[0], $clientpos[1]+$bookmark9[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark9[0]+30, $clientpos[1]+$bookmark9[1]+10, 1, 0)  
    EndIf   
    if $bookmark=10 Then
        MouseClick("right", $clientpos[0]+$bookmark10[0], $clientpos[1]+$bookmark10[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark10[0]+30, $clientpos[1]+$bookmark10[1]+10, 1, 0)  
    EndIf   
    if $bookmark=11 Then
        MouseClick("right", $clientpos[0]+$bookmark11[0], $clientpos[1]+$bookmark11[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark11[0]+30, $clientpos[1]+$bookmark11[1]+10, 1, 0)  
    EndIf   
    if $bookmark=12 Then
        MouseClick("right", $clientpos[0]+$bookmark12[0], $clientpos[1]+$bookmark12[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark12[0]+30, $clientpos[1]+$bookmark12[1]+10, 1, 0)  
    EndIf
    if $bookmark=13 Then
        MouseClick("right", $clientpos[0]+$bookmark13[0], $clientpos[1]+$bookmark13[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark13[0]+30, $clientpos[1]+$bookmark13[1]+10, 1, 0)  
    EndIf   
    if $bookmark=14 Then
        MouseClick("right", $clientpos[0]+$bookmark14[0], $clientpos[1]+$bookmark14[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark14[0]+30, $clientpos[1]+$bookmark14[1]+10, 1, 0)  
    EndIf   
    if $bookmark=15 Then
        MouseClick("right", $clientpos[0]+$bookmark15[0], $clientpos[1]+$bookmark15[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark15[0]+30, $clientpos[1]+$bookmark15[1]+10, 1, 0)  
    EndIf
    if $bookmark=16 Then
        MouseClick("right", $clientpos[0]+$bookmark16[0], $clientpos[1]+$bookmark16[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark16[0]+30, $clientpos[1]+$bookmark16[1]+10, 1, 0)  
    EndIf   
    if $bookmark=17 Then
        MouseClick("right", $clientpos[0]+$bookmark17[0], $clientpos[1]+$bookmark17[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark17[0]+30, $clientpos[1]+$bookmark17[1]+10, 1, 0)  
    EndIf
    if $bookmark=18 Then
        MouseClick("right", $clientpos[0]+$bookmark18[0], $clientpos[1]+$bookmark18[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark18[0]+30, $clientpos[1]+$bookmark18[1]+10, 1, 0)  
    EndIf
    if $bookmark=19 Then
        MouseClick("right", $clientpos[0]+$bookmark19[0], $clientpos[1]+$bookmark19[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark19[0]+30, $clientpos[1]+$bookmark19[1]+10, 1, 0)  
    EndIf
    if $bookmark=20 Then
        MouseClick("right", $clientpos[0]+$bookmark20[0], $clientpos[1]+$bookmark20[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark20[0]+30, $clientpos[1]+$bookmark20[1]+10, 1, 0)  
    EndIf
    if $bookmark=21 Then
        MouseClick("right", $clientpos[0]+$bookmark21[0], $clientpos[1]+$bookmark21[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark21[0]+30, $clientpos[1]+$bookmark21[1]+10, 1, 0)  
    EndIf
    if $bookmark=22 Then
        MouseClick("right", $clientpos[0]+$bookmark22[0], $clientpos[1]+$bookmark22[1], 1, 0)  
        Sleep (700)
        MouseClick("left", $clientpos[0]+$bookmark22[0]+30, $clientpos[1]+$bookmark22[1]+10, 1, 0)  
    EndIf
    
;~   ; Close P&P
;~  Sleep (700)
;~  MouseClick("left", $clientpos[0]+347, $clientpos[1]+38, 1, $mousespeed) 
    
EndFunc
Func checkcargohold()           ; v.270
    Sleep (1000)
;~  $Cargo00 =PixelGetColor ($clientpos[0]+46, $clientpos[1]+674)
;~  $Cargo10=PixelGetColor ($clientpos[0]+$MyCargo10[0], $clientpos[1]+$MyCargo10[1])
;~  $Cargo20=PixelGetColor ($clientpos[0]+$MyCargo20[0], $clientpos[1]+$MyCargo20[1])
;~  $Cargo30=PixelGetColor ($clientpos[0]+$MyCargo30[0], $clientpos[1]+$MyCargo30[1])
;~  $Cargo40=PixelGetColor ($clientpos[0]+$MyCargo40[0], $clientpos[1]+$MyCargo40[1])
    $Cargo50=PixelGetColor ($clientpos[0]+238, $clientpos[1]+662)
;~  $Cargo60=PixelGetColor ($clientpos[0]+$MyCargo60[0], $clientpos[1]+$MyCargo60[1])
;~  $Cargo70=PixelGetColor ($clientpos[0]+220, $clientpos[1]+661)
;~  $Cargo75=PixelGetColor ($clientpos[0]+219, $clientpos[1]+674)
    $Cargo80=PixelGetColor ($clientpos[0]+267, $clientpos[1]+662)
    $Cargo90=PixelGetColor ($clientpos[0]+274, $clientpos[1]+662)
    $Cargo99=PixelGetColor ($clientpos[0]+282, $clientpos[1]+662)
    
;~      If $infodisplay=1 Then ToolTip ( $Cargo50, $infowindow[0], $infowindow[1], "$Cargo50"  )
;~      Sleep (2000)
;~      If $infodisplay=1 Then ToolTip ( $Cargo80, $infowindow[0], $infowindow[1], "$Cargo80"  )
;~      Sleep (3000)
;~      If $infodisplay=1 Then ToolTip ( $Cargo90, $infowindow[0], $infowindow[1], "$Cargo90"  )
;~      Sleep (2000)
;~      If $infodisplay=1 Then ToolTip ( $Cargo99, $infowindow[0], $infowindow[1], "$Cargo99"  )
;~      Sleep (2000)
    

    If $Cargo99>86374 and $Cargo99<86377 Then; and $Cargo99<11600000 Then ; 470843
        $cargohold=13489            
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo99 )
    ElseIf $Cargo99>20582 and $Cargo99<20584 Then; and $Cargo99<11600000 Then ; 470843
        $cargohold=13489            
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo99 )
    ElseIf $Cargo99>283497 and $Cargo99<283499 Then; and $Cargo99<11600000 Then ; 470843
        $cargohold=13489            
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo99 )
    ElseIf $Cargo99>283754 and $Cargo99<283756 Then; and $Cargo99<11600000 Then ; 470843
        $cargohold=13489            
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo99 )

    ElseIf $Cargo90>20582 and $Cargo90<20584 Then;and $Cargo90<11600000 Then
        $cargohold=12000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo90 )
    ElseIf $Cargo90>86374 and $Cargo90<86377 Then;and $Cargo90<11600000 Then
        $cargohold=12000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo90 )
    ElseIf $Cargo90>217961 and $Cargo90<217963 Then;and $Cargo90<11600000 Then
        $cargohold=12000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo90 )
    ElseIf $Cargo90>283754 and $Cargo90<283756 Then;and $Cargo90<11600000 Then
        $cargohold=12000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo90 )

    ElseIf $Cargo80>20582 and $Cargo80<20584 Then
        $cargohold=11000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo80 )
    ElseIf $Cargo80>86374 and $Cargo80<86377 Then
        $cargohold=11000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo80 )
    ElseIf $Cargo80>217961 and $Cargo80<217963 Then
        $cargohold=11000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo80 )
    ElseIf $Cargo80>283497 and $Cargo80<283499 Then
        $cargohold=11000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo80 )

;~  ElseIf $Cargo70=90493 Then;and $Cargo70<11600000 Then
;~      $cargohold=7000
;~      If $infodisplay=1 Then ToolTip ( $Cargo70, $infowindow[0], $infowindow[1], "m3" & $Cargo70 )
;~  ElseIf $Cargo60>3680000 Then;and $Cargo60<11600000 Then
;~      $cargohold=6000
;~      If $infodisplay=1 Then ToolTip ( $Cargo60, $infowindow[0], $infowindow[1], "m3" )
     ElseIf $Cargo50>20582 and $Cargo50<20584 Then ;and $Cargo50<11600000 Then
        $cargohold=5000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo50 )
     ElseIf $Cargo50>86374 and $Cargo50<86376 Then ;and $Cargo50<11600000 Then
        $cargohold=5000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo50 )
     ElseIf $Cargo50>217961 and $Cargo50<217963 Then ;and $Cargo50<11600000 Then
        $cargohold=5000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo50 )
     ElseIf $Cargo50>328964 and $Cargo50<328966 Then ;and $Cargo50<11600000 Then
        $cargohold=5000
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "m3 " & $Cargo50 )     
;~  ElseIf $Cargo40>3680000 Then;and $Cargo40<11600000 Then
;~      $cargohold=4000
;~      If $infodisplay=1 Then ToolTip ( $Cargo40, $infowindow[0], $infowindow[1], "m3" )
;~  ElseIf $Cargo30>3680000 Then;and $Cargo30<11600000 Then
;~      $cargohold=3000
;~      If $infodisplay=1 Then ToolTip ( $Cargo30, $infowindow[0], $infowindow[1], "m3" )
;~  ElseIf $Cargo20>3680000 Then;and $Cargo20<11600000 Then
;~      $cargohold=2000
;~      If $infodisplay=1 Then ToolTip ( $Cargo20, $infowindow[0], $infowindow[1], "m3" )
;~  ElseIf $Cargo10>3680000 Then;and $Cargo10<11600000 Then
;~      $cargohold=1000
;~      If $infodisplay=1 Then ToolTip ( $Cargo10, $infowindow[0], $infowindow[1], "m3" )
;~  ElseIf $Cargo00>=24956 and $Cargo00<80000 Then ;or $Cargo0>11600000 Then ;8363184 ;11574399
;~      $cargohold=0        
;~      If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "empty"  )
;~      Sleep (1500)
    Else 
        $cargohold=0
        If $infodisplay=1 Then ToolTip ( $cargohold, $infowindow[0], $infowindow[1], "empty"  )
    EndIf
    If $cargohold>=12000 Then
            if $client=1 then $w1status=8
            if $client=2 then $w2status=8
            if $client=3 then $w3status=8
            if $client=4 then $w4status=8
            if $client=5 then $w5status=8       
            if $client=6 then $w6status=8       
            if $client=7 then $w7status=8       
            if $client=8 then $w8status=8       
            if $client=9 then $w9status=8       
            if $client=10 then $w10status=8     
    EndIf
EndFunc
Func deactivatehs()             ; v.215
    For $i = 1 to 1             ;w1 Deaktivate Mining Laser
        $w1HS3=PixelGetColor ($clientpos[0]+$highslot3[0], $clientpos[1]+$highslot3[1])
        if $w1HS3<>$hsinactivecolor Then
            ;MouseClick("left", $clientpos[0]+837, $clientpos[1]+113, 1, 00)
            Send ("{F3}")
            ;Sleep (600)
            ;If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "Laser 3"  )
        EndIf
        $w1HS2=PixelGetColor ($clientpos[0]+$highslot2[0], $clientpos[1]+$highslot2[1])
        if $w1HS2<>$hsinactivecolor Then
            ;MouseClick("left", $clientpos[0]+837, $clientpos[1]+131, 1, 00)
            Send ("{F2}")
            ;Sleep (600)
            ;If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "Laser 2"  )
        EndIf
        $w1HS1=PixelGetColor ($clientpos[0]+$highslot1[0], $clientpos[1]+$highslot1[1])
        if $w1HS1<>$hsinactivecolor Then
            ;MouseClick("left", $clientpos[0]+837, $clientpos[1]+151, 1, 00)
            Send ("{F1}")   
            ;Sleep (600)
            ;If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "Laser 1"  )
        EndIf
        sleep (1500)
    Next
EndFunc
Func dockstation()              ; v.273
        checkwarnmeldung()
        ;Prüfe Undockbutton
        $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
        If $w1standort > 16000000 Then          ; in station
            ; set status to >empty cargo< for next loop
            if $client= 1 then $w1status= 10
            if $client= 2 then $w2status= 10
            if $client= 3 then $w3status= 10
            if $client= 4 then $w4status= 10
            if $client= 5 then $w5status= 10
            if $client= 6 then $w6status= 10
            if $client= 7 then $w7status= 10
            if $client= 8 then $w8status= 10
            if $client= 9 then $w9status= 10
            if $client=10 then $w10status=10
            ; log
            If $debug=1 Then LogWrite("already docked ;")
        ElseIf $w1standort < 16000000 Then      ; in space
            FixOverviewError()
            warpWait()
                For $i = 1 To 1             ; = Schaue nach dem viereck (station)
                    $w1station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
                    $w1station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
                    If $w1station=0xFFFFFF or $w1station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
                        For $i = 1 to 5                     ; docking
                            $Dockbutton=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])
                            If $Dockbutton<4000000 Then
                                ; open people & places
                                MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)
                                Sleep (2479)
                                ; docking via people & places, bookmark 1
                                MouseClick("right", $clientpos[0]+$bookmark1[0], $clientpos[1]+$bookmark1[1], 1, 0) ; 120,184
                                Sleep (903)
                                MouseClick("left", $clientpos[0]+$bookmark1[0]+30, $clientpos[1]+$bookmark1[1]+46, 1, 0) ; 160,230      Function Dock       
                ;~              ; docking via overview and selected items
                ;~              Sleep (1003)
                ;~              MouseClick("left", $clientpos[0]+839, $clientpos[1]+205, 1, $mousespeed)
                ;~              Sleep (1829)
                ;~              MouseClick("left", $clientpos[0]+839, $clientpos[1]+103, 1, $mousespeed);SelectFunc3
                                Sleep (8326)
                                If $debug=1 Then LogWrite("docking        ;")
                            EndIf
                            $Dockbutton=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])
                            If $Dockbutton<4000000 Then
                                Sleep (5846)            
                            EndIf           
                        Next
                        Send ("{ENTER}")
                        ; set status to >empty cargo< for next loop
                        if $client=1 then $w1status=10
                        if $client=2 then $w2status=10
                        if $client=3 then $w3status=10
                        if $client=4 then $w4status=10
                        if $client=5 then $w5status=10
                        if $client=6 then $w6status=10
                        if $client=7 then $w7status=10
                        if $client=8 then $w8status=10
                        if $client=9 then $w9status=10
                        if $client=10 then $w10status=10
                    Else
                        ; set status to >warp to station< for next loop ######## Baustelle: sofort warpen
                        if $client=1 then $w1status=8
                        if $client=2 then $w2status=8
                        if $client=3 then $w3status=8
                        if $client=4 then $w4status=8
                        if $client=5 then $w5status=8
                        if $client=6 then $w6status=8
                        if $client=7 then $w7status=8
                        if $client=8 then $w8status=8
                        if $client=9 then $w9status=8
                        if $client=10 then $w10status=8
                    EndIf
                Next                    
        EndIf
EndFunc
Func locktarget()               ; v.280
    $w1station=PixelGetColor ($clientpos[0]+$viereck[0], $clientpos[1]+$viereck[1])
    $w1station2=PixelGetColor ($clientpos[0]+$viereck2[0], $clientpos[1]+$viereck2[1])
    If $w1station=0xFFFFFF or $w1station2=0xFFFFFF Then ;d.h. viereck ist zu sehen
        Sleep (10)
    Else
        For $i = 1 to 2 
            $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
            $targetsymb2=PixelGetColor ($clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1])
            $targetsymb3=PixelGetColor ($clientpos[0]+$targetsymbol3[0], $clientpos[1]+$targetsymbol3[1])
            ; lock targets
            Sleep (200)
    ;~      If $targetsymb1=$black Then
            If $targetsymb3=$black Then
                Send ("{CTRLDOWN}")
                MouseClick("left", $targetloc1[0]+$clientpos[0], $targetloc1[1]+$clientpos[1], 1, $mousespeed)
                ;Send ("{SPACE}")
    ;~          Send ("{CTRLUP}")
                Sleep (50)
    ;~      EndIf
    ;~      If $targetsymb2=$black Then
    ;~          Send ("{CTRLDOWN}")
                MouseClick("left", $targetloc2[0]+$clientpos[0], $targetloc2[1]+$clientpos[1], 1, $targetingspeed)
    ;~          Send ("{CTRLUP}")
                Sleep (50)
    ;~      EndIf
    ;~      If $targetsymb3=$black Then
    ;~          Send ("{CTRLDOWN}")
                MouseClick("left", $targetloc3[0]+$clientpos[0], $targetloc3[1]+$clientpos[1], 1, $targetingspeed)
    ;~          Send ("{CTRLUP}")
                Sleep (50)
    ;~          Send ("{CTRLDOWN}")
                MouseClick("left", $targetloc4[0]+$clientpos[0], $targetloc4[1]+$clientpos[1], 1, $targetingspeed)
                Send ("{CTRLUP}")           
    ;~          Sleep (200)
            EndIf
            If $targetsymb3=$black Then Sleep (2789)
        Next
        ; count locked targets & set status
        $targetsymb1=PixelGetColor ($clientpos[0]+$targetsymbol1[0], $clientpos[1]+$targetsymbol1[1])
        $targetsymb2=PixelGetColor ($clientpos[0]+$targetsymbol2[0], $clientpos[1]+$targetsymbol2[1])
        $targetsymb3=PixelGetColor ($clientpos[0]+$targetsymbol3[0], $clientpos[1]+$targetsymbol3[1])       
        If $targetsymb3<>$black Then 
            $targetlocked=3
;~          If $client=1 then $w1status=99
;~          If $client=2 then $w2status=99
;~          If $client=3 then $w3status=99
;~          If $client=4 then $w4status=99
;~          If $client=5 then $w5status=99          
        ElseIf $targetsymb2<>$black Then
            $targetlocked=2
;~          If $client=1 then $w1status=99
;~          If $client=2 then $w2status=99
;~          If $client=3 then $w3status=99
;~          If $client=4 then $w4status=99
;~          If $client=5 then $w5status=99              
        ElseIf $targetsymb1<>$black Then
            $targetlocked=1
;~          If $client=1 then $w1status=99
;~          If $client=2 then $w2status=99
;~          If $client=3 then $w3status=99
;~          If $client=4 then $w4status=99
;~          If $client=5 then $w5status=99              
        Else 
            $targetlocked=0
            If $client= 1 then $w1status= 2
            If $client= 2 then $w2status= 2
            If $client= 3 then $w3status= 2
            If $client= 4 then $w4status= 2
            If $client= 5 then $w5status= 2
            If $client= 6 then $w6status= 2
            If $client= 7 then $w7status= 2
            If $client= 8 then $w8status= 2
            If $client= 9 then $w9status= 2
            If $client=10 then $w10status=2
        EndIf
    EndIf   
EndFunc
Func miningtime()               ; v.240
    $Miningtime=20+Random(0,12,1)
    If $debug=1 Then LogWrite("time")
    For $i = $Miningtime To 1 Step -1
        If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "working..."  )
        Sleep (1000)
    Next
EndFunc
Func randomize()                ; v.231
Global $lag
    $lag=random(0,18,1) ; 1286 = 1,286s
    For $i=$lag to 1 Step -1
        If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "randomize..."  )
        Sleep(1)
    Next
EndFunc 
Func targets_oo()               ; v.231 max.22
    ;; -------------------------------------
    ;; targets() v.300
    ;; -------------------------------------
    ;; erwartet: $target
    ;; gibt aus: warpto target 1-22 
    if $target=1 Then
        MouseClick("left", $clientpos[0]+$target1[0], $clientpos[1]+$target1[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=2 Then
        MouseClick("left", $clientpos[0]+$target2[0], $clientpos[1]+$target2[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=3 Then
        MouseClick("left", $clientpos[0]+$target3[0], $clientpos[1]+$target3[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=4 Then
        MouseClick("left", $clientpos[0]+$target4[0], $clientpos[1]+$target4[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=5 Then
        MouseClick("left", $clientpos[0]+$target5[0], $clientpos[1]+$target5[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=6 Then
        MouseClick("left", $clientpos[0]+$target6[0], $clientpos[1]+$target6[1], 1, 00)
        Sleep (1200)
    EndIf               
    if $target=7 Then
        MouseClick("left", $clientpos[0]+$target7[0], $clientpos[1]+$target7[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=8 Then
        MouseClick("left", $clientpos[0]+$target8[0], $clientpos[1]+$target8[1], 1, 00) 
        Sleep (1200)
    EndIf
    if $target=9 Then
        MouseClick("left", $clientpos[0]+$target9[0], $clientpos[1]+$target9[1], 1, 00) 
        Sleep (1200)
    EndIf
    if $target=10 Then
        MouseClick("left", $clientpos[0]+$target10[0], $clientpos[1]+$target10[1], 1, 00) 
        Sleep (1200)
    EndIf
    if $target=11 Then      
        MouseClick("left", $clientpos[0]+$target11[0], $clientpos[1]+$target11[1], 1, 00) 
        Sleep (1200)
    EndIf
    if $target=12 Then          
        MouseClick("left", $clientpos[0]+$target12[0], $clientpos[1]+$target12[1], 1, 00) 
        Sleep (1200)
    EndIf
    if $target=13 Then          
        MouseClick("left", $clientpos[0]+$target13[0], $clientpos[1]+$target13[1], 1, 00) 
        Sleep (1200)
    EndIf   
    if $target=14 Then          
        MouseClick("left", $clientpos[0]+$target14[0], $clientpos[1]+$target14[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=15 Then          
        MouseClick("left", $clientpos[0]+$target15[0], $clientpos[1]+$target15[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=16 Then          
        MouseClick("left", $clientpos[0]+$target16[0], $clientpos[1]+$target16[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=17 Then          
        MouseClick("left", $clientpos[0]+$target17[0], $clientpos[1]+$target17[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=18 Then          
        MouseClick("left", $clientpos[0]+$target18[0], $clientpos[1]+$target18[1], 1, 00)
        Sleep (1200)
    EndIf               
    if $target=19 Then          
        MouseClick("left", $clientpos[0]+$target19[0], $clientpos[1]+$target19[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=20 Then          
        MouseClick("left", $clientpos[0]+$target20[0], $clientpos[1]+$target20[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=21 Then          
        MouseClick("left", $clientpos[0]+$target21[0], $clientpos[1]+$target21[1], 1, 00)
        Sleep (1200)
    EndIf
    if $target=22 Then          
        MouseClick("left", $clientpos[0]+$target22[0], $clientpos[1]+$target22[1], 1, 00)
        Sleep (1200)
    EndIf
    ; Func2 warpto
    MouseClick("left", $clientpos[0]+$Func2[0], $clientpos[1]+$Func2[1], 1, $mousespeed) 
EndFunc 
Func targets_oc()               ; v.241 max.22
    ;; -------------------------------------
    ;; targets()
    ;; -------------------------------------
    ;; erwartet: $target
    ;; gibt aus: rechtsklick und linksklick
    ;; (warpto) zu target 1-22  
    if $target=1 Then
        MouseClick("right", $clientpos[0]+$target1[0], $clientpos[1]+$target1[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target1[0]+6, $clientpos[1]+$target1[1]+10, 1, $mousespeed)
    EndIf
    if $target=2 Then
        MouseClick("right", $clientpos[0]+$target2[0], $clientpos[1]+$target2[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target2[0]+6, $clientpos[1]+$target2[1]+10, 1, $mousespeed)
    EndIf
    if $target=3 Then
        MouseClick("right", $clientpos[0]+$target3[0], $clientpos[1]+$target3[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target3[0]+6, $clientpos[1]+$target3[1]+10, 1, $mousespeed)
    EndIf
    if $target=4 Then
        MouseClick("right", $clientpos[0]+$target4[0], $clientpos[1]+$target4[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target4[0]+6, $clientpos[1]+$target4[1]+10, 1, $mousespeed)
    EndIf
    if $target=5 Then
        MouseClick("right", $clientpos[0]+$target5[0], $clientpos[1]+$target5[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target5[0]+6, $clientpos[1]+$target5[1]+10, 1, $mousespeed)
    EndIf
    if $target=6 Then
        MouseClick("right", $clientpos[0]+$target6[0], $clientpos[1]+$target6[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target6[0]+6, $clientpos[1]+$target6[1]+10, 1, $mousespeed)
    EndIf               
    if $target=7 Then
        MouseClick("right", $clientpos[0]+$target7[0], $clientpos[1]+$target7[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target7[0]+6, $clientpos[1]+$target7[1]+10, 1, $mousespeed)
    EndIf
    if $target=8 Then
        MouseClick("right", $clientpos[0]+$target8[0], $clientpos[1]+$target8[1], 1, $mousespeed) 
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target8[0]+6, $clientpos[1]+$target8[1]+10, 1, $mousespeed)
    EndIf
    if $target=9 Then
        MouseClick("right", $clientpos[0]+$target9[0], $clientpos[1]+$target9[1], 1, $mousespeed) 
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target9[0]+6, $clientpos[1]+$target9[1]+10, 1, $mousespeed)
    EndIf
    if $target=10 Then
        MouseClick("right", $clientpos[0]+$target10[0], $clientpos[1]+$target10[1], 1, $mousespeed) 
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target10[0]+6, $clientpos[1]+$target10[1]+10, 1, $mousespeed)
    EndIf
    if $target=11 Then      
        MouseClick("right", $clientpos[0]+$target11[0], $clientpos[1]+$target11[1], 1, $mousespeed) 
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target11[0]+6, $clientpos[1]+$target11[1]+10, 1, $mousespeed)
    EndIf
    if $target=12 Then          
        MouseClick("right", $clientpos[0]+$target12[0], $clientpos[1]+$target12[1], 1, 00) 
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target12[0]+6, $clientpos[1]+$target12[1]+10, 1, $mousespeed)
    EndIf
    if $target=13 Then          
        MouseClick("right", $clientpos[0]+$target13[0], $clientpos[1]+$target13[1], 1, 00) 
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target13[0]+6, $clientpos[1]+$target13[1]+10, 1, $mousespeed)
    EndIf   
    if $target=14 Then          
        MouseClick("right", $clientpos[0]+$target14[0], $clientpos[1]+$target14[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target14[0]+6, $clientpos[1]+$target14[1]+10, 1, $mousespeed)
    EndIf
    if $target=15 Then          
        MouseClick("right", $clientpos[0]+$target15[0], $clientpos[1]+$target15[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target15[0]+6, $clientpos[1]+$target15[1]+10, 1, $mousespeed)
    EndIf
    if $target=16 Then          
        MouseClick("right", $clientpos[0]+$target16[0], $clientpos[1]+$target16[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target16[0]+6, $clientpos[1]+$target16[1]+10, 1, $mousespeed)
    EndIf
    if $target=17 Then          
        MouseClick("right", $clientpos[0]+$target17[0], $clientpos[1]+$target17[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target17[0]+6, $clientpos[1]+$target17[1]+10, 1, $mousespeed)
    EndIf
    if $target=18 Then          
        MouseClick("right", $clientpos[0]+$target18[0], $clientpos[1]+$target18[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target18[0]+6, $clientpos[1]+$target18[1]+10, 1, $mousespeed)
    EndIf               
    if $target=19 Then          
        MouseClick("right", $clientpos[0]+$target19[0], $clientpos[1]+$target19[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target19[0]+6, $clientpos[1]+$target19[1]+10, 1, $mousespeed)
    EndIf
    if $target=20 Then          
        MouseClick("right", $clientpos[0]+$target20[0], $clientpos[1]+$target20[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target20[0]+6, $clientpos[1]+$target20[1]+10, 1, $mousespeed)
    EndIf
    if $target=21 Then          
        MouseClick("right", $clientpos[0]+$target21[0], $clientpos[1]+$target21[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target21[0]+6, $clientpos[1]+$target21[1]+10, 1, $mousespeed)
    EndIf
    if $target=22 Then          
        MouseClick("right", $clientpos[0]+$target22[0], $clientpos[1]+$target22[1], 1, 00)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target22[0]+6, $clientpos[1]+$target22[1]+10, 1, $mousespeed)
    EndIf
EndFunc 
Func underfire()                ; v.280
    $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1])
    If $w1standort < 16000000 Then ;d.h. im All
        $underfire8=PixelGetColor ($clientpos[0]+$underfire80[0], $clientpos[1]+$underfire80[1])
        $underfire9=PixelGetColor ($clientpos[0]+$underfire95[0], $clientpos[1]+$underfire95[1])
        $underfire5=PixelGetColor ($clientpos[0]+$underfire50[0], $clientpos[1]+$underfire50[1])
        If $debug=1 Then logwrite("underfire() 5  ; " & $underfire5 )
        If $debug=1 Then logwrite("underfire() 8  ; " & $underfire8 )
        If $debug=1 Then logwrite("underfire() 9  ; " & $underfire9 )
        If $underfire9>11970000 and $underfire9<12770000 Then
;~          If $infodisplay=1 Then ToolTip ( $underfire9, $infowindow[0], $infowindow[1], "shields ok"  )
;~          Sleep (200)
            $shieldstatus=95            
;~      ElseIf $underfire9>14290000 Then
;~          If $infodisplay=1 Then ToolTip ( $underfire9, $infowindow[0], $infowindow[1], "shields ok"  )
;~          Sleep (200)
;~          $shieldstatus=95            
        ElseIf $underfire8>12698000 and $underfire8<12699000 Then
            If $infodisplay=1 Then ToolTip ( $underfire8, $infowindow[0], $infowindow[1], "shields 80%"  )
;~          Sleep (200)
            $shieldstatus=80
        
        
        ElseIf $underfire5>13610000 and $underfire5<131620000 Then
;~          If $infodisplay=1 Then ToolTip ( $underfire5, $infowindow[0], $infowindow[1], "shields 50%"  )
;~          Sleep (200)
            $shieldstatus=50            
        ElseIf $underfire5>13610000 Then
            If $infodisplay=1 Then ToolTip ( $underfire5, $infowindow[0], $infowindow[1], "shields <50%"  )
;~          Sleep (200)
            $shieldstatus=49            
        EndIf       
        If $debug=1 Then logwrite("shieldstatus   ; " & $shieldstatus )
;~      If $debug=1 Then Sleep (10000)
        For $i = 1 to 2
            If $shieldstatus<80 Then
    ;~          ;Select medslots and activate
    ;~          $w1ms1=1 ;1=on 0=off
    ;~          $w1ms2=1 ;1=on 0=off
    ;~          if $w1ms1=1 Then
                    $w1ms1=PixelGetColor ($clientpos[0]+$medslot1[0], $clientpos[1]+$medslot1[1]) ;w3(711,779)
    ;~              if $w1ms1<1700000 Then ;sensorbooster ;1776411
                    if $w1ms1=$msinactivecolor Then ;sensorbooster ;1776411
                        If $debug=1 Then logwrite("activate boost ; " & $w1ms1 )
;~                      If $infodisplay=1 Then ToolTip ( $w1ms1, $infowindow[0], $infowindow[1], "activate booster"  )
                        Send ("{ALTDOWN}")
                        Send ("{F1}")
                        Send ("{ALTUP}")
                    EndIf
    ;~          EndIf
;~          ; Emergency Warp Out
;~              if $client=1 then $w1status=8
;~              if $client=2 then $w2status=8
;~              if $client=3 then $w3status=8
;~              if $client=4 then $w4status=8
;~              if $client=5 then $w5status=8       
;~              if $client=6 then $w6status=8       
;~              if $client=7 then $w7status=8       
;~              if $client=8 then $w8status=8       
;~              if $client=9 then $w9status=8       
;~              if $client=10 then $w10status=8 
            EndIf
            If $shieldstatus>80 Then        
                ;deactivate medslot1
                $w1ms1=PixelGetColor ($clientpos[0]+$medslot1[0], $clientpos[1]+$medslot1[1]) ;w3(711,779)
;~              if $w1ms1>1700000 Then ;msinactivecolor ;sensorbooster
                if $w1ms1<>$msinactivecolor Then ;msinactivecolor ;sensorbooster
                    If $infodisplay=1 Then ToolTip ( $w1ms1, $infowindow[0], $infowindow[1], "booster off"  )
;~                  Sleep (600)             
                    Send ("{ALTDOWN}")
                    Send ("{F1}")
                    Send ("{ALTUP}")
                EndIf
            EndIf
        Next
        ;; activateshieldhardener
;~          if $w1ms2=1 Then
                $w1ms2=PixelGetColor ($clientpos[0]+$medslot2[0], $clientpos[1]+$medslot2[1]) ;w3(711,779)
                if $w1ms2=$msinactivecolor Then ;sensorbooster ;1776411
;~              if $w1ms2<1700000 Then ;sensorbooster ;1776411                  
;~                  If $infodisplay=1 Then ToolTip ( $w1ms2, $infowindow[0], $infowindow[1], "activate ms2"  )
;~                  Sleep (600)             
                    Send ("{ALTDOWN}")
                    Send ("{F2}")
                    Send ("{ALTUP}")
                EndIf
;~          EndIf
;~      ;; deactivateshieldhardener
;~          $w1ms2=PixelGetColor ($clientpos[0]+$medslot2[0], $clientpos[1]+$medslot2[1]) ;w3(711,779)
;~          if $w1ms2<>$msinactivecolor Then ;sensorbooster
;~              Send ("{ALTDOWN}")
;~              Send ("{F2}")
;~              Send ("{ALTUP}")
;~          EndIf           
        
    EndIf
EndFunc
Func undock()                   ; v.261
    For $i = 1 to 8
        $RightArrow=PixelGetColor ($clientpos[0]+$RightArrows[0], $clientpos[1]+$RightArrows[1])
        If $RightArrow<>15132390 Then ;15132390 ;0xE6E6E6
            randomize()
            ; press undockbutton
            MouseClick("left", $clientpos[0]+21, $clientpos[1]+767, 1, 1)
            If $debug=1 Then logwrite("undock         ;")
            Sleep (6632)
        EndIf
    Next
;~ ----------------------Test---------------------
;~  If $client=1 then $w1status=99
;~  If $client=2 then $w2status=99
;~  If $client=3 then $w3status=99
;~  If $client=4 then $w4status=99
;~  If $client=5 then $w5status=99
;~  If $client=6 then $w6status=99
;~  If $client=7 then $w7status=99      
;~  If $client=8 then $w8status=99
;~  If $client=9 then $w9status=99
;~  If $client=10 then $w10status=99
;~ -----------------------------------------------
;~  If $debug=1 Then logwrite("undock successful")
    If $client=1 then $w1status=2 ;wtb
    If $client=2 then $w2status=2 ;wtb
    If $client=3 then $w3status=2 ;wtb
    If $client=4 then $w4status=2 ;wtb  
    If $client=5 then $w5status=2 ;wtb      
    If $client=6 then $w6status=2 ;wtb      
    If $client=7 then $w7status=2 ;wtb      
    If $client=8 then $w8status=2 ;wtb      
;~  If $client=9 then $w9status=2 ;wtb      
;~  If $client=10 then $w10status=2 ;wtb    
;~ Reset targetbookmarked status ( free = 0, blocked = 1 )
    If $debug=1 Then logwrite("bmakin' active ; ")
    If $client= 1 then $w1bm_active=1
    If $client= 2 then $w2bm_active=1
    If $client= 3 then $w3bm_active=1
    If $client= 4 then $w4bm_active=1 
    If $client= 5 then $w5bm_active=1 
    If $client= 6 then $w6bm_active=1 
    If $client= 7 then $w7bm_active=1 
    If $client= 8 then $w8bm_active=1
    If $client= 9 then $w9bm_active=1
    If $client=10 then $w10bm_active=1

EndFunc
Func unloadright()              ; v.232
    $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
    if $w1standort > 16000000 Then ;d.h Undock button zu sehen
        ; Open items
        MouseClick("left", 19, 678, 1, $mousespeed)
        ; Open Cargohold
        Send ("{ALTDOWN}")
        Send ("{c}")
        Send ("{ALTUP}")
        Sleep (500)
        ; Drag Cargo to Hangar
        For $i = 1 to 2
            MouseClick("left", $clientpos[0]+616, $clientpos[1]+521, 2, $mousespeed)
            Sleep (500)
            Send ("{CTRLDOWN}")
            Send ("{a}")
            Send ("{CTRLUP}")
            Sleep (200)
            MouseClickDrag("left", $clientpos[0]+616, $clientpos[1]+521, $clientpos[0]+616, $clientpos[1]+707, 1)
            Sleep (500)     
        Next
        ;Stack all
        MouseClick("right", $clientpos[0]+616, $clientpos[1]+707, 1, 0)
        Sleep (1016)
        MouseClick("left", $clientpos[0]+649, $clientpos[1]+788, 1, 0)
;~      Sleep (500)
        ; Close Cargo
        MouseClick("left", $clientpos[0]+726, $clientpos[1]+447, 1, 0)
        If $debug=1 Then LogWrite("unload         ;")
    EndIf   
    Return 11
EndFunc
Func unloadleft()               ; v.250
    $w1standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
    If $w1standort > 16000000 Then ; in station
        checkwarnmeldung()
        Sleep (200)
        ; Open Cargohold
        Send ("{ALTDOWN}")
        Send ("{c}")
        Send ("{ALTUP}")
        ; Get Items Window to front
        MouseClick("left", $clientpos[0]+20, $clientpos[1]+684, 1, 0)
        Sleep (366)
        ; Unload to station Hangar
        For $i = 1 to 2
            CheckCargohold()
            If $cargohold>0 Then
                ; Select all
                MouseClick("right", $clientpos[0]+77, $clientpos[1]+699, 1, $mousespeed+5)
                Sleep (366)
                MouseClick("left", $clientpos[0]+107, $clientpos[1]+757, 1, $mousespeed+5)
                ; Drag Cargo to Hangar (bottom to top, lefthand side)
;~              MouseClick("left", $clientpos[0]+77, $clientpos[1]+700, 2, $mousespeed)
;~              Sleep (50)
;~              Send ("{CTRLDOWN}")
;~              Send ("{a}")
;~              Send ("{CTRLUP}")
                Sleep (200)
                MouseClickDrag("left", $clientpos[0]+77, $clientpos[1]+699, $clientpos[0]+77, $clientpos[1]+496, $mousespeed+5)
                Sleep (1600)        
                ; Stack all
;~              MouseClick("right", $clientpos[0]+77, $clientpos[1]+496, 1, $mousespeed)
;~              Sleep (876)
;~              MouseClick("left", $clientpos[0]+164, $clientpos[1]+661, 1, $mousespeed)
;~              Sleep (500)
;~              Close Cargo
;~              MouseClick("left", $clientpos[0]+282, $clientpos[1]+626, 1, 0)
;~              Sleep (600)
;~              MouseClick("left", $clientpos[0]+282, $clientpos[1]+626, 1, 0)  
                ; Calculate volumes
                If $client=1 then $w1volumen=$w1volumen+$cargohold
                If $client=2 then $w2volumen=$w2volumen+$cargohold
                If $client=3 then $w3volumen=$w3volumen+$cargohold
                If $client=4 then $w4volumen=$w4volumen+$cargohold
                If $client=5 then $w5volumen=$w5volumen+$cargohold
                If $client=6 then $w6volumen=$w6volumen+$cargohold
                If $client=7 then $w7volumen=$w7volumen+$cargohold
                If $client=8 then $w8volumen=$w8volumen+$cargohold
                If $client=9 then $w9volumen=$w9volumen+$cargohold
                If $client=10 then $w10volumen=$w10volumen+$cargohold
            EndIf
        Next
        If $debug=1 Then LogWrite("unload         ; ")
    EndIf
    Return 11   
EndFunc
Func warpbeltov()               ; v.260
    FixOverviewError()
    SelectTab(2)            ;belts
    SelectTab(2)            ;belts
    countbelts()    ; gives targettotal
;~ ----------------------------------------------------------------------------
    If $client=1 Then ; w1Selecttarget()
;~ ----------------------------------------------------------------------------
;~      If $loops=1 Then $w1target=Random (2, $w1targettotal, 1)
;~      If $w1selectmethod=2 Then $w1target=$w1startbelt ; *** baustelle ***
        $w1target=$w1startbelt
;~      If $debug=1 Then logwrite("belt " & $w1target & " " )       
        If $w1selectstyle=1 then ; aufsteigend
            $w1target=$w1target+1
            If $w1target>$w1targettotal or $w1target=1 then 
             $w1target=2
            EndIf
        EndIf
        If $w1selectstyle=2 then ; random
            $w1target=Random (1, $w1targettotal, 1)
        EndIf
        If $w1selectstyle=3 then ; given target
;~          If $w1selectmethod=2 then $w1bookmark=$w1target
;~          $w1target=$w1bookmark+1
;~          $w1selectstyle=1 ;set to default
        EndIf       
        ;Avoid targets/Belts
        If $w1target=$w1targetavoid then $w1target=$w1target+1          
        ;Verallgemeinerung für das targets() Modul
        $target=$w1target
;~ ----------------------------------------------------------------------------
    ElseIf $client=2 Then ; w2Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w2target=Random (2, $w2targettotal, 1)
        $w2target=$w2startbelt
;~      If $debug=1 Then logwrite("belt" & $w2target & " " )        
        If $w2selectstyle=1 then ;aufsteigend
            $w2target=$w2target+1
            If $w2target>$w2targettotal or $w2target=1 then 
             $w2target=2
            EndIf
        EndIf
        If $w2selectstyle=2 then ;random
            $w2target=Random (2, $w2targettotal, 1)
        EndIf
        If $w2selectstyle=3 then ; given target
;~          If $w2selectmethod=2 then $w2bookmark=$w2target
;~          $w2target=$w2bookmark+1
;~          $w2selectstyle=1 ;set to default
        EndIf       
        ;Avoid targets/Belts
        If $w2target=$w2targetavoid then $w2target=$w2target+1          
        ;Verallgemeinerung für das targets() Modul
        $target=$w2target
;~ ----------------------------------------------------------------------------
    ElseIf $client=3 Then ; w3Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w3target=Random (2, $w3targettotal, 1)
        $w3target=$w3startbelt
;~      If $debug=1 Then logwrite("belt " & $w3target & " " )       
        If $w3selectstyle=1 then ;aufsteigend
            $w3target=$w3target+1
            If $w3target>$w3targettotal or $w3target=1 then 
             $w3target=2
            EndIf
        EndIf
        If $w3selectstyle=2 then ;random
            $w3target=Random (2, $w3targettotal, 1)
        EndIf
        If $w3selectstyle=3 then ; given target
;~          If $w3selectmethod=2 then $w3bookmark=$w3target
;~          $w3target=$w3bookmark+1
;~          $w3selectstyle=1 ;set to default
        EndIf       
        ;Avoid targets/Belts
        If $w3target=$w3targetavoid then $w3target=$w3target+1          
        ;Verallgemeinerung für das targets() Modul
        $target=$w3target
;~ ----------------------------------------------------------------------------
    ElseIf $client=4 Then ; w4Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w4target=Random (2, $w4targettotal, 1)
        $w4target=$w4startbelt
;~      If $debug=1 Then logwrite("belt " & $w4target & " " )       
        If $w4selectstyle=1 then ;aufsteigend
            $w4target=$w4target+1
            If $w4target>$w4targettotal or $w4target=1 then 
             $w4target=2
            EndIf
        EndIf
        If $w4selectstyle=2 then ;random
            $w4target=Random (2, $w4targettotal, 1)
        EndIf
        If $w4selectstyle=3 then ; given target
;~          If $w4selectmethod=2 then $w4bookmark=$w4target
;~          $w4target=$w4bookmark+1
;~          $w4selectstyle=1 ;set to default
        EndIf       
        ;Avoid targets/Belts
        If $w4target=$w4targetavoid then $w4target=$w4target+1          
        ;Verallgemeinerung für das targets() Modul
        $target=$w4target
;~ ----------------------------------------------------------------------------
    ElseIf $client=5 Then ; w5Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w5target=Random (2, $w5targettotal, 1)
        $w5target=$w5startbelt
;~      If $debug=1 Then logwrite("belt " & $w5target & " " )       
        If $w5selectstyle=1 then ;aufsteigend
            $w5target=$w5target+1
            If $w5target>$w5targettotal or $w5target=1 then 
             $w5target=2
            EndIf
        EndIf
        If $w5selectstyle=2 then ;random
            $w5target=Random (2, $w5targettotal, 1)
        EndIf
        If $w5selectstyle=3 then ; given target
;~          If $w5selectmethod=2 then $w5bookmark=$w5target
;~          $w5target=$w5bookmark+1
;~          $w5selectstyle=1 ;set to default
        EndIf       
        ;Avoid targets/Belts
        If $w5target=$w5targetavoid then $w5target=$w5target+1          
        ;Verallgemeinerung für das targets() Modul
        $target=$w5target
;~ ---------------------------------------------------------------------------- 
    ElseIf $client=6 Then ; w6Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w6target=Random (2, $w6targettotal, 1)
        $w6target=$w6startbelt
;~      If $debug=1 Then logwrite("belt " & $w6target & " " )       
        If $w6selectstyle=1 then ;aufsteigend
            $w6target=$w6target+1
            If $w6target>$w6targettotal or $w6target=1 then 
             $w6target=2
            EndIf
        EndIf
        If $w6selectstyle=2 then ;random
            $w6target=Random (2, $w6targettotal, 1)
        EndIf
        If $w6selectstyle=3 then ; given target
;~          If $w6selectmethod=2 then $w6bookmark=$w6target
;~          $w6target=$w6bookmark+1
;~          $w6selectstyle=1 ;set to default
        EndIf       
        ;Avoid targets/Belts
        If $w6target=$w6targetavoid then $w6target=$w6target+1          
        ;Verallgemeinerung für das targets() Modul
        $target=$w6target
;~ ----------------------------------------------------------------------------
    ElseIf $client=7 Then ; w7Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w7target=Random (2, $w7targettotal, 1)
        $w7target=$w7startbelt
;~      If $debug=1 Then logwrite("belt " & $w7target & " " )       
        If $w7selectstyle=1 then ;aufsteigend
            $w7target=$w7target+1
            If $w7target>$w7targettotal or $w7target=1 then 
             $w7target=2
            EndIf
        EndIf
        If $w7selectstyle=2 then ;random
            $w7target=Random (2, $w7targettotal, 1)
        EndIf
        If $w7selectstyle=3 then ; given target
;~          If $w7selectmethod=2 then $w7bookmark=$w7target
;~          $w7target=$w7bookmark+1
;~          $w7selectstyle=1 ;set to default
        EndIf       
        ;Avoid targets/Belts
        If $w7target=$w7targetavoid then $w7target=$w7target+1          
        ;Verallgemeinerung für das targets() Modul
        $target=$w7target
;~ ----------------------------------------------------------------------------
    ElseIf $client=8 Then ; w8Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w8target=Random (2, $w8targettotal, 1)
        $w8target=$w8startbelt
;~      If $debug=1 Then logwrite("belt " & $w8target & " " )       
        If $w8selectstyle=1 then ;aufsteigend
            $w8target=$w8target+1
            If $w8target>$w8targettotal then 
             $w8target=2
            EndIf
        EndIf
        If $w8selectstyle=2 then ;random
            $w8target=Random (2, $w8targettotal, 1)
        EndIf
        If $w8selectstyle=3 then ; given target
;~          If $w8selectmethod=2 then $w8bookmark=$w8target
;~          $w8target=$w8bookmark+1
;~          $w8selectstyle=1 ;set to default
        EndIf       
;~      ;Avoid targets/Belts
        If $w8target=$w8targetavoid then $w8target=$w8target+1          
;~      ;Verallgemeinerung für das targets() Modul
        $target=$w8target
;~ ----------------------------------------------------------------------------
    ElseIf $client=9 Then ; w9Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w9target=Random (2, $w9targettotal, 1)
;~      $w9target=$w9startbelt
;~      If $debug=1 Then logwrite("belt " & $w9target & " " )       
;~      If $w9selectstyle=1 then ;aufsteigend
;~          $w9target=$w9target+1
;~          If $w9target>$w9targettotal then 
;~           $w9target=2
;~          EndIf
;~      EndIf
;~      If $w9selectstyle=2 then ;random
;~          $w9target=Random (2, $w9targettotal, 1)
;~      EndIf
;~      If $w9selectstyle=3 then ; given target
;~          If $w9selectmethod=2 then $w9bookmark=$w9target
;~          $w9target=$w9bookmark+1
;~          $w9selectstyle=1 ;set to default
;~      EndIf   
;~      ;Avoid targets/Belts
;~      If $w9target=$w9targetavoid then $w9target=$w9target+1          
;~      ;Verallgemeinerung für das targets() Modul
;~      $target=$w9target
;~ ----------------------------------------------------------------------------
    ElseIf $client=10 Then ; w10Selecttarget()
;~ ----------------------------------------------------------------------------         
;~      If $loops=1 Then $w10target=Random (2, $w10targettotal, 1)
;~      $w10target=$w10startbelt
;~      If $debug=1 Then logwrite("belt " & $w10target & " " )      
;~      If $w10selectstyle=1 then ;aufsteigend
;~          $w10target=$w10target+1
;~          If $w10target>$w10targettotal then 
;~           $w10target=2
;~          EndIf
;~      EndIf
;~      If $w10selectstyle=2 then ;random
;~          $w10target=Random (2, $w10targettotal, 1)
;~      EndIf
;~      If $w10selectstyle=3 then ; given target
;~          If $w10selectmethod=2 then $w10bookmark=$w10target
;~          $w10target=$w10bookmark+1
;~          $w10selectstyle=1 ;set to default
;~      EndIf   
;~      ;Avoid targets/Belts
;~      If $w10target=$w10targetavoid then $w10target=$w10target+1          
;~      ;Verallgemeinerung für das targets() Modul
;~      $target=$w10target
;~ ----------------------------------------------------------------------------
    EndIf

    If $selecteditemswindowstatus="open" Then targets_oo()
    If $selecteditemswindowstatus="closed" Then targets_oc()

;;  Func warpEntry()
;~ -------------------------------------------------
;~  Sleep (5000)
;~  For $i = 1 to 2
;~      $warping1=PixelGetColor($clientpos[0]+526, $clientpos[1]+748) 
;~      If $warping1>=1910834 And $warping1<=5263439 Then
;~          If $infodisplay=1 Then ToolTip ( $warping1, $infowindow[0], $infowindow[1], "warp ok"  )
;~          Sleep (10)
            If $client= 1 then $w1status= 99
            If $client= 2 then $w2status= 99
            If $client= 3 then $w3status= 99 
            If $client= 4 then $w4status= 99 
            If $client= 5 then $w5status= 99 
            If $client= 6 then $w6status= 99 
            If $client= 7 then $w7status= 99 
            If $client= 8 then $w8status= 99 
            If $client= 9 then $w9status= 99 
            If $client=10 then $w10status=99 
;~      EndIf
;~  Next
;~ -------------------------------------------------
;~      ;~ Reset targetbookmarked status ( free = 0, blocked = 1 )
;~          If $client= 1 then $w1bm_active=1
;~          If $client= 2 then $w2bm_active=1
;~          If $client= 3 then $w3bm_active=1
;~          If $client= 4 then $w4bm_active=1 
;~          If $client= 5 then $w5bm_active=1 
;~          If $client= 6 then $w6bm_active=1 
;~          If $client= 7 then $w7bm_active=1 
;~          If $client= 8 then $w8bm_active=1
;~          If $client= 9 then $w9bm_active=1
;~          If $client=10 then $w10bm_active=1
    
    If $debug=1 And $infodisplay=1 Then ToolTip ( $target, $infowindow[0], $infowindow[1], "ov selected")
;~  If $debug=1 Then Sleep (1000)
    If $debug=1 Then LogWrite("warp to ov     ; " & $target & " ")
EndFunc 
Func warpbeltbm()               ; v.260
    countbookmarks()  ; gives bookmarktotal
  ; Öffne P&P
    MouseClick("left", $clientpos[0]+20, $clientpos[1]+200, 1, 0)    
    Sleep (2000)
    If $client=1 Then
        If $loops=1 Then $w1bookmark=Random (2, $w1bookmarktotal, 1)
;~      If $loops=1 Then $w1bookmark=9 ; Test für BM10
;~      If $debug=1 Then logwrite("bm " & $w1bookmark & " " )
        If $w1selectstyle=1 then    ; one by one
            $w1bookmark=$w1bookmark+1
            If $w1bookmark>$w1bookmarktotal or $w1bookmark=1 Then 
             $w1bookmark=2              ; 1=station, 2=first belt
            EndIf
        EndIf   
        If $w1selectstyle=2 then    ; random
            $w1bookmark=Random (2, $w1bookmarktotal, 1)
        EndIf
        $bookmark=$w1bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=2 Then
        If $loops=1 Then $w2bookmark=Random (2, $w2bookmarktotal, 1)
        If $w2selectstyle=1 then 
            $w2bookmark=$w2bookmark+1
            If $w2bookmark>$w2bookmarktotal or $w2bookmark=1 then 
             $w2bookmark=2
            EndIf
        EndIf   
        If $w2selectstyle=2 then    ; random
            $w2bookmark=Random (2, $w2bookmarktotal, 1)
        EndIf
        $bookmark=$w2bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=3 Then
        If $loops=1 Then $w3bookmark=Random (2, $w3bookmarktotal, 1)
        If $w3selectstyle=1 then 
            $w3bookmark=$w3bookmark+1
            If $w3bookmark>$w3bookmarktotal or $w3bookmark=1 then 
             $w3bookmark=2 
            EndIf
        EndIf   
        If $w3selectstyle=2 then    ; random
            $w3bookmark=Random (2, $w3bookmarktotal, 1)
        EndIf       
        $bookmark=$w3bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=4 Then
        If $loops=1 Then $w4bookmark=Random (2, $w4bookmarktotal, 1)
        If $w4selectstyle=1 then 
            $w4bookmark=$w4bookmark+1
            If $w4bookmark>$w4bookmarktotal or $w4bookmark=1 then 
             $w4bookmark=2 
            EndIf
        EndIf   
        If $w4selectstyle=2 then    ; random
            $w4bookmark=Random (2, $w4bookmarktotal, 1)
        EndIf       
        $bookmark=$w4bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=5 Then
        If $loops=1 Then $w5bookmark=Random (2, $w5bookmarktotal, 1)
        If $w5selectstyle=1 then 
            $w5bookmark=$w5bookmark+1
            If $w5bookmark>$w5bookmarktotal or $w5bookmark=1 then 
             $w5bookmark=2 
            EndIf
        EndIf   
        If $w5selectstyle=2 then    ; random
            $w5bookmark=Random (2, $w5bookmarktotal, 1)
        EndIf       
        $bookmark=$w5bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=6 Then
        If $loops=1 Then $w6bookmark=Random (2, $w6bookmarktotal, 1)
        If $w6selectstyle=1 then 
            $w6bookmark=$w6bookmark+1
            If $w6bookmark>$w6bookmarktotal or $w6bookmark=1 then 
             $w6bookmark=2 
            EndIf
        EndIf   
        If $w6selectstyle=2 then    ; random
            $w6bookmark=Random (2, $w6bookmarktotal, 1)
        EndIf       
        $bookmark=$w6bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=7 Then
        If $loops=1 Then $w7bookmark=Random (2, $w7bookmarktotal, 1)
        If $w7selectstyle=1 then 
            $w7bookmark=$w7bookmark+1
            If $w7bookmark>$w7bookmarktotal or $w7bookmark=1 then 
             $w7bookmark=2 
            EndIf
        EndIf   
        If $w7selectstyle=2 then    ; random
            $w7bookmark=Random (2, $w7bookmarktotal, 1)
        EndIf       
        $bookmark=$w7bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=8 Then
        If $loops=1 Then $w8bookmark=Random (2, $w8bookmarktotal, 1)
        If $w8selectstyle=1 then 
            $w8bookmark=$w8bookmark+1
            If $w8bookmark>$w8bookmarktotal or $w8bookmark=1 then 
             $w8bookmark=2 
            EndIf
        EndIf   
        If $w8selectstyle=2 then    ; random
            $w8bookmark=Random (2, $w8bookmarktotal, 1)
        EndIf       
        $bookmark=$w8bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=9 Then
;~      If $loops=1 Then $w9bookmark=Random (2, $w9bookmarktotal, 1)
;~      If $w9selectstyle=1 then 
;~          $w9bookmark=$w9bookmark+1
;~          If $w9bookmark>$w9bookmarktotal or $w9bookmark=1 then 
;~           $w9bookmark=2 
;~          EndIf
;~      EndIf   
;~      If $w9selectstyle=2 then    ; random
;~          $w9bookmark=Random (2, $w9bookmarktotal, 1)
;~      EndIf       
;~      $bookmark=$w9bookmark ; generalise for modul bookmarks()
    EndIf
    If $client=10 Then
;~      If $loops=1 Then $w10bookmark=Random (2, $w10bookmarktotal, 1)
;~      If $w10selectstyle=1 then 
;~          $w10bookmark=$w10bookmark+1
;~          If $w10bookmark>$w10bookmarktotal or $w10bookmark=1 then 
;~           $w10bookmark=2 
;~          EndIf
;~      EndIf   
;~      If $w10selectstyle=2 then   ; random
;~          $w10bookmark=Random (2, $w10bookmarktotal, 1)
;~      EndIf       
;~      $bookmark=$w10bookmark ; generalise for modul bookmarks()
    EndIf
    ; warp to selected $bookmark
    Bookmarks()
    ; set status to unknown for next loop
    if $client=1 then $w1status=99
    if $client=2 then $w2status=99
    if $client=3 then $w3status=99
    if $client=4 then $w4status=99
    if $client=5 then $w5status=99
    if $client=6 then $w6status=99
    if $client=7 then $w7status=99
    if $client=8 then $w8status=99
    if $client=9 then $w9status=99
    if $client=10 then $w10status=99
;~  Return 99
    ; reset targetbookmarked status ( free = 0, blocked = 1 )
;~  If $client= 1 then $w1bm_active=1
;~  If $client= 2 then $w2bm_active=1
;~  If $client= 3 then $w3bm_active=1
;~  If $client= 4 then $w4bm_active=1 
;~  If $client= 5 then $w5bm_active=1 
;~  If $client= 6 then $w6bm_active=1 
;~  If $client= 7 then $w7bm_active=1 
;~  If $client= 8 then $w8bm_active=1
;~  If $client= 9 then $w9bm_active=1
;~  If $client=10 then $w10bm_active=1  
    
    If $debug=1 And $infodisplay=1 Then ToolTip ( $bookmark, $infowindow[0], $infowindow[1], "bm selected ")
;~  If $debug=1 Then Sleep (1000)
    If $debug=1 Then logwrite( "warp to bm     ; " & $bookmark & " ")
EndFunc
Func warpentry()                ; v.222
    For $warpEntryCycles = 1 to 100
        $warping1=PixelGetColor($clientpos[0]+526, $clientpos[1]+748) 
        If $warping1>=1910834 And $warping1<=5263439 Then
            If $infodisplay=1 Then ToolTip ( $warping1, $infowindow[0], $infowindow[1], "warp ok"  )
            Sleep (10)
            $warpstatus=1
;~          $i=20
        Else
            If $infodisplay=1 Then ToolTip ( $warping1, $infowindow[0], $infowindow[1], "warp not ok"  )
            Sleep (10)
            $warpstatus=0
        EndIf
    Next
EndFunc
Func warpWait()                 ; v.251
    $standort=PixelGetColor($clientpos[0]+$undockbutton[0], $clientpos[1]+$undockbutton[1]) 
    If $standort < 16000000 Then ;in space  
        For $i = 1 to 1500
            $warping1=PixelGetColor($clientpos[0]+526, $clientpos[1]+748) 
            If $Warping1>=1910834 And $Warping1<5197647 Then ;AMD
;~          If $warping1>=1910834 And $warping1<=5263439 Then ;INTEL
                If $infodisplay=1 Then ToolTip ( $warping1, $infowindow[0], $infowindow[1], "wda"  )
                Sleep (100)
                If $debug=1 Then logwrite("warpWait()     ; " & $warping1)
                $warpstatus=1
            EndIf
        Next
        
        Sleep (2428) ; wait after warp finished
        $warpstatus=0
    EndIf   
EndFunc
;; analyze func
Func countbookmarks()           ; v.272 [24]
Local $countedbm=0
;~ Global $bm01[2] = [72,182] ; Measurementpoint
Global $bm01[2] = [56,182] ; Measurementpoint
;check bookmarksymbol in P&P
$countbm01=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+0*19)  ;72,182
$countbm02=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+1*19)
$countbm03=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+2*19)
$countbm04=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+3*19)
$countbm05=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+4*19)
$countbm06=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+5*19)
$countbm07=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+6*19)
$countbm08=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+7*19)
$countbm09=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+8*19)
$countbm10=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+9*19)
$countbm11=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+10*19)
$countbm12=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+11*19)
$countbm13=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+12*19)
$countbm14=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+13*19)
$countbm15=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+14*19)
$countbm16=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+15*19)
$countbm17=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+16*19)
$countbm18=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+17*19)
$countbm19=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+18*19)
$countbm20=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+19*19)
$countbm21=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+20*19)
$countbm22=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+21*19)
$countbm23=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+22*19)
$countbm24=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+23*19)
$countbm25=PixelGetColor ($clientpos[0]+$bm01[0], $clientpos[1]+$bm01[1]+24*19)
;verify bookmarksymbol in P&P
$countbm01verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+0*19)  ;76,181
$countbm02verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+1*19)
$countbm03verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+2*19)
$countbm04verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+3*19)
$countbm05verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+4*19)
$countbm06verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+5*19)
$countbm07verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+6*19)
$countbm08verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+7*19)
$countbm09verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+8*19)
$countbm10verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+9*19)
$countbm11verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+10*19)
$countbm12verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+11*19)
$countbm13verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+12*19)
$countbm14verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+13*19)
$countbm15verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+14*19)
$countbm16verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+15*19)
$countbm17verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+16*19)
$countbm18verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+17*19)
$countbm19verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+18*19)
$countbm20verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+19*19)
$countbm21verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+20*19)
$countbm22verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+21*19)
$countbm23verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+22*19)
$countbm24verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+23*19)
$countbm25verify=PixelGetColor ($clientpos[0]+$bm01[0]+4, $clientpos[1]+$bm01[1]-1+24*19)
;~      If $infodisplay=1 Then ToolTip ( $countbm14, $infowindow[0], $infowindow[1], "$countbm14"  )
;~      Sleep (2000)
;~      If $infodisplay=1 Then ToolTip ( $countbm14verify, $infowindow[0], $infowindow[1], "$countbm14verify"  )
;~      Sleep (2000)
    If $countbm24>15200000 and $countbm24verify>15400000 Then
        $countedbm=24       
    ElseIf $countbm23>15200000 and $countbm23verify>15400000 Then
        $countedbm=23       
    ElseIf $countbm22>15200000 and $countbm22verify>15400000 Then
        $countedbm=22       
    ElseIf $countbm21>15200000 and $countbm21verify>15400000 Then
        $countedbm=21       
    ElseIf $countbm20>15200000 and $countbm20verify>15400000 Then
        $countedbm=20
    ElseIf $countbm19>15200000 and $countbm19verify>15400000 Then
        $countedbm=19       
    ElseIf $countbm18>15200000 and $countbm18verify>15400000 Then
        $countedbm=18
    ElseIf $countbm17>15200000 and $countbm17verify>15400000 Then
        $countedbm=17       
    ElseIf $countbm16>15200000 and $countbm16verify>15400000 Then
        $countedbm=16
    ElseIf $countbm15>15200000 and $countbm15verify>15400000 Then
        $countedbm=15       
    ElseIf $countbm14>15200000 and $countbm14verify>15400000 Then
        $countedbm=14       
    ElseIf $countbm13>15200000 and $countbm13verify>15400000 Then
        $countedbm=13           
    ElseIf $countbm12>15200000  and $countbm12verify>15400000 Then
        $countedbm=12           
    ElseIf $countbm11>15200000  and $countbm11verify>15400000 Then
        $countedbm=11           
    ElseIf $countbm10>15200000  and $countbm10verify>15400000 Then
        $countedbm=10           
    ElseIf $countbm09>15200000  and $countbm09verify>15400000 Then
        $countedbm=9            
    ElseIf $countbm08>15200000  and $countbm08verify>15400000 Then
        $countedbm=8            
    ElseIf $countbm07>15200000  and $countbm07verify>15400000 Then
        $countedbm=7            
    ElseIf $countbm06>15200000  and $countbm06verify>15400000 Then
        $countedbm=6            
    ElseIf $countbm05>15200000  and $countbm05verify>15400000 Then
        $countedbm=5            
    ElseIf $countbm04>15200000  and $countbm04verify>15400000 Then
        $countedbm=4            
    ElseIf $countbm03>15200000  and $countbm03verify>15400000 Then
        $countedbm=3            
    ElseIf $countbm02>15200000  and $countbm02verify>15400000 Then
        $countedbm=2            
    ElseIf $countbm01>15200000  and $countbm01verify>15400000 Then
        $countedbm=1            
    EndIf
    ; individualize for client
    If $client=1 then $w1bookmarktotal=$countedbm
    If $client=2 then $w2bookmarktotal=$countedbm
    If $client=3 then $w3bookmarktotal=$countedbm 
    If $client=4 then $w4bookmarktotal=$countedbm 
    If $client=5 then $w5bookmarktotal=$countedbm       
    If $client=6 then $w6bookmarktotal=$countedbm       
    If $client=7 then $w7bookmarktotal=$countedbm       
    If $client=8 then $w8bookmarktotal=$countedbm       
;~  If $client=9 then $w9bookmarktotal=$countedbm   
;~  If $client=10 then $w10bookmarktotal=$countedbm
    If $infodisplay=1 Then ToolTip ( $countedbm, $infowindow[0], $infowindow[1], "countedbm"  )
    If $debug=1 Then logwrite("countedbm      ; " & $countedbm)
EndFunc
Func countbelts()               ; v.280 [25]
Local $countedbelts=0
Global $triangle01[2] = [$openovarrow[0]+3,$openovarrow[1]+56]      ; 770,127 standard position Measurementpoint
;~ Global $triangle01[2] = [$openovarrow[0]+3,$openovarrow[1]+56]   ; 786,111 upper right corner Measurementpoint
;check trianglesymbol in overview
$counttriangle01=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+0*19)  ; upper right corner 786,111
$counttriangle02=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+1*19)  ; upper right corner 786,130
$counttriangle03=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+2*19)
$counttriangle04=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+3*19)
$counttriangle05=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+4*19)
$counttriangle06=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+5*19)
$counttriangle07=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+6*19)
$counttriangle08=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+7*19)
$counttriangle09=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+8*19)
$counttriangle10=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+9*19)
$counttriangle11=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+10*19)
$counttriangle12=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+11*19)
$counttriangle13=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+12*19)
$counttriangle14=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+13*19)
$counttriangle15=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+14*19)
$counttriangle16=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+15*19)
$counttriangle17=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+16*19)
$counttriangle18=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+17*19)
$counttriangle19=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+18*19)
$counttriangle20=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+19*19)
$counttriangle21=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+20*19)
$counttriangle22=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+21*19)
$counttriangle23=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+22*19)
$counttriangle24=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+23*19)
$counttriangle25=PixelGetColor ($clientpos[0]+$triangle01[0], $clientpos[1]+$triangle01[1]+24*19)
;verify trianglesymbol in overview
$counttriangle01verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+0*19)  ;790,113
$counttriangle02verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+1*19)
$counttriangle03verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+2*19)
$counttriangle04verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+3*19)
$counttriangle05verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+4*19)
$counttriangle06verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+5*19)
$counttriangle07verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+6*19)
$counttriangle08verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+7*19)
$counttriangle09verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+8*19)
$counttriangle10verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+9*19)
$counttriangle11verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+10*19)
$counttriangle12verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+11*19)
$counttriangle13verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+12*19)
$counttriangle14verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+13*19)
$counttriangle15verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+14*19)
$counttriangle16verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+15*19)
$counttriangle17verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+16*19)
$counttriangle18verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+17*19)
$counttriangle19verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+18*19)
$counttriangle20verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+19*19)
$counttriangle21verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+20*19)
$counttriangle22verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+21*19)
$counttriangle23verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+22*19)
$counttriangle24verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+23*19)
$counttriangle25verify=PixelGetColor ($clientpos[0]+$triangle01[0]+4, $clientpos[1]+$triangle01[1]+2+24*19)

;~      If $infodisplay=1 Then ToolTip ( $counttarget01, $infowindow[0], $infowindow[1], "$counttarget01"  )
;~      Sleep (2000)
;~      If $infodisplay=1 Then ToolTip ( $counttarget01verify, $infowindow[0], $infowindow[1], "$counttarget01verify"  )
;~      Sleep (2000)
    
    If $counttriangle25=$white And $counttriangle25verify=$white Then
        $countedbelts=25        
    ElseIf $counttriangle24=$white And $counttriangle24verify=$white Then
        $countedbelts=24
    ElseIf $counttriangle23=$white And $counttriangle23verify=$white Then
        $countedbelts=23    
    ElseIf $counttriangle22=$white And $counttriangle22verify=$white Then
        $countedbelts=22
    ElseIf $counttriangle21=$white And $counttriangle21verify=$white Then
        $countedbelts=21        
    ElseIf $counttriangle20=$white And $counttriangle20verify=$white Then
        $countedbelts=20
    ElseIf $counttriangle19=$white And $counttriangle19verify=$white Then
        $countedbelts=19    
    ElseIf $counttriangle18=$white And $counttriangle18verify=$white Then
        $countedbelts=18
    ElseIf $counttriangle17=$white And $counttriangle17verify=$white Then
        $countedbelts=17    
    ElseIf $counttriangle16=$white And $counttriangle16verify=$white Then
        $countedbelts=16
    ElseIf $counttriangle15=$white And $counttriangle15verify=$white Then
        $countedbelts=15    
    ElseIf $counttriangle14=$white And $counttriangle14verify=$white Then
        $countedbelts=14
    ElseIf $counttriangle13=$white And $counttriangle13verify=$white Then
        $countedbelts=13    
    ElseIf $counttriangle12=$white And $counttriangle12verify=$white Then
        $countedbelts=12
    ElseIf $counttriangle11=$white And $counttriangle11verify=$white Then
        $countedbelts=11        
    ElseIf $counttriangle10=$white And $counttriangle10verify=$white Then
        $countedbelts=10        
    ElseIf $counttriangle09=$white And $counttriangle09verify=$white Then
        $countedbelts=9
    ElseIf $counttriangle08=$white And $counttriangle08verify=$white Then
        $countedbelts=8 
    ElseIf $counttriangle07=$white And $counttriangle07verify=$white Then
        $countedbelts=7
    ElseIf $counttriangle06=$white And $counttriangle06verify=$white Then
        $countedbelts=6 
    ElseIf $counttriangle05=$white And $counttriangle05verify=$white Then
        $countedbelts=5
    ElseIf $counttriangle04=$white And $counttriangle04verify=$white Then
        $countedbelts=4 
    ElseIf $counttriangle03=$white And $counttriangle03verify=$white Then
        $countedbelts=3
    ElseIf $counttriangle02=$white And $counttriangle02verify=$white Then
        $countedbelts=2 
    ElseIf $counttriangle01=$white And $counttriangle01verify=$white Then
        $countedbelts=1
    EndIf
        
    If $infodisplay=1 Then ToolTip ( $countedbelts, $infowindow[0], $infowindow[1], "countedbelts"  )
;~  Sleep (2000)

    If $debug=1 Then logwrite("countedbelts   ; " & $countedbelts)  
    If $client=1 then $w1targettotal=$countedbelts
    If $client=2 then $w2targettotal=$countedbelts
    If $client=3 then $w3targettotal=$countedbelts 
    If $client=4 then $w4targettotal=$countedbelts 
    If $client=5 then $w5targettotal=$countedbelts      
    If $client=6 then $w6targettotal=$countedbelts      
    If $client=7 then $w7targettotal=$countedbelts      
    If $client=8 then $w8targettotal=$countedbelts      
;~  If $client=9 then $w9targettotal=$countedbelts  
;~  If $client=10 then $w10targettotal=$countedbelts        

EndFunc
Func logwrite($action)          ; v.273
    Local $tCur
    $tCur = _Date_Time_GetLocalTime()
    
;~  FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $cargohold & " ; " & $action & " ; " & $targetlocked & " ; " & $highslotActive & @CRLF)

;~  ; Activate logfile
;~  Sleep (250)
;~  MouseClick("left", 235, 931, 1, 0)      
;~  Sleep (250)
;~  ; Get current local time
;~  $tCur = _Date_Time_GetLocalTime()
;~  ; Write to logfile
;~      Send ("[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" ); & " " & $action & " - " )
    If $action="start" Then
        FileWriteLine($logFile,"[" & _Date_Time_SystemTimeToDateTimeStr($tCur) & "]" & " " & $action & " " & $version & @CRLF)
;~      Send ("[" & _Date_Time_SystemTimeToDateTimeStr($tCur) & "]" & @CRLF)
    ElseIf $action="time" Then
        $actualperiodtime=$Miningtime/10
        FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $actualperiodtime & " " & @CRLF)
    ElseIf $action="debug" Then
;~      FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " )
        If $client=1 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w1status & @CRLF)
        If $client=2 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w2status & @CRLF)
        If $client=3 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w3status & @CRLF)
        If $client=4 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w4status & @CRLF)
        If $client=5 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w5status & @CRLF)
        If $client=6 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w6status & @CRLF)
        If $client=7 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w7status & @CRLF)
        If $client=8 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w8status & @CRLF)
;~      If $client=9 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w9status & @CRLF)
;~      If $client=10 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $action & " ; " & $w10status & @CRLF)
        If $client=8 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; -------------------------------------- " & @CRLF)           
    Else
;~      FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ; " & $cargohold & " ; " )
        If $client=1 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w1volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w1bookmark & " target; " & $w1target & " status; " & $w1status & @CRLF)
        If $client=2 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w2volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w2bookmark & " target; " & $w2target & " status; " & $w2status & @CRLF)
        If $client=3 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w3volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w3bookmark & " target; " & $w3target & " status; " & $w3status & @CRLF)
        If $client=4 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w4volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w4bookmark & " target; " & $w4target & " status; " & $w4status & @CRLF)
        If $client=5 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w5volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w5bookmark & " target; " & $w5target & " status; " & $w5status & @CRLF)
        If $client=6 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w6volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w6bookmark & " target; " & $w6target & " status; " & $w6status & @CRLF)
        If $client=7 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w7volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w7bookmark & " target; " & $w7target & " status; " & $w7status & @CRLF)
        If $client=8 Then FileWriteLine($logFile,"[" & @HOUR & ":"  & @MIN & ":" & @SEC & "]" & " ; " & $loops & " ; " & $client & " ch; " & $cargohold & " vol; " & $w8volumen & " ; " & $action & " locked; " & $targetlocked & " hsinactive; " & $hsinactive & " bm; " & $w8bookmark & " target; " & $w8target & " status; " & $w8status & @CRLF)
        ;If $client=9 Then FileWriteLine ...
        ;If $client=10 Then FileWriteLine ...
    EndIf
EndFunc
;; bookmarking
Func createbookmarks()          ; v.258
    ; bookmark target 1
    ; ------------------------------------------------------------------
    MouseClick("right", $clientpos[0]+$target1[0], $clientpos[1]+$target1[1], 1, $mousespeed)
    Sleep (832)
    If $targetlocked=0 Then MouseClick("left", $clientpos[0]+$target1[0]+26, $clientpos[1]+$target1[1]+94, 1, $mousespeed)
    If $targetlocked>0 Then MouseClick("left", $clientpos[0]+$target1[0]+26, $clientpos[1]+$target1[1]+108, 1, $mousespeed)
    ; name bookmark
    ; ------------------------------------------------------------------
    Sleep (1832)
    MouseClick("left", $clientpos[0]+636, $clientpos[1]+310, 2, $mousespeed)
    Sleep (1489)
    ; give him the number from target to name the bookmark correctly
    If $client=1 Then $target=$w1target
    If $client=2 Then $target=$w2target
    If $client=3 Then $target=$w3target
    If $client=4 Then $target=$w4target
    If $client=5 Then $target=$w5target
    If $client=6 Then $target=$w6target
    If $client=7 Then $target=$w7target
    If $client=8 Then $target=$w8target
    ;If $client=9 Then $target=$w9target
    ;If $client=10 Then $target=$w10target
    ; convert text of bookmarkname to secure the right order in people & places
    ;If $target=1 then $target="01"
    If $target=2 then $target="02"
    If $target=3 then $target="03"
    If $target=4 then $target="04"
    If $target=5 then $target="05"
    If $target=6 then $target="06"
    If $target=7 then $target="07"
    If $target=8 then $target="08"
    If $target=9 then $target="09"
    ; check window before send any text
    $checkbmwindow=PixelGetColor($clientpos[0]+$bmwindow[0], $clientpos[1]+$bmwindow[1]) 
    $checkbmwindowverify=PixelGetColor($clientpos[0]+$bmwindowverify[0], $clientpos[1]+$bmwindowverify[1]) 
;~      If $debug=1 Then logwrite("checkbmwindow  ; " & $checkbmwindow )
;~      If $debug=1 Then logwrite("checkbmwiverify; " & $checkbmwindowverify )
    If $checkbmwindow>16700000 and $checkbmwindowverify>16050000 Then
        If $debug=1 Then logwrite("bm window ok   ; ")
        Send ( "bm " & $target )
        Sleep (500)
        Send ("{ENTER}")
        Sleep (2000)
        If $debug=1 Then logwrite("bm " & $target & " created")
    EndIf
    ; set state to "$wXbm_active=0" to avoid multiple bookmarkcreation
    If $client=1 Then $w1bm_active=0
    If $client=2 Then $w2bm_active=0
    If $client=3 Then $w3bm_active=0
    If $client=4 Then $w4bm_active=0
    If $client=5 Then $w5bm_active=0
    If $client=6 Then $w6bm_active=0
    If $client=7 Then $w7bm_active=0
    If $client=8 Then $w8bm_active=0
    ;If $client=9 Then $w9bm_active=0
    ;If $client=10 Then $10bm_active=0          

EndFunc
Func deletebookmarks()          ; v.257
  ; read generalised bookmark from individual client
    if $client=1 then $bookmark=$w1bookmark
    if $client=2 then $bookmark=$w2bookmark
    if $client=3 then $bookmark=$w3bookmark
    if $client=4 then $bookmark=$w4bookmark
    if $client=5 then $bookmark=$w5bookmark 
    if $client=6 then $bookmark=$w6bookmark 
    if $client=7 then $bookmark=$w7bookmark 
    if $client=8 then $bookmark=$w8bookmark 
;~  if $client=9 then $bookmark=$w9bookmark 
;~  if $client=10 then $bookmark=$w10bookmark 

;~  If $debug=1 And $infodisplay=1 Then ToolTip ( $client, $infowindow[0], $infowindow[1], "aktuelles Bookmark: " & $bookmark )
;~  If $debug=1 Then Sleep (1500)

    If $bookmark=2 Then
        MouseClick("right", $clientpos[0]+$bookmark2[0], $clientpos[1]+$bookmark2[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark2[0]+32, $clientpos[1]+$bookmark2[1]+122, 1, 0)  
    EndIf   
    If $bookmark=3 Then
        MouseClick("right", $clientpos[0]+$bookmark3[0], $clientpos[1]+$bookmark3[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark3[0]+32, $clientpos[1]+$bookmark3[1]+122, 1, 0)  
    EndIf
    If $bookmark=4 Then
        MouseClick("right", $clientpos[0]+$bookmark4[0], $clientpos[1]+$bookmark4[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark4[0]+32, $clientpos[1]+$bookmark4[1]+122, 1, 0)  
    EndIf
    If $bookmark=5 Then
        MouseClick("right", $clientpos[0]+$bookmark5[0], $clientpos[1]+$bookmark5[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark5[0]+32, $clientpos[1]+$bookmark5[1]+122, 1, 0)  
    EndIf
    If $bookmark=6 Then
        MouseClick("right", $clientpos[0]+$bookmark6[0], $clientpos[1]+$bookmark6[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark6[0]+32, $clientpos[1]+$bookmark6[1]+122, 1, 0)  
    EndIf
    If $bookmark=7 Then
        MouseClick("right", $clientpos[0]+$bookmark7[0], $clientpos[1]+$bookmark7[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark7[0]+32, $clientpos[1]+$bookmark7[1]+122, 1, 0)  
    EndIf   
    If $bookmark=8 Then
        MouseClick("right", $clientpos[0]+$bookmark8[0], $clientpos[1]+$bookmark8[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark8[0]+32, $clientpos[1]+$bookmark8[1]+122, 1, 0)  
    EndIf
    If $bookmark=9 Then
        MouseClick("right", $clientpos[0]+$bookmark9[0], $clientpos[1]+$bookmark9[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark9[0]+32, $clientpos[1]+$bookmark9[1]+122, 1, 0)  
    EndIf
    If $bookmark=10 Then
        MouseClick("right", $clientpos[0]+$bookmark10[0], $clientpos[1]+$bookmark10[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark10[0]+32, $clientpos[1]+$bookmark10[1]+122, 1, 0)  
    EndIf   
    If $bookmark=11 Then
        MouseClick("right", $clientpos[0]+$bookmark11[0], $clientpos[1]+$bookmark11[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark11[0]+32, $clientpos[1]+$bookmark11[1]+122, 1, 0)  
    EndIf       
    If $bookmark=12 Then
        MouseClick("right", $clientpos[0]+$bookmark12[0], $clientpos[1]+$bookmark12[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark12[0]+32, $clientpos[1]+$bookmark12[1]+122, 1, 0)  
    EndIf   
    If $bookmark=13 Then
        MouseClick("right", $clientpos[0]+$bookmark13[0], $clientpos[1]+$bookmark13[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark13[0]+32, $clientpos[1]+$bookmark13[1]+122, 1, 0)  
    EndIf
    If $bookmark=14 Then
        MouseClick("right", $clientpos[0]+$bookmark14[0], $clientpos[1]+$bookmark14[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark14[0]+32, $clientpos[1]+$bookmark14[1]+122, 1, 0)  
    EndIf
    If $bookmark=15 Then
        MouseClick("right", $clientpos[0]+$bookmark15[0], $clientpos[1]+$bookmark15[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark15[0]+32, $clientpos[1]+$bookmark15[1]+122, 1, 0)  
    EndIf   
    If $bookmark=16 Then
        MouseClick("right", $clientpos[0]+$bookmark16[0], $clientpos[1]+$bookmark16[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark16[0]+32, $clientpos[1]+$bookmark16[1]+122, 1, 0)  
    EndIf
    If $bookmark=17 Then
        MouseClick("right", $clientpos[0]+$bookmark17[0], $clientpos[1]+$bookmark17[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark17[0]+32, $clientpos[1]+$bookmark17[1]+122, 1, 0)  
    EndIf
    If $bookmark=18 Then
        MouseClick("right", $clientpos[0]+$bookmark18[0], $clientpos[1]+$bookmark18[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark18[0]+32, $clientpos[1]+$bookmark18[1]+122, 1, 0)  
    EndIf
    If $bookmark=19 Then
        MouseClick("right", $clientpos[0]+$bookmark19[0], $clientpos[1]+$bookmark19[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark19[0]+32, $clientpos[1]+$bookmark19[1]+122, 1, 0)  
    EndIf
    If $bookmark=20 Then
        MouseClick("right", $clientpos[0]+$bookmark20[0], $clientpos[1]+$bookmark20[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark20[0]+32, $clientpos[1]+$bookmark20[1]+122, 1, 0)  
    EndIf   
    If $bookmark=21 Then
        MouseClick("right", $clientpos[0]+$bookmark21[0], $clientpos[1]+$bookmark21[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark21[0]+32, $clientpos[1]+$bookmark21[1]+122, 1, 0)  
    EndIf
    If $bookmark=22 Then
        MouseClick("right", $clientpos[0]+$bookmark22[0], $clientpos[1]+$bookmark22[1], 1, 0)  
        Sleep (1200)
        MouseClick("left", $clientpos[0]+$bookmark22[0]+32, $clientpos[1]+$bookmark22[1]+122, 1, 0)  
    EndIf
    Sleep (250)
    If $debug=1 Then logwrite("bookmark " & $bookmark & " created")
EndFunc     
Func updatebookmarks()          ; v.257
        ; create bookmark
        MouseClick("right", $clientpos[0]+$target1[0], $clientpos[1]+$target1[1], 1, $mousespeed)
        Sleep (700)
        MouseClick("left", $clientpos[0]+$target1[0]+26, $clientpos[1]+$target1[1]+94, 1, $mousespeed)
        ; name the bookmark
        Sleep (1500)
        MouseClick("left", $clientpos[0]+636, $clientpos[1]+310, 2, $mousespeed)
        Sleep (1500)

;~      create bookmark if bookmarks = 1
;~      If $client=1 Then $target=$w1target
;~      If $client=2 Then $target=$w2target
;~      If $client=3 Then $target=$w3target
;~      If $client=4 Then $target=$w4target
;~      If $client=5 Then $target=$w5target
;~      If $client=6 Then $target=$w6target
;~      If $client=7 Then $target=$w7target
;~      If $client=8 Then $target=$w8target
;~      If $client=9 Then $target=$w9target
;~      If $client=10 Then $target=$w10target
;~      Send ( "belt " & $target )
;~      Sleep (500)
;~      Send ("{ENTER}")


;~ im Overview Modus
        ; create bookmark if bookmarks < 12
        If $client=1 Then $target=$w1target
        If $client=2 Then $target=$w2target
        If $client=3 Then $target=$w3target
        If $client=4 Then $target=$w4target
        If $client=5 Then $target=$w5target
        If $client=6 Then $target=$w6target
        If $client=7 Then $target=$w7target
        If $client=8 Then $target=$w8target
;~      If $client=9 Then $target=$w9target
;~      If $client=10 Then $target=$w10target
        ; Konvertierung damit die Reihenfolge der BMs in P&P erhalten bleibt
        If $target=9 then $target="09"
        If $target=8 then $target="08"
        If $target=7 then $target="07"
        If $target=6 then $target="06"
        If $target=5 then $target="05"
        If $target=4 then $target="04"
        If $target=3 then $target="03"
        If $target=2 then $target="02"
;~      If $target=1 then $target="01"
        ; ------------------------------------------------------------------
;~ im Bookmark Modus
        ; actualize bookmark if necessary
        if $client=1 then $bookmark=$w1bookmark
        if $client=2 then $bookmark=$w2bookmark
        if $client=3 then $bookmark=$w3bookmark
        if $client=4 then $bookmark=$w4bookmark
        if $client=5 then $bookmark=$w5bookmark 
        if $client=6 then $bookmark=$w6bookmark 
        if $client=7 then $bookmark=$w7bookmark 
        if $client=8 then $bookmark=$w8bookmark 
;~      if $client=9 then $bookmark=$w9bookmark 
;~      if $client=10 then $bookmark=$w10bookmark           
    
        ; Konvertierung damit die Reihenfolge der BMs in P&P erhalten bleibt
        If $bookmark=9 then $bookmark="09"
        If $bookmark=8 then $bookmark="08"
        If $bookmark=7 then $bookmark="07"
        If $bookmark=6 then $bookmark="06"
        If $bookmark=5 then $bookmark="05"
        If $bookmark=4 then $bookmark="04"
        If $bookmark=3 then $bookmark="03"
        If $bookmark=2 then $bookmark="02"
;~      If $bookmark=1 then $bookmark="01"
        ; ------------------------------------------------------------------
        $checkbmwindow=PixelGetColor($clientpos[0]+$bmwindow[0], $clientpos[1]+$bmwindow[1]) 
        $checkbmwindowverify=PixelGetColor($clientpos[0]+$bmwindowverify[0], $clientpos[1]+$bmwindowverify[1]) 
;~      If $debug=1 Then logwrite("$checkbmwindow " & $checkbmwindow )
;~      If $debug=1 Then logwrite("$checkbmwindowverify " & $checkbmwindowverify )
        If $checkbmwindow>16700000 and $checkbmwindowverify>16050000 Then
            If $debug=1 Then logwrite("bm window ok   ; ")
        ;~  Send ( "bm " & $target )
            Send ( "bm " & $bookmark )
            Sleep (761)
            Send ("{ENTER}")
            Sleep (1662)
            If $debug=1 Then logwrite("bm " & $bookmark & " updated")
        EndIf
EndFunc
;; overview func
Func checkfirstic()             ; v.245
    $firstic=PixelChecksum ($clientpos[0]+$pruefquadrantic1[0], $clientpos[1]+$pruefquadrantic1[1], $clientpos[0]+$pruefquadrantic1[2], $clientpos[1]+$pruefquadrantic1[3]) 
    If $firstic=$dreieck[0] or $firstic=$dreieck[1] or $firstic=$dreieck[2] or $firstic=$dreieck[3] or $firstic=$dreieck[4] or $firstic=$dreieck[5] or $firstic=$dreieck[6] or $firstic=$dreieck[7] Then 
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "dreieck"  )
        $FirstSymbol=0 ; = dreieck
    ElseIf $firstic=$blackbackground[0] or $firstic=$blackbackground[1] or $firstic=$blackbackground[2] or $firstic=$blackbackground[3] or $firstic=$blackbackground[4] or $firstic=$blackbackground[5] or $firstic=$blackbackground[6] or $firstic=$blackbackground[7] or $firstic=$blackbackground[8] or $firstic=$blackbackground[9] or $firstic=$blackbackground[10] Then
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "black"  )
        $FirstSymbol=1 ; = 
    ElseIf $firstic=$viereck1[0] or $firstic=$viereck1[1] or $firstic=$viereck1[2] or $firstic=$viereck1[3] or $firstic=$viereck1[4] Then
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "viereck"  )
        $FirstSymbol=2 ; = 
    ElseIf $firstic=$lockedtarget[0] or $firstic=$lockedtarget[1] or $firstic=$lockedtarget[2] or $firstic=$lockedtarget[3] or $firstic=$lockedtarget[4] or $firstic=$lockedtarget[5] or $firstic=$lockedtarget[6] or $firstic=$lockedtarget[7] or $firstic=$lockedtarget[8] or $firstic=$lockedtarget[9] or $firstic=$lockedtarget[10] or $firstic=$lockedtarget[11] or $firstic=$lockedtarget[12] Then 
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "locked target"  )
        $FirstSymbol=3 ; = 
    ElseIf $firstic=$sentrygun5[0] or $firstic=$sentrygun5[1] or $firstic=$sentrygun5[2] or $firstic=$sentrygun5[3] or $firstic=$sentrygun5[4] Then 
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "sentry gun"  )
        $FirstSymbol=4 ; = 
    ElseIf $firstic=$stargate[0] or $firstic=$stargate[1] or $firstic=$stargate[2] or $firstic=$stargate[3] or $firstic=$stargate[4] or $firstic=$stargate[5] or $firstic=$stargate[6] Then 
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "stargate"  )
        $FirstSymbol=5 ; =  gate    
    ElseIf $firstic=$ratsssx[0] or $firstic=$ratsssx[1] or $firstic=$ratsssx[2] or $firstic=$ratsssx[3] or $firstic=$ratsssx[4] Then 
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "stargate"  )
        $FirstSymbol=6 ; =  ratsss
    Else
        If $infodisplay=1 Then ToolTip ( $firstic, $infowindow[0], $infowindow[1], "unbekannt"  )
;~      Sleep (2500)
        $FirstSymbol=99 ; = unbekannt
    EndIf
    If $debug=1 Then logwrite("checkfirstic() ; " & $FirstSymbol & " " )
EndFunc
Func selecttab($tab)            ; v.259
    checkfirstic()
    Select
        Case $tab = 1 ; = Tab1 Mine 
            If $firstsymbol=0 or $firstsymbol=4 or $firstsymbol=5 or $firstsymbol=6 or $firstsymbol=99 Then
                Sleep (196)
                MouseClick("left", $clientpos[0]+$Tab1[0], $clientpos[1]+$Tab1[1], 1, $mousespeed)
                Sleep (2298)
            EndIf
            checkfirstic()
            If $firstsymbol=0 or $firstsymbol=4 or $firstsymbol=5 or $firstsymbol=6 or $firstsymbol=99 Then selectviews(2)
            For $i=1 to 1
                If $firstsymbol=1 Then ; falls IC schwarz, prüfe distance=schwarz um eventl. Anzeigefehler zu korrigieren
                    $firstdist=PixelChecksum ($clientpos[0]+$pruefquadrantdist1[0], $clientpos[1]+$pruefquadrantdist1[1], $clientpos[0]+$pruefquadrantdist1[2], $clientpos[1]+$pruefquadrantdist1[3]) 
                        If $debug=1 Then logwrite("selecttab(1)   ; " & $firstdist )
;~                      If $infodisplay=1 Then ToolTip ( $firstdist, $infowindow[0], $infowindow[1], "$firstdist..."  )
;~                      Sleep(10000)    
                    ;; Securing the correct view if tab1 is selected
                        ; Read individual $wXview to general variable $secureview
                        ; -----------------------------------------------------
                        If $client=1 then $secureview=$w1view
                        If $client=2 then $secureview=$w2view
                        If $client=3 then $secureview=$w3view
                        If $client=4 then $secureview=$w4view   
                        If $client=5 then $secureview=$w5view   
                        If $client=6 then $secureview=$w6view       
                        If $client=7 then $secureview=$w7view       
                        If $client=8 then $secureview=$w8view       
                    ;~  If $client=9 then $secureview=$w9view       
                    ;~  If $client=10 then $secureview=$w10view                 
                        ; select secureview dependent from individual $wXview
                        ; -----------------------------------------------------
;~                  If $firstdist>=2794129684 and $firstdist<=2806580326 and $secureview=1 Then selectviews(1) ; wenn alles schwarz dann selectview(2) ; AMD
;~                  If $firstdist>=2794129684 and $firstdist<=2806580326 and $secureview=2 Then selectviews(2) ; wenn alles schwarz dann selectview(2) ; AMD
                    If $firstdist>=2993358000 and $firstdist<=2993358002 and $secureview=1 Then selectviews(1) ; wenn alles schwarz dann selectview(2) ; INTEL
                    If $firstdist>=2993358000 and $firstdist<=2993358002 and $secureview=2 Then selectviews(2) ; wenn alles schwarz dann selectview(2) ; INTEL
                EndIf
            Next
        Case $tab = 2 ; = Tab2 Belts
            If $firstsymbol<>0 Then
                Sleep (196)
                MouseClick("left", $clientpos[0]+$Tab2[0], $clientpos[1]+$Tab2[1], 1, $mousespeed)
                Sleep (2398)
            EndIf
            checkfirstic()
            If $firstsymbol<>0 Then
                selectviews(4)
            EndIf
        Case $tab = 3 ; = Tab3 Ratsss 
            ;~  If $firstsymbol<>0 Then ******** Baustelle ********
                    Sleep (196)
                    MouseClick("left", $clientpos[0]+$Tab3[0], $clientpos[1]+$Tab3[1], 1, $mousespeed)
                    Sleep (2398)
            ;~  EndIf
        Case $tab = 4 ; = Tab4 Gates
                Sleep (196)
                MouseClick("left", $clientpos[0]+$Tab4[0], $clientpos[1]+$Tab4[1], 1, $mousespeed)
                Sleep (2398)            
    EndSelect   
EndFunc     
Func selectviews($view)         ; v.247 
    MouseClick("left", $clientpos[0]+$openovarrow[0], $clientpos[1]+$openovarrow[1], 1, $mousespeed)
    Sleep (712)
    Select
        Case $view = 1 ; = Veldspar & station
            MouseClick("left", $clientpos[0]+$view1[0], $clientpos[1]+$view1[1], 1, $mousespeed)        
        Case $view = 2 ; = Ore & station 
            MouseClick("left", $clientpos[0]+$view2[0], $clientpos[1]+$view2[1], 1, $mousespeed)
        Case $view = 3 ; = Ratsss 
            MouseClick("left", $clientpos[0]+$view3[0], $clientpos[1]+$view3[1], 1, $mousespeed)
        Case $view = 4 ; = Belts
            MouseClick("left", $clientpos[0]+$view4[0], $clientpos[1]+$view4[1], 1, $mousespeed)
        Case $view = 5 ; = empty
            MouseClick("left", $clientpos[0]+$view5[0], $clientpos[1]+$view5[1], 1, $mousespeed)            
    EndSelect
    Sleep (2889)
    ;Return 1
EndFunc
Func togglepause()              ; v.230
    $paused = NOT $paused
    ;$sTemp = $sLaststatus
    While $paused
        Sleep(100)
        ToolTip ( $paused, $infowindow[0], $infowindow[1], "   > > Paused < <   " )
    WEnd
    ;Printstatus($sTemp)
EndFunc
Func terminate()                ; v.201
  Exit 0
EndFunc
;; downtime v.250
Func checktime()                ; v.250
    Local $tCur
    $tCur = _Date_Time_GetLocalTime()
;~  If @HOUR = "13" Then
;~  If @HOUR == "12" And @MIN >= "45" Then
;~      If @HOUR == "13" And @MIN < "59" Then
            ; Set status to Inactive (=98)
;~          If $client= 1 then $w1status= 98 ;dt
;~          If $client= 2 then $w2status= 98 ;dt
;~          If $client= 3 then $w3status= 98 ;dt
;~          If $client= 4 then $w4status= 98 ;dt    
;~          If $client= 5 then $w5status= 98 ;dt        
;~          If $client= 6 then $w6status= 98 ;dt        
;~          If $client= 7 then $w7status= 98 ;dt        
;~          If $client= 8 then $w8status= 98 ;dt        
;~          If $client= 9 then $w9status= 98 ;dt        
;~          If $client=10 then $w10status=98 ;dt
;~          EndIf
;~  EndIf
;~  EndIf
EndFunc
Func clientclose()              ; v.250
    Local $tCur
    $tCur = _Date_Time_GetLocalTime()
;~  ; If downtime is coming up, shut down EVE and wait
;~  If @HOUR == "12" And @MIN >= "39" Then
;~      If $infodisplay=1 Then ToolTip (  $tCur, $infowindow[0], $infowindow[1], "dt" & @HOUR & @MIN  )
;~      Sleep (1000)
;~      If @HOUR == "12" And @MIN < "59" Then
;~          ; Close Client
;~          LogWrite("Downtime imminent! Shutting down EVE.")
;~          For $i=5 to 1 Step -1
;~              If $infodisplay=1 Then ToolTip (  $i, $infowindow[0], $infowindow[1], "Downtime imminent! Shutting down EVE."  )
;~              Sleep (1000)
;~          Next
;~          Send("{CTRLDOWN}q")         
;~          Send("{ENTER}")
;~          Send("{CTRLUP}")
;~          ; Set status to Inactive (=98)
;~          If $client= 1 then $w1status= 98 ;inactive
;~          If $client= 2 then $w2status= 98
;~          If $client= 3 then $w3status= 98
;~          If $client= 4 then $w4status= 98
;~          If $client= 5 then $w5status= 98
;~          If $client= 6 then $w6status= 98
;~          If $client= 7 then $w7status= 98
;~          If $client= 8 then $w8status= 98
;~          If $client= 9 then $w9status= 98
;~          If $client=10 then $w10status=98
;~      EndIf
;~  EndIf
;~  If @HOUR <> "13" Then
        ; Set status to undock (=12)
        ; Set status to unknown (=99)
            If $client= 1 then $w1status= 12 ;undock
            If $client= 2 then $w2status= 12
            If $client= 3 then $w3status= 12
            If $client= 4 then $w4status= 12
            If $client= 5 then $w5status= 12
            If $client= 6 then $w6status= 12
            If $client= 7 then $w7status= 12
            If $client= 8 then $w8status= 12
            If $client= 9 then $w9status= 12
            If $client=10 then $w10status=12
;~  EndIf
;~  If @HOUR >= "00" And @HOUR < "13" Then  
;~      If @MIN < "40" Then
;~      ; Set status to undock (=12)
;~      ; Set status to unknown (=99)
;~          If $client= 1 then $w1status= 12 ;undock
;~          If $client= 2 then $w2status= 12
;~          If $client= 3 then $w3status= 12
;~          If $client= 4 then $w4status= 12
;~          If $client= 5 then $w5status= 12
;~          If $client= 6 then $w6status= 12
;~          If $client= 7 then $w7status= 12
;~          If $client= 8 then $w8status= 12
;~          If $client= 9 then $w9status= 12
;~          If $client=10 then $w10status=12
;~      EndIf
;~  EndIf       
EndFunc
Func waitdt()                   ; v.250
    Local $tCur
    $tCur = _Date_Time_GetLocalTime()
;~  If @HOUR == "13" And @MIN = "00" Then
;~      If @HOUR == "14" And @MIN < "10" Then
;~  If @HOUR == "13" And @MIN = "00" Then
;~      If @HOUR == "14" And @MIN < "10" Then
;~          Sleep (1000)
;~      ElseIf @HOUR == "14" And @MIN > "10" Then
;~      EndIf
;~  EndIf
EndFunc
;; experimental status
Func selectcharacter()          ; v.245
    For $i=1 to 5
        $selectcharacter=PixelGetColor($clientpos[0]+262, $clientpos[1]+121) ;12434877
        $selectcharacter2=PixelGetColor($clientpos[0]+415, $clientpos[1]+121) ;12434877
        $selectcharacter3=PixelGetColor($clientpos[0]+939, $clientpos[1]+767) ;12434877
        If $selectcharacter>12000000 And $selectcharacter2>12000000 And $selectcharacter3>12000000 Then
            MouseClick("left", $clientpos[0]+355,$clientpos[1]+306, 1, 0)
;~          Sleep(698)
        EndIf
    Next
EndFunc
Func clientsstatus1680()        ; v.211
    Global $ClosePoint[2]
    $ClosePoint[0] = 1343
    $ClosePoint[1] = 123

    $serverstatus=PixelChecksum (947, 825, 955, 830)
    If $infodisplay=1 Then ToolTip ( $serverstatus, $infowindow[0], $infowindow[1], "Read Server status..." )
    Sleep (2000)    
    ;statusprüfung
    ;Unkown
    $serverstatus=PixelChecksum (947, 825, 955, 830)
    If $serverstatus=123 Then
        If $infodisplay=1 Then ToolTip ( $serverstatus, $infowindow[0], $infowindow[1], "status: Unknown" )
        Sleep (1000)
    EndIf
    ;Starting Up
    $serverstatus=PixelChecksum (747, 822, 783, 827)
    If $serverstatus=123 or $serverstatus=123 or $serverstatus=802730909 or $serverstatus=788116378 Then
        If $infodisplay=1 Then ToolTip ( $serverstatus, $infowindow[0], $infowindow[1], "status: Starting Up" )
        Sleep (1000)
    EndIf
    ;Not accepting connections
    $serverstatus=PixelChecksum (747, 822, 783, 827)
    if $serverstatus=123 Then
        If $infodisplay=1 Then ToolTip ( $serverstatus, $infowindow[0], $infowindow[1], "status: Not accepting connections" )
        Sleep (1000)    
    EndIf
    ;OK
    $serverstatus=PixelChecksum (747, 822, 783, 827)
    If $serverstatus=4165548176 or $serverstatus=123 Then
        If $infodisplay=1 Then ToolTip ( $serverstatus, $infowindow[0], $infowindow[1], "status: OK" )
        Sleep (1000)
        $serverstatus="ok"
    Else
        clientCloseAll()
        $serverstatus="not ok"
    EndIf
EndFunc
Func clientCloseAll()           ; v.211
Local $serverstatus
Local $ClosePoint[2] = [1343,125]
    For $i = 1 to 20
        ;Prüfe ob client vorhanden ist
        MouseClick("left", 1348, 111, 1, 00)
        $clientstart=PixelChecksum (336, 119, 345, 128)
        $clientstart2=PixelGetColor (1355,906)
        If $clientstart=4175279277 and $clientstart2=0xA8A9BB Then
            $clientstatus=1 
            If $infodisplay=1 Then ToolTip ( $clientstatus, $infowindow[0], $infowindow[1], "closing clients"  )
            Sleep (100)
            MouseClick("left", $ClosePoint[0], $ClosePoint[1], 1, 00)
            Sleep (100)
            MouseClick("left", $ClosePoint[0], $ClosePoint[1], 1, 00)
        Else
            $clientstatus=0 
            If $infodisplay=1 Then ToolTip ( $serverstatus, $infowindow[0], $infowindow[1], "all clients closed" )
            Sleep (1000)
        Endif
    Next
EndFunc
Func clientintegrity()          ; v.240
;~ Local $w1clientpos[2]    = [0,0]
;~ Local $w2clientpos[2]    = [36,29]
;~ Local $w3clientpos[2]    = [72,58]
;~ Local $w4clientpos[2]    = [108,87]
;~ Local $w5clientpos[2]    = [144,116]
;~ Local $w6clientpos[2]    = [180,145]

    $clientint1=PixelChecksum (  8,  10,  17,  19)
    $clientint2=PixelChecksum ( 44,  39,  53,  48)
    $clientint3=PixelChecksum ( 80,  68,  89,  77)
    $clientint4=PixelChecksum (116,  97, 125, 106)
    $clientint5=PixelChecksum (152, 126, 161, 135)
    $clientint6=PixelChecksum (188, 155, 197, 164)
        If $clientint1=4175279277 and $clientint2=4175279277 and $clientint3=4175279277 and $clientint4=4175279277 and $clientint5=4175279277 and $clientint6=4175279277 Then
            $integrity=1 ; ok
            If $infodisplay=1 Then ToolTip ( $client, $infowindow[0], $infowindow[1], "integrity ok"  )
            Sleep (1000)        
        Else
            $integrity=0 ; not ok
            $client=1
            clientchange()
            $client=2
            clientchange()
            $client=3
            clientchange()
            $client=4
            clientchange()
            $client=5
            clientchange()
            $client=6
            clientchange()
        EndIf
EndFunc
Func clientcheckalive()         ; v.270
    $clientstart=PixelChecksum (14, 112, 16, 114)
        If $clientstart=435945960 Then
            $clientStatus=0
            If $infodisplay=1 Then ToolTip ( $clientstart, $infowindow[0], $infowindow[1], "not alive !"  )
            Sleep (1000)
        ElseIf $clientstart=1769473 Then
            $clientStatus=0
            If $infodisplay=1 Then ToolTip ( $clientstart, $infowindow[0], $infowindow[1], "no screen !"  )
            Sleep (1000)
        Else
            $clientStatus=1
            If $infodisplay=1 Then ToolTip ( $clientstart, $infowindow[0], $infowindow[1], "alive"  )
            Sleep (1000)        
        EndIf
    ;---------------------------------------------------------      
    If $debug=1 Then logwrite("clientcheckalive() clientStatus 1=ok; " & $clientStatus )
EndFunc
;; client func
Func clientcheckopen1680()      ; v.270
    ; open new client               
    For $i = 1 To 20
        MouseClick("left", 1348, 111, 1, 00)
        $clientstart=PixelChecksum (336, 119, 345, 128)
        $clientstart2=PixelGetColor (1355,906)
        If $clientstart=4175279277 and $clientstart2=0xA8A9BB Then
            $clientStatus=1 
            If $infodisplay=1 Then ToolTip ( $clientStatus, $infowindow[0], $infowindow[1], "client started"  )
            Sleep (100)     
        Else
            $clientStatus=0
            If $infodisplay=1 Then ToolTip ( $clientStatus, $infowindow[0], $infowindow[1], "wait for start"  )
            Sleep (2500)
            If $infodisplay=1 Then ToolTip ( $clientStatus, $infowindow[0], $infowindow[1], "wait 5 sec..."  )
            Sleep (2500)                            
        EndIf
    Next
    ;Return 1 ;OK   
    ;---------------------------------------------------------
    If $debug=1 Then logwrite("clientcheckopen1680() clientStatus 1=ok; " & $clientStatus )
EndFunc
Func clientstartnew()           ; v.271
        Run($pfad)
        If $infodisplay=1 Then ToolTip ( $i, $infowindow[0], $infowindow[1], "start Client " )
        If $turbo=1 Then
            Sleep (5000)
        Else
            Sleep (10000)
        EndIf
EndFunc
Func clientopenXXX()            ; v.271
    clientstartnew()
    clientcheckopen1680()
;~  Clientsstatus1680()
;~  If $serverstatus="ok" Then
        sleep (500)
        MouseClick("left", 880,824, 2, 0)
        sleep (1500)
        send ("LOGIN")
        sleep (1000)
        MouseClick("left", 880,848, 1, 0)
        send ("PASSWORD")
        sleep (200)
        Send ("{ENTER}") 
        WinMove("EVE", "", $clientpos[0], $clientpos[1])
        sleep (10000)
        MouseClick("left", $clientpos[0]+355,$clientpos[1]+306, 1, 0)
        If $turbo<>1 Then
            MouseClick("left", $clientpos[0]+355,$clientpos[1]+306, 1, 0)
            sleep (8000)
            MouseClick("left", $clientpos[0]+355,$clientpos[1]+306, 1, 0)
            sleep (7000)
            MouseClick("left", $clientpos[0]+355,$clientpos[1]+306, 1, 0)
        EndIf
;~  EndIf
    ;Return 1  
EndFunc
Func clientchange()             ; v.250
    Local $tCur
    $tCur = _Date_Time_GetLocalTime()
        if $client=1 Then
            $clientpos[0]=$w1clientpos[0]
            $clientpos[1]=$w1clientpos[1]
        EndIf
        if $client=2 Then
            $clientpos[0]=$w2clientpos[0]
            $clientpos[1]=$w2clientpos[1]
        EndIf
        if $client=3 Then
            $clientpos[0]=$w3clientpos[0]
            $clientpos[1]=$w3clientpos[1]
        EndIf
        if $client=4 Then
            $clientpos[0]=$w4clientpos[0]
            $clientpos[1]=$w4clientpos[1]
        EndIf
        if $client=5 Then
            $clientpos[0]=$w5clientpos[0]
            $clientpos[1]=$w5clientpos[1]
        EndIf
        if $client=6 Then
            $clientpos[0]=$w6clientpos[0]
            $clientpos[1]=$w6clientpos[1]
        EndIf
        if $client=7 Then
            $clientpos[0]=$w7clientpos[0]
            $clientpos[1]=$w7clientpos[1]
        EndIf       
        if $client=8 Then
            $clientpos[0]=$w8clientpos[0]
            $clientpos[1]=$w8clientpos[1]
        EndIf
        if $client=9 Then
            $clientpos[0]=$w9clientpos[0]
            $clientpos[1]=$w9clientpos[1]
        EndIf
        if $client=10 Then
            $clientpos[0]=$w10clientpos[0]
            $clientpos[1]=$w10clientpos[1]
        EndIf       
        If $infodisplay=1 Then ToolTip ($client, $infowindow[0], $infowindow[1], "client"  )
        Sleep (598)     
    For $i = 1 To 25 ;Wx Prüfe Seitenwechsel v.202
        $clientchange=PixelChecksum ($clientpos[0]+8, $clientpos[1]+10, $clientpos[0]+17, $clientpos[1]+19)
        $clientchange2=PixelGetColor ($clientpos[0]+1027, $clientpos[1]+797)
        if $clientchange=4175279277 and $clientchange2=0xA8A9BB Then
            if $client= 1 Then $w1windowstatus= 1 ;ok
            if $client= 2 Then $w2windowstatus= 1 ;ok   
            if $client= 3 Then $w3windowstatus= 1 ;ok   
            if $client= 4 Then $w4windowstatus= 1 ;ok   
            if $client= 5 Then $w5windowstatus= 1 ;ok   
            if $client= 6 Then $w6windowstatus= 1 ;ok   
            if $client= 7 Then $w7windowstatus= 1 ;ok                   
            if $client= 8 Then $w8windowstatus= 1 ;ok                   
            if $client= 9 Then $w9windowstatus= 1 ;ok                   
            if $client=10 Then $w10windowstatus=1 ;ok                   
;~          If $infodisplay=1 Then ToolTip ( $client, $infowindow[0], $infowindow[1], "client ready"  )
        Else
            Sleep (200)
            MouseClick("left", $clientpos[0]+20, $clientpos[1]+788, 1, $MouseSpeed)
            if $client= 1 Then $w1windowstatus= 0 ;nicht ok
            if $client= 2 Then $w2windowstatus= 0 ;nicht ok
            if $client= 3 Then $w3windowstatus= 0 ;nicht ok
            if $client= 4 Then $w4windowstatus= 0 ;nicht ok
            if $client= 5 Then $w5windowstatus= 0 ;nicht ok
            if $client= 6 Then $w6windowstatus= 0 ;nicht ok
            if $client= 7 Then $w7windowstatus= 0 ;nicht ok
            if $client= 8 Then $w8windowstatus= 0 ;nicht ok             
            if $client= 9 Then $w9windowstatus= 0 ;nicht ok                 
            if $client=10 Then $w10windowstatus=0 ;nicht ok             
;~          If $infodisplay=1 Then ToolTip ( $client, $infowindow[0], $infowindow[1], "client not ready"  )
        EndIf
    Next
;~  If @HOUR <> "13" Then
;~  If @HOUR >= "14"  And @MIN > "10" Then
;~          If $client=1 and $w1windowstatus=0 Then clientopenXXX()
;~          If $client=2 and $w2windowstatus=0 Then clientopenXXX()
;~          If $client=3 and $w3windowstatus=0 Then clientopenXXX()
;~          If $client=4 and $w4windowstatus=0 Then clientopenXXX()
;~          If $client=5 and $w5windowstatus=0 Then clientopenXXX()
;~          If $client=6 and $w6windowstatus=0 Then clientopenXXX() 
;~          If $client=7 and $w7windowstatus=0 Then clientopenXXX() 
;~          If $client=8 and $w8windowstatus=0 Then clientopenXXX() 
        Return 1
;~  EndIf
EndFunc
;; history
;~  v2.19   CheckCargohold von Percentage auf m3 umgestellt, Rückflug wenn Cargo bei 9500m3
;~  v2.21   SelectTab anstatt SelectViews, warpEntry in warpbeltov und Waitwarp in Dockstation 
;~  v2.22   LogWrite eingefügt --> unloadleft, logwrite, 
;~          Waitwarp in ModulA eingebaut damit vor dem Check der warp zum Belt 
;~          beendet werden kann
;~  v2.22   LogWrite in Modul: Undock und ModulA
;~          underfire shieldbooster ab 50% shield
;~  v2.31   Bookmarks werden unterstützt
;~          fixerror, Overview Error wird korrigiert sobald Prüfpunkt >10000000
;~          SelectView2 wieder eingeführt, Ansicht 2 wird nun jedesmal neu geladen
;~          SelectViews($view) überarbeitet, Ansicht kann jetzt über die Variable ($view) ausgewählt werden
;~          Cleanup des Code und der Koordinaten erledigt
;~          Locktarget, weniger Wiederholungen und etwas langsamer
;~          Locktarget, einheitlicher $targetingspeed eingeführt
;~          w1Dock: 1x andocken anklicken u längere Pause, unloadleft: Stack All Befehl geändert
;~  v2.33   individuelle clientbezogene funktionen in das w1modul integriert
;~  v2.34   selecttabs() überarbeitet
;~  v2.35   starteve_xxx neu
;~  v2.48   ohne downtime
;~  v2.51   mit downtime
;~  v2.52   warpbeltbm()        : countbookmarks() neues Modul, eingebaut, zählt die Bookmarks
;~                              : Startbookmark $w1bookmark=Random (2, $w1bookmarktotal, 1) von Einstellungen hierher verschoben
;~                              : niedrigstes Bookmark auf 2 gesetzt, Bookmark1 ist die station
;~  v2.53   fixoverviewerror    : F11-Fehlererkennung neu platziert. jetzt: dreieck vor Ãœbersicht
;~  v2.54   w1modul()           : Auswahl einer Ansicht ($w1view=2,2) in Runde 1 (loops=1)
;~  v2.55   activatehs()        : veränderte Aufschaltung mit Zwischenprüfung
;~  v2.56   warpbeltov()        : countbelts() neues Modul, eingebaut, zählt die Triangle (Belts) 
;~  Bookmarkfunktionalität eingefügt
;~  v2.57   locktarget()        : updatebookmark() und deletebookmark() falls rocks zu weit entfernt sind update bm
;~                              : verschoben in wXmodul() status=5
;~  v2.58   wXmodul()           : createbookmarks() neues Modul bei $wXstatus=5 (5=mining)eingefügt, falls 
;~                              : 1. $w1bookmarktotal<=$w1bookmarkmin
;~                              : 2. $w1selectmethod=2 (Overview Modus)
;~                              : 3. $w1bm_active=1 (bmakin' active)
;~                              : setzt anschließend $wXbm_active=0 (bmakin' inactive)
;~          wXmodul()           : updatebookmark() und deletebookmark() bei $wXstatus=5 (5=mining)eingefügt, falls
;~                              : locktarget keine targets aufschalten konnte 
;~                              : start in overview mode : wxtarget=1, no random anymore 
;~          warpbeltov()        : niedrigstes target auf 2 gesetzt, damit der erste erstellte Bookmark "bm 02" heisst: $wXtarget=2
;~          undock()            : 1. Freigabe für das createbookmarks() : wXbm_active=1 (bmakin' active)
;~          warpbeltbm()        : (deaktiviert) 2. Freigabe für das createbookmarks() : wXbm_active=1 (bmakin' active)
;~  v2.59
;~  v2.60
;~  v2.61
;~  v2.70   client functions    : update
;~  v2.71   wXModul             : NFS warptostation schneller
;~          warpbeltbm()        : (aktiviert) 2. Freigabe für das createbookmarks() : wXbm_active=1 (bmakin' active)
;~  v2.72   createbookmarks()   : check bookmarkwindow before send text
;~          updatebookmarks()   : check bookmarkwindow before send text
;~  v2.73   dockstation()       : function removed from wXmodul() (status=8) and separated
;~  v2.74
;~  v2.75   fixoverviewerror()  : fixing f11 error
;~  v2.76   actwithtarget()     : act=800 stop ship introduced
;~  v2.77   locktarget()        : before locking targets check station first
Link to comment
Share on other sites

This script violates the TOS of EVE Online. Seeing how you do not understand the TOS, here is the excerpt from it that you are violating:

# CONDUCT

A. Specifically Restricted Conduct

Your continued access to the System and license to play the Game is subject to proper conduct. Without limiting CCP's rights to control the Game environment, and the conduct of the players within that environment, CCP prohibits the following practices that CCP has determined detract from the overall user experience of the users playing the Game:

1. You may not take any action that imposes an unreasonable or disproportionately large load on the System.

2. You may not use your own or third-party software to modify any content appearing within the Game environment or change how the Game is played.

3. You may not use macros or other stored rapid keystrokes or other patterns of play that facilitate acquisition of items, currency, objects, character attributes, rank or status at an accelerated rate when compared with ordinary Game play. You may not rewrite or modify the user interface or otherwise manipulate data in any way to acquire items, currency, objects, character attributes or beneficial actions not actually acquired or achieved in the Game.

4. You may not use the Software, or any information accessible through the System, to bypass the System login architecture or create or provide any other means through which the System may be accessed and/or the Game may be played by others, as, for example, through server emulators.

5. You may not engage in any conduct that results in an Account containing items, objects, currency, character attributes, rank, or status that are inappropriate for the level or rank of the character contained in the Account, including without limitation arranging, making or accepting transfers of items to a character without adequate consideration, thereby augmenting or aggregating items in an Account and increasing its value for an Account sale.

Link to comment
Share on other sites

For those who like reading the full TOS for EVE Online...

EVE OnlineThe World's Largest Game Universe

EVE Online

*

·Screenshots & Art

o ·Screenshots

o ·Concept Art

o ·Wallpapers

*

·Backstory

o ·Introduction

o ·EVE Chronicles

o ·Short Stories

o ·Scientific Articles

o

·Races

+ ·Overview

+

·Amarr

# ·Introduction

# ·Heirs

# ·Timeline

+

·Gallente

# ·Introduction

# ·Government

# ·Timeline

+

·Minmatar

# ·Introduction

# ·Tribes

# ·Timeline

+

·Caldari

# ·Introduction

# ·Corporate

# ·Timeline

+ ·Jove

o ·Organizations

o ·Alliances

*

·F.A.Q

o ·What is EVE Online?

o ·Paying for EVE?

o ·Account Management

o ·System Requirements

o ·Customer Support

o ·The Volunteer Program

o ·Further Information

*

·Features

o ·Overview

o ·Second Genesis

o ·New in Castor

o ·New in Exodus

o ·New in Cold War

o ·New in Red Moon Rising

o ·New in Revelations

o ·New in Revelations II

o ·New in Trinity

o ·Empyrean Age

o ·Quantum Rise

o ·Apocrypha

o ·Dominion

* ·Item Database

*

·Player Guide

o ·English

o ·Deutsch

* ·Purchase Account

*

·Fanfest

o

·2004

+ ·Photos

o

·2005

+ ·Photos

+ ·Videos

o

·2006

+ ·Diary

+ ·Photos

o

·2007

+ ·Recap

+ ·Photos

+ ·Alter Ego Results

o ·2008

o

·2009

+ ·PvP Tournament

*

·Community

o ·Fansites

o ·Toolkit

o ·Submit Fansite

* ·RSS Feeds

EVE Forums

* ·Forum Index

* ·Dev Finder

* ·Forum Rules

* ·Login

EVE Fanfest

EVE Alliance Tournament

* ·Overview

* ·Dates

*

·Schedule and Rankings

o ·Rankings

o ·Round 1

o ·Round 2

o ·Finals

*

·Rules

o ·Format

o ·Match Rules

o ·Prizes

* ·EVE TV

* ·Signups

* ·Forum

EVE Download

*

·EVE Client

o ·Tranquility (Live)

o ·Singularity (Test)

*

·EVE Patches

o ·Tranquility (Live)

o ·Singularity (Test)

o ·Multiplicity (Test)

*

·EVE Video

o ·Gameplay

o ·Trailers

o ·The Making of EVE

o ·3D Engine Tests

o ·Community Created

o ·Fanfest 2008

* ·EVE Music

EVE Insider

*

·Player News & Events

o ·Current News

o ·Submit News Leads

o ·Year 105 Overview

o

·Alliance Tournament

+ ·Overview

+

·Past Results

# ·Second

# ·Third

# ·Fourth

# ·Fifth

# ·Sixth

o ·Archive

*

·Dev Blog

o ·Blogs

o ·Archive

*

·Patch Notes

o ·Patch Notes

o ·In Testing

o ·In Development

o ·The Drawingboard

*

·Volunteer Program

o ·Information

*

·CSM

o ·Main

o ·Submission

o ·Candidates

o ·Results

o ·Meeting Minutes

* ·My Character

* ·Buddy Program

*

·Bug Reporting

o ·Submit Bug Report

o ·My Bug Reports

o ·Help

EVE Support

*

·Knowledge Base

o ·English

o ·Deutsch

* ·Create New Petition

* ·My Petitions

*

·Game Policies

o ·Overview

o ·EULA

o ·Terms of Service

o ·Chat Rules

o ·Terms of Use

o ·User Policy

o ·Reimbursement Policy

o ·Ban Policy

o ·Contests

* ·Known Issues

EVE News

* ·Game News

* ·Press

* ·Press Releases

* ·Awards and Accolades

* ·Newsletters

* ·Quotes

* ·News Archive

EVE Account Management

EVE Store

Search

EVE Chronicle

Serpent's Coil, a former military installation surrounded by rock formations. Occupied by agents of the Serpentis.

EVE Chronicle

Derbis and dead bodies from the Pit float around it, making it hazardous for ships to approach the crumbling mining station.

Fansites

Fansites

EVE® Online

END USER LICENSE AGREEMENT

ESRB Notice: Game Experience May Change During Online Play

Thank you for your interest in EVE, interactive online game ("EVE" or the "Game"). EVE is offered by CCP hf ("CCP"), a company based in Reykjavik, Iceland dedicated to the creation of next generation Internet games. EVE is a multiplayer role playing game that allows the participation of thousands of players around the world, interacting in the same game environment. You may play EVE using CCP's proprietary software (the "Software") that allows you to log into CCP's computer system (the "System") online and interact within the game environment created by CCP. To play, CCP requires that you review and agree to the following terms and conditions.

This End User License Agreement ("EULA") describes the terms and conditions under which you may (i) install and use the Software; and (ii) subscribe to, access and use EVE online. CCP may amend this EULA from time to time by posting an amended version at http://www.eve-online.com/pnp/eula.asp. If you accept this EULA, the then-current version of this EULA shall apply each time you access the System or play EVE.

By clicking the "ACCEPT" button below, and confirming your acceptance by clicking the "CONFIRMED" button (or if you bypass or otherwise disable the "ACCEPT" and/or "CONFIRMED" buttons, and still install, copy, download, access or otherwise use the Software or the Game), you accept the terms and conditions in the EULA. If you do not accept the terms and conditions in the EULA, you must click the "DECLINE" button, discontinue use of the Software and not access the System or use EVE. If you are the original purchaser of a boxed version of the Software on CD-ROM, you should contact the retailer for a refund. CCP does not manufacture or distribute the box version of the Game and is not responsible for refunding any fees relating thereto.

1. REQUIREMENTS TO PLAY

To play EVE, you must: (i) purchase a license to the Software (this may be available with the purchase of a boxed version of the Game and/or from the EVE web site http://www.eve-online.com); (ii) establish online a valid account (an "Account") and keep that Account active by paying the subscription fees on a timely basis; (iii) obtain and maintain your own Internet access (Internet access is required to play EVE; CCP is not responsible for your access to the Internet); and (iv) comply with the EULA.

2. YOUR ACCOUNT

You may establish only one (1) account for each copy of the Software licensed. If you wish to establish another Account, you must obtain another license for the Software (you may be able to do this by purchasing another boxed version of the Software or from the EVE Online web site http://www.eve-online.com).

A. Establishing a New Account

Upon establishing a new Account, you will be entitled to play EVE for up to thirty (30) days without paying the subscription fee (the "Trial Period"). If your Account is not terminated in accordance with the procedures set forth below within that thirty (30) day period, you will be charged the subscription fees as described during the registration process when you established your Account.

Only an individual, natural person who is an adult or, in the discretion of such an adult, his or her minor child, may establish an Account. You are responsible and liable for all activities conducted through your Account, regardless of who conducts those activities.

You may not share your Account with anyone, or allow anyone other than you personally (or your minor child, if you have registered an Account on behalf of your minor child) to access or use your Account. Joint or shared ownership or use of an Account by more than one user is prohibited.

Accounts may not be used for business purposes. Access to the System and playing EVE is intended for your personal entertainment, enjoyment and recreation, and not for corporate, business, commercial or income-seeking activities. Business entities and anyone who is acting for or on behalf of a business or for business purposes may not establish an Account, access the System or play EVE. Accessing the System or using the Game for commercial, business or income-seeking purposes is strictly prohibited.

B. Passwords and Names

You will be asked to select a password during the registration process ("Password"). You may not disclose your Password to anyone or allow anyone to use your Password to access the System or play EVE. You are responsible for maintaining the confidentiality of your Password and for any damage, harm, lost or deleted characters, etc. resulting from your disclosure, or allowing the disclosure, of any Password, or from use by any person of your Password. You may not obtain, attempt to obtain, use or attempt to use the password of anyone else. You are responsible for remembering your Account information and Password.

You will be assigned a login name and a character name during the registration and character creation process. You may not allow anyone to use your login name or character name to access the System or play EVE. No player may use the character name of another player to impersonate or falsely represent his or her identity. You may not obtain, attempt to obtain, use or attempt to use the login name or character name of anyone else.

You are encouraged to use a pseudonym, but you may not choose a name that violates anyone's trademarks, publicity rights or other rights. Acceptance of a pseudonym by the System does not mean that your chosen pseudonym does not violate anyone's rights. You are responsible for any liability incurred by yourself, CCP or anyone else due to the pseudonym you choose. CCP retains the right to reject any pseudonym it determines, in its sole discretion, is unlawful, indecent, obscene or otherwise violates standards of good taste.

C. Children

i. Responsibility for Account

Minor children may not establish an Account without the consent of a parent or guardian. If the user of EVE is a minor, a parent or guardian must complete the registration process to establish an Account, in which case the parent or guardian takes full responsibility for all obligations under the EULA and for all activities of the child using the Account. If you are a parent or guardian, you may permit one child to use the Account instead of you (in which case you may not use that Account).

If you establish an Account, you represent that you are an adult thirteen (13) years of age or older and are either accepting the EULA on behalf of yourself or on behalf of your child, in which latter case you agree to the EULA with regard to your child and represent that you are also personally bound by the EULA.

ii. Game Rating

EVE has a "TEEN" rating. Parents may find it inappropriate for use by children under the age of thirteen (13).

CCP has established Rules of Conduct (discussed below) for players accessing the System and may, but is not obligated to, monitor and take action regarding inappropriate conduct. Nonetheless, it is possible that at any time there may be language or other material accessible on or through the System that you may consider inappropriate for children or that may be offensive to some users of any age. You acknowledge that other players may transmit communications or content, or access to content, that you may consider inappropriate or objectionable. CCP does not, as a matter of policy, prescreen the communications or content transmitted by each player and is in no way responsible for the communications and content transmitted by players of the Game.

CCP does not knowingly collect any information about children under the age of thirteen (13) beyond that necessary to establish an Account and play the Game. CCP will not disclose such information to any third party except as set forth below.

3. ACCOUNT TRANSFER / CHARACTER TRANSFER

You are not permitted to transfer your account to another person. If you wish to discontinue your account please refer to section 6. of this EULA. You may transfer a character from your account to another account, either belonging to you or another person. This transfer option is available from the EVE Online Account Management web site https://secure.eve-online.com/login.asp and is subject to fees and the following limitations: You may not offer to transfer characters except your own, or act as a "broker" or intermediary (for compensation or otherwise) for anyone wishing to transfer or obtain characters. The transferee will obtain all rights to your character in a single transaction, and you will retain absolutely no control or rights over the characters, items or attributes of that character. You may not transfer any characters whose attributes are, in whole or in part, developed, or which own items, objects or currency obtained or acquired, in violation of the EULA.

Any character transfers or attempted transfers not in accordance with the foregoing terms is prohibited and void, and shall not be binding on CCP. A transfer or attempted transfer of a character is entirely at the risk of the parties to such transaction. CCP is not liable to any person (whether transferor, transferee or otherwise) for any acts, omissions, statements, representations, defaults or liabilities of the parties in connection with such a transaction.

4. SUBSCRIPTION FEES AND PAYMENT TERMS

After the Trial Period, you are required to pay a subscription fee to maintain your Account, access the System and play EVE. You are informed of the subscription fee and payment terms during the registration process. The current subscription fee and payment terms may be viewed at http://www.eve-online.com/pnp/pricing.asp, and are incorporated in the EULA by reference. CCP may amend the subscription fee and payment terms at any time.

All subscription fees are in U.S. Dollars or Euros and are non-refundable unless expressly stated otherwise in the EULA. When you establish your Account, you authorize CCP to automatically charge your credit card the subscription fees in accordance with the payment terms (as may be amended by CCP from time to time), plus any applicable taxes that CCP is required to collect. If CCP is unable to process your credit card at any time, your Account may be immediately suspended or terminated at CCP's discretion.

You are responsible for reviewing CCP's website for changes in the subscription fee or payment terms. If a change is unacceptable to you, you may, as your sole and exclusive remedy, terminate the EULA and close your Account as described in the termination section below. You are responsible for paying all applicable taxes (including those CCP is not required to collect) and for all hardware, software, Internet service and other costs you incur to access the System.

5. AMENDMENTS TO EULA

CCP may, in its sole discretion, amend the EULA from time to time. If the EULA is amended, you will be asked to review the amended EULA when you log into your Account, and to indicate and confirm your acceptance of the amended EULA by clicking the "ACCEPT" and/or "CONFIRMED" buttons.

If the amendment alters a material term of the EULA that is unacceptable to you, you may, as your sole and exclusive remedy, terminate the EULA and close your Account as described in the termination section below.

6. TERMINATION; SUSPENSION OF ACCOUNT

A. By CCP for Termination of the Game

CCP does not guarantee that it will continue to offer access to the System or support the Game. CCP may, in its sole discretion, cease to provide any or all of the services offered in connection with EVE (including access to the System and any or all features or components of the Game), terminate the EULA, close all Accounts and cancel all of the rights granted to you under the EULA. CCP may communicate such termination to you upon 30 days notice in any of the following manners: (i) when you log into your Account; (ii) in a notice on CCP's website; (iii) via electronic mail; or (iv) in another manner that CCP deems suitable to inform you of the termination. If CCP terminates the EULA pursuant to this section, you will not receive a refund of prepaid subscription fees.

B. By CCP for Breach or Misconduct

i. Suspension of Account

Without limiting CCP's rights or remedies, CCP may immediately, and without notice, discontinue or suspend access to the System through your Account, and any and all other Accounts that share the name, phone number, e-mail address, internet protocol address or credit card number with the discontinued or suspended Account, in the event of (i) a breach of the EULA (including the Rules of Conduct) by you or any user under your Account; or (ii) unauthorized access to the System or use of the Game by you or any user under your Account.

ii. Termination of EULA

CCP may terminate the EULA, close all your Accounts, and cancel all rights granted to you under the EULA if: (i) you fail to pay the subscription fee when due; (ii) CCP is unable to verify or authenticate any information you provide; (iii) you or anyone using any of your Accounts materially breaches the EULA, makes any unauthorized use of the System or Software, or infringes the rights of CCP or any third party; or (iv) CCP becomes aware of game play, chat or player activity under your Account that is, in CCP's discretion, inappropriate or in violation of the Rules of Conduct. Such termination shall be effective upon notice transmitted via electronic mail, or any other means reasonably calculated to reach you.

CCP reserves the right to terminate any and all other Accounts that share the name, phone number, e-mail address, internet protocol address or credit card number with the closed Account. Termination by CCP under this section shall be without prejudice to or waiver of any and all of CCP's other rights or remedies, all of which are expressly reserved, survive termination, and are cumulative. You will not receive a refund of prepaid subscription fees for a termination pursuant to this section.

C. By You

i. Anytime

You may terminate the EULA with regard to any or all of your Accounts at any time, upon notice to CCP via electronic mail. You will not receive a refund of prepaid subscription fees in the event of such termination.

ii. For a Change in the Subscription Fee or Payment Terms

If a change in the subscription fee or payment terms is unacceptable to you, you may, as your sole and exclusive remedy, terminate the EULA and close all of your Accounts by notifying CCP via electronic mail within thirty (30) days after the later of (a) the date that CCP has posted the change on its website; or (:) the date the change has impacted your Account (e.g., your credit card has been charged). Your notice must state: (i) that you do not agree to the change, specifically describing the change, and request CCP to close all of your Accounts; (ii) your player name and (iii) your login name. You may receive a refund of any prepaid subscription fees, prorated as of the effective date of your termination, by sending CCP a request via electronic mail within thirty (30) days of your termination notice. If you continue to access the System or use EVE more than thirty (30) days after the later to occur of (a) or (:) above, without following the termination procedure set forth above, you shall be deemed to have accepted the change and waive your rights to terminate under this section.

iii. For a Change in the EULA

If an amendment alters a material term of the EULA that is unacceptable to you, you may, as your sole and exclusive remedy, terminate the EULA and close your Accounts by: (a) clicking the "DECLINE" button when you are prompted to review and agree to the amended EULA; or (:P notifying CCP via electronic mail within thirty (30) days after the amended EULA was communicated to you, provided that you have not clicked the "ACCEPT" button, accessed the System or played the Game during that period. Your notice must state: (i) that you do not agree to the amended EULA, specifically describing the amendment(s) with which you disagree, and request CCP to close all of your Accounts; (ii) your player name and (iii) your login name. You may receive a refund of any prepaid subscription fees, prorated as of the effective date of your termination, by sending CCP a request via electronic mail within thirty (30) days of your termination notice. If you click "ACCEPT" or otherwise continue to access the System or play the Game, you shall be deemed to have accepted the amended EULA and waive your rights to terminate under this section.

D. Closed Accounts

If for any reason the EULA is terminated with regard to any or all of your Accounts, those Accounts will be closed, upon which all rights granted to you under the EULA shall terminate with regard to the closed Accounts, and you must discontinue your use of the Software, and you may not access the System or play the Game under any closed Account, and all the attributes of the Accounts, including characters, items and currency in the Accounts, will be lost. If for any reason the EULA is terminated, you will not be entitled to compensation for the past time you spent playing EVE, for the real or projected value of your Account were it to be sold, or for any other compensation, other than a prorated refund of prepaid subscription fees under certain circumstances as expressly set forth in the EULA.

Users whose Accounts have been closed may not access the System or play EVE in any manner or for any reason, including through any other Account, without the express written permission of CCP. Users of active accounts may not knowingly allow former users whose Accounts have been closed to use the active user's Accounts.

7. CONDUCT

A. Specifically Restricted Conduct

Your continued access to the System and license to play the Game is subject to proper conduct. Without limiting CCP's rights to control the Game environment, and the conduct of the players within that environment, CCP prohibits the following practices that CCP has determined detract from the overall user experience of the users playing the Game:

1. You may not take any action that imposes an unreasonable or disproportionately large load on the System.

2. You may not use your own or third-party software to modify any content appearing within the Game environment or change how the Game is played.

3. You may not use macros or other stored rapid keystrokes or other patterns of play that facilitate acquisition of items, currency, objects, character attributes, rank or status at an accelerated rate when compared with ordinary Game play. You may not rewrite or modify the user interface or otherwise manipulate data in any way to acquire items, currency, objects, character attributes or beneficial actions not actually acquired or achieved in the Game.

4. You may not use the Software, or any information accessible through the System, to bypass the System login architecture or create or provide any other means through which the System may be accessed and/or the Game may be played by others, as, for example, through server emulators.

5. You may not engage in any conduct that results in an Account containing items, objects, currency, character attributes, rank, or status that are inappropriate for the level or rank of the character contained in the Account, including without limitation arranging, making or accepting transfers of items to a character without adequate consideration, thereby augmenting or aggregating items in an Account and increasing its value for an Account sale.

B. Selling Items and Objects

You may not transfer, sell or auction, or buy or accept any offer to transfer, sell or auction (or offer to do any of the foregoing), any content appearing within the Game environment, including without limitation characters, character attributes, items, currency, and objects, other than via a permitted Character Transfer as described in section 3 above. You may not encourage or induce any other person to participate in such a prohibited transaction. The buying, selling or auctioning (or any attempt at doing so) of characters, character attributes, items, currency, or objects, whether through online auctions (such as ebay), newsgroups, postings on message boards or any other means is prohibited by the EULA and a violation of CCP's proprietary rights in the Game.

C. Compliance with Rules of Conduct

You agree to observe and abide by the Rules of Conduct as may be amended by CCP from time to time. The current version of the Rules of Conduct may be viewed at http://www.eve-online.com/pnp/terms.asp, and are incorporated in the EULA by reference.

8. PRIVACY AND CONFIDENTIALITY

A. Communications

Except for certain information in your Account (discussed below), all transmissions by you to the System are not private. You acknowledge and agree that you have no expectation of privacy regarding communications you make in the Game, whether through private in-Game messaging, during chat, or in chat rooms. CCP representatives may monitor communications made by or received from you. You should not provide private information to any other player in the Game. CCP shall not be responsible for the consequences of any such disclosure by you.

You may encounter and converse with people who are rude, offensive, belligerent, and who may use indecent, obscene, and/or threatening or harassing language while playing the Game. You may report any instances of such behavior to CCP. CCP will investigate and take such measures as CCP, in its sole judgment, determines are reasonable under the circumstances. CCP does not guarantee that you will not encounter behavior of others that you may view as insulting, demeaning, offensive, threatening or harassing. You assume all risk associated with playing the Game, and CCP assumes no responsibility for the conduct of any other players, and shall not be liable to you or any other person for their conduct.

B. Personal Information

CCP does not guarantee that personal information transmitted to the System, including without limitation information in your Account, will not be disclosed to third parties. While CCP's aim is to keep your personal information confidential and CCP employs security measures to protect the System, third parties may unlawfully intercept transmissions or private communications, or access data within the System. Additionally, CCP may (and you hereby expressly authorize CCP to) disclose information about you to private entities, law enforcement or other government officials, as CCP, in its sole discretion, deems necessary or appropriate to investigate or resolve possible crimes or to respond to judicial, regulatory, agency or similar inquiries.

CCP may monitor usage of the System to gather statistical information that it may disclose to third parties. CCP may also contact you using the information you provided to, for example, provide technical support, respond to user inquiries, transmit questionnaires and offer products and services. You may also verify and update your Account information by logging into your Account through the account management page at https://secure.eve-online.com/login.asp.

9. SEIZURE WARNING

In rare instances, some users may experience seizures when exposed to certain light patterns or flashing lights. Exposure to certain light patterns or backgrounds on a video monitor may induce an epileptic seizure, even in persons who have no history of prior seizures or epilepsy.

10. LICENSE

A. Software License

Subject to the terms of the EULA, CCP grants you a limited, non-exclusive, revocable license to use the Software and its accompanying documentation solely in connection with accessing the System in order to play EVE using a single valid Account.

For each valid Account you maintain, you may install a copy of the Software on, and access the System from, a single computer or Game platform, and from a secondary computer if you so choose. You must purchase a separate license to the Software for each additional Account you register; e.g., if you have 2 Accounts, you must have 2 licensed copies of the Software. You may not use more than one Account with a single licensed copy of the Software. You may make one (1) copy of the Software for backup or archival purposes.

B. License to Access the System to Play the Game

Upon establishing a valid Account, and subject to your continued compliance with the EULA, CCP grants you a limited, non-exclusive, revocable license to access the System, and to access and use the Game Content and User Content (each as defined below), in order to play EVE online. You may download (and, to the extent permitted by the System, make a single copy for your own purposes in playing the Game) and exchange Game Content and User Content exclusively via a valid Account, solely to play the Game, for purposes permitted by, and in a manner consistent with, the EULA.

C. Specific Restrictions

Any and all rights not expressly granted by CCP herein are reserved, and no license, permission or right of access or use not granted expressly herein shall be implied.

You may not intercept for any purpose other than playing EVE in accordance with the EULA any information accessible through the System. You may not access the System or upload, download or use information accessible through the System, other than as permitted by the EULA.

You may not copy (except as set forth above), distribute, rent, lease, loan, modify or create derivative works of, adapt, translate, perform, display, sublicense or transfer the Software or any documentation accompanying the Software. You may not transfer the Software, except as part of a permitted Account Transfer as described above, if permitted by the EULA then in effect. If the Software is an update, any transfer must include the update and all prior revisions.

You may not copy, distribute, rent, lease, loan, modify or create derivative works of, adapt, translate, perform, display, sublicense or transfer any information accessible through the System, including without limitation, any part of the Game Content or User Content, or any item, object or character in your Account, except that, solely to the extent permitted by the System, you may modify certain Game Content and User Content only for your own purposes in playing the Game.

You may not reverse engineer, disassemble or decompile, or attempt to reverse engineer or derive source code from, all or any portion of the Software, or from any information accessible through the System (including, without limitation, data packets transmitted to and from the System over the Internet), or anything incorporated therein, or analyze, decipher, "sniff" or derive code (or attempt to do any of the foregoing) from any packet stream transmitted to or from the System, whether encrypted or not, or permit any third party to do any of the same, and you hereby expressly waive any legal rights you may have to do so. If the Software and/or the System contains license management technology, you may not circumvent or disable that technology.

D. Software Updates

CCP may from time to time update or otherwise modify the Software electronically. You hereby grant CCP permission to: (i) extract hardware system profile data from your computer; (ii) extract information from your computer's file directories pertaining to the Game and your ability to access the System; (iii) download to your computer content and Game files and any data related to the operation of the Game. The foregoing applies to any computer from which you log into the System using your Account.

E. New Releases of the Software

You are not entitled to receive any new releases of the Software, or any expansion packs, updates, upgrades or similar products under the EULA, but CCP may, in its sole discretion, offer any or all of the foregoing to you. CCP may update, upgrade or otherwise enhance the Software at any time, in its sole discretion, without obligation to you. Periodically, CCP will require all users to migrate to new releases of the Software in order to continue accessing the System and playing EVE. You will be informed when a new release is available and will have a period of time in which to procure and install the new release. You must install and use the new release before the period of time has lapsed to continue accessing the System and playing EVE. If you fail to install the new release when required, CCP shall not be responsible in any way for your inability to access the System or play EVE, and you shall not be entitled to receive a refund of any prepaid subscription fees or any other form of compensation. New releases could be offered to you at a discounted price.

11. PROPRIETARY RIGHTS

A. Ownership of Software, System and Game

As between you and CCP, CCP is the sole and exclusive owner of the Software, System, Game and Game Content (as defined below). The Software, System, Game and all Game Content are protected by law governing copyrights, trademarks and other proprietary rights. CCP reserves all rights not expressly granted herein.

The Game is comprised of, without limitation, software code, programs, routines, subroutines, objects, files, data, characters (and items, currency, objects and attributes comprising or associated with a character or an Account), graphics, sound effects, music, animation, video, text, content, layout, design and other information downloaded from and accessible through the System (collectively, the "Game Content"). CCP, its affiliates, licensors and/or suppliers retain all of their right, title and interest (including without limitation all intellectual property rights) in and to the Software, System, Game and all Game Content, and no rights thereto are transferred to you, except for the limited license granted above.

B. Rights to Certain Content

You have no interest in the value of your time spent playing the Game, for example, by the building up of the experience level of your character and the items your character accumulates during your time playing the Game. Your Account, and all attributes of your Account, including all corporations, actions, groups, titles and characters, and all objects, currency and items acquired, developed or delivered by or to characters as a result of play through your Accounts, are the sole and exclusive property of CCP, including any and all copyrights and intellectual property rights in or to any and all of the same, all of which are hereby expressly reserved.

Without limiting its rights in any way, and subject to the other terms of the EULA, CCP shall have the right to display and publish any information (except certain personal information in your Account) relating to any character in your Account, for example, in charts, lists and other compilations, without notice or any compensation to you whatsoever.

You hereby irrevocably and without additional consideration beyond the rights granted to you herein, assign to CCP any and all right, title and interest you have, including copyrights, in or to any and all information you exchange, transmit or upload to the System or while playing the Game, including without limitation all files, data and information comprising or manifesting corporations, groups, titles, characters and other attributes of your Account, together with all objects and items acquired or developed by, or delivered by or to characters, in your Account. To the extent that any such rights are not assignable, you hereby grant CCP an exclusive, perpetual, worldwide, irrevocable, assignable, royalty-free license, fully sublicensable through multiple tiers, to exercise all intellectual property and other rights, in and to all or any part of such information, in any medium now known or hereafter developed. The foregoing assignment and license in this paragraph shall not include User Content (defined below).

C. User Content

The System may allow you to communicate information, such as by posting messages in chat rooms, on bulletin boards and other user-to-user areas (collectively, "User Content").

User Content that you cause to be communicated to the System may not (i) violate any statute, rule, regulation or law; (ii) infringe or violate the intellectual property, proprietary, privacy or publicity rights of any third party; (iii) be defamatory, indecent, obscene, child pornographic or harmful to minors; or (iv) contain any viruses, Trojan horses, disabling code, worms, time bombs, "clear GIFs," cancelbots or other computer programming or routines that are intended to, or which in fact, damage, detrimentally interfere with, monitor, intercept or expropriate any data, information, packets or personal information.

CCP may take any action it deems appropriate regarding any User Content, if CCP believes, in its sole discretion, that such User Content violates the EULA or may expose CCP, its licensors and/or its suppliers to liability, damage CCP's relationship with any of its suppliers, licensors, ISPs or other users of EVE, harm anyone or harm CCP's reputation or goodwill.

You hereby grant CCP an exclusive, perpetual, worldwide, irrevocable, assignable, royalty-free license, fully sublicensable through multiple tiers, to exercise all intellectual property and other rights, in and to all or any part of your User Content, in any medium now known or hereafter developed.

Violation of CCP's proprietary rights is a material breach of the EULA, in the event of which CCP may suspend your Account, terminate the EULA and take whatever additional action CCP deems appropriate under the circumstance. The foregoing is without prejudice to or waiver of any and all of CCP's other rights and remedies, all of which are expressly reserved, survive termination, and are cumulative.

12. NO WARRANTIES

The Software, System, Game and all Game Content, and all other services and material provided in connection therewith, are provided "AS IS," with all faults, and without warranty of any kind. You assume all risk of use and all risk associated with accessing the System and playing the Game.

CCP disclaims all warranties, whether express or implied, including without limitation the warranties of merchantability, fitness for particular purpose and non-infringement. There is no warranty against interference with your enjoyment of the Game. CCP does not warrant that the operation of the System or your access to the System, or that your use of the Software, will be uninterrupted or error-free, nor that the System or Software will be compatible with your hardware and software.

While CCP attempts to have the System available at most times, CCP does not guarantee that the System will always be available, or that the System will not become unavailable during Game play. The System may become unavailable for a number of reasons, including without limitation during the performance of maintenance to the System, for the implementation of new software, for emergency situations and due to equipment or telecommunications failures.

13. DISCLAIMER OF DAMAGES

In no event shall CCP, its affiliates, licensors or suppliers be liable to you or to any third party for any special, indirect, incidental, consequential, punitive or exemplary damages (including without limitation, lost profits or lost data), arising out of or in connection with your Account, the System, Software, Game, Game Content, User Content, EULA, or any other services or materials provided in connection therewith, whether based on warranty, contract, tort or any other legal theory, and whether or not CCP is advised of the possibility of such damages, and even if any stated remedy fails of its essential purpose.

14. LIMITATION OF LIABILITY

Except as set forth below, CCP's maximum liability for any and all claims arising out of or in connection with your Account, the Software, System, Game, Game Content, User Content, EULA, and any other services or materials provided in connection therewith, shall not exceed an amount equal to the value of one (1) month's subscription fees.

In the event of a material breach of CCP's obligations to provide access to and use of your Account, the System, Game, Game Content or User Content, your sole and exclusive remedy shall be a refund of any pre-paid subscription fees attributable to the period during which you were denied such access and use, or an amount equal to the value of three (3) months' subscription fees, whichever is less. In the event of a malfunction of or your inability to use the CD-ROM containing the Software, your sole and exclusive remedy shall be a replacement disk from the vendor that provided the CD-ROM in accordance with its replacement policy; CCP shall have no liability for the CD-ROM.

If any of the foregoing disclaimers or limitations of liability are declared to be void or unenforceable, then CCP's liability shall be limited to the maximum extent permissible under applicable law. The remedies set forth herein are exclusive and in lieu of all other remedies, oral or written, express or implied.

15. INDEMNITY

You shall defend, indemnify and hold harmless CCP and its affiliates, licensors and suppliers, and their respective employees, contractors, officers and directors, from any and all claims, loss, damages and demands, including reasonable attorneys' fees, arising out of: (i) your use or misuse of the Software; (ii) your access to the System; (iii) any activities conducted through your Account (whether by you or another person); and (iv) your playing of the Game.

16. GOVERNING LAW AND EXCLUSIVE FORUM

The EULA, and the rights and obligations of the parties hereto, shall be governed and construed by and in accordance with the laws of the Republic of Iceland. The EULA shall not be governed by the United Nations Convention on Contracts for the International Sale of Goods.

The sole and exclusive forum for resolving any controversy, dispute or claim arising out of or relating to the EULA, or otherwise relating to any rights in, access to or use of the Software, System, Game, Game Content, User Content and/or the rights and obligations of the parties hereto, shall be the District Court of Reykjavík, Iceland, (Héraðsdómur Reykjavíkur). You hereby expressly waive and agree not to raise any and all objections based on personal jurisdiction, venue and/or inconvenience of such forum and agree to the jurisdiction of the District Court of Reykjavík, Iceland.

17. MISCELLANEOUS

If any part of the EULA is held invalid or unenforceable, that portion shall be construed in a manner consistent with applicable law to reflect, as nearly as possible, the original intentions of the parties expressed in the EULA, and the remaining portions shall remain in full force and effect.

You shall comply with all applicable laws regarding your access to and use of the System, use of the Software, your access to your Account and your playing of the Game. Without limiting the foregoing, you may not download, use or otherwise export or re-export any part of the information accessible through the System or the Software except in full compliance with all applicable laws and regulations.

Except as otherwise provided herein, you may not assign or transfer the EULA or your rights thereunder, and any attempt to do so is void. The EULA, including the Rules of Conduct and the subscription fees and payment terms as referenced therein, as each may be amended by CCP from time to time, sets forth the entire understanding and agreement between CCP and you with respect to the subject matter hereof. Except as provided above, or in a writing signed by both parties, the EULA may not be modified or amended. No distributor, agent or employee of CCP is authorized to make any modifications or additions to the EULA.

All notices to CCP required or permitted by the EULA shall be by electronic mail at support@eve-online.com, unless stated otherwise in the EULA.

Updated January 19, 2008

Website terms of service - About us - Contact - Affiliate Program - Privacy Policy

Copyright © CCP 1997-2009

Link to comment
Share on other sites

  • 4 months later...

Dear Community,

that you all know (if not already be4):

It isnt allowed to use any 3rd-party software (bots) in this game.

Though it isnt a break of law, it is against the EULA settled up from the

game publisher and if they catch you, it may lead to a permanent ban

of your account.

So be aware and dont be a retard.

This bot is provided without any warranty (isnt this self-evident?!) so

dont cry if anything undesirable happens. Is is for the ones of you that

dont care (ur bad boy) and for all of us that have fun to check if it would

work.

Steve :(

Link to comment
Share on other sites

I have a feeling this guy will not be around here for long.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

  • Developers

So be aware and dont be a retard.

You know what: will be that retard.

Don't bother posting here again or else I will help you with that.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...