this is an updated version of the forage script created by tehghosthawk he is the original creator of this script and i do not try to take credit for it, only the changes in combat that i added.
this was designed for a commando that has the Heal over time and regualr heal... i also added a part for people that have pets(not much work on that as i do not use them often)
as the last program you must change the portrate cordinates to your professions symbal on a white part, you must also change the heal and action cordinates to somewere on you heal and action bar that is full, and last you must make the healthlow cordinates as spot on you health bar that is 1/6 full (aka health low)
once in a while the combat gets buggy and i will find my mando still healing itself but hasnt attacked in like 30min but is alive lol
i originaly started using this on naboo but have sence moved to tatooine due to spawns of large higher lvl groups on naboo
anyway here is the edited script:
Code: Register to unlock hidden link
;original script is by tehghosthawk
;new modifications by nickobelenus
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
Opt("MouseClickDragDelay", 100)
#Include <Misc>
;StarWarsGalaxies Forager Version 3 with Auto Delete and improved combat
Sleep("5000")
;Created a /forage macro and mapped it to N
$i = 0
$var1 = "5"; How many times you want to forage Left/Right before going forward
SplashTextOn ( "Setup", "Leftclick on the Main Spot (where foraged item will be)", 400, 100, -1, -1, 1, "Ariel", 14 )
While 1
Sleep ( 100 )
If _IsPressed ( "01" ) Then
$pos = MouseGetPos()
ExitLoop
EndIf
WEnd
SplashOff()
$var3 = $pos[0]
$var4 = $pos[1]
Sleep (1000)
SplashTextOn ( "Setup", "Leftclick on the Backpack", 400, 100, -1, -1, 1, "Ariel", 14 )
While 1
Sleep ( 100 )
If _IsPressed ( "01" ) Then
$pos = MouseGetPos()
ExitLoop
EndIf
WEnd
SplashOff()
$var5 = $pos[0]
$var6 = $pos[1]
Sleep (1000)
;Sets our coords for PixelChecksum to use as a template - also sets us up to check it in the future
$portraitx = 28
$portraity = 36
$healthx = 242
$healthy = 38
$healthlowx = 92
$healthlowy = 38
$actionx = 241
$actiony = 45
$CombatCheck = PixelGetColor(($portraitx), ($portraity))
$HealthCheck = PixelGetColor(($healthx), ($healthy))
$HealthlowCheck = PixelGetColor(($healthlowx), ($healthlowy))
$ActionCheck = PixelGetColor(($actionx), ($actiony))
;Start our loop
Do
For $x = 1 to $var1
CheckCombatState()
Send("{a down}")
Sleep ("1300")
Send("{a up}") ;
Sleep("500")
Send("{n down}")
Send("{n up}")
Sleep("100")
MouseClick ( "right" , $var3, $var4, 1 )
Sleep("200")
send("{2}")
Sleep("200")
MouseClickDrag ( "left" , $var3, $var4, $var5, $var6, 1)
Sleep ("1200")
Next
send("{d down}")
Send("{w down}")
Sleep ("1200")
Send("{w up}")
Send("{d up}")
Sleep ("50")
For $x = 1 to $var1
CheckCombatState()
Send("{d down}")
Sleep ("1300")
Send("{d up}")
Sleep("500")
Send("{n down}")
Send("{n up}")
Sleep("100")
MouseClick ( "right" , $var3, $var4, 1 )
Sleep("200")
send("{2}")
Sleep("200")
MouseClickDrag ( "left" , $var3, $var4, $var5, $var6, 1)
Sleep ("1200")
Next
Send("{a down}")
Send("{w down}")
Sleep ("1200")
Send("{w up}")
Send("{a up}")
Sleep ("50")
Until $i = 1
;Pause Script
Func CheckCombatState()
If PixelGetColor(($portraitx), ($portraity)) = $CombatCheck Then
return
Else
Do
;Combat Routine
send("{TAB}") ;Change this to your hotkey to cycle target outward
send("z") ;Change this to your hotkey to Autoattack
send(".") ;Change this to your Kill macro
send("b") ;change to pet macro if u have one
If PixelGetColor(($healthlowx), ($healthlowy)) = $HealthlowCheck Then
sleep("500")
Else
send(",") ;change to other heal if avalible
EndIf
Until PixelGetColor(($portraitx), ($portraity)) = $CombatCheck
Do
If PixelGetColor(($healthlowx), ($healthlowy)) = $HealthlowCheck Then
sleep("500")
Else
send(",") ;change to other heal if availble
EndIf
Until PixelGetColor(($healthx), ($healthy)) = $healthCheck and PixelGetColor(($actionx), ($actiony)) = $ActionCheck
EndIf
return
EndFunc
;Pause Script
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script Paused',0,0)
WEnd
ToolTip("")
EndFunc
;Terminate Script
Func Terminate()
Exit 0
EndFunc
this may be helpfull to someone here that has the problem comming back to the computer to find urself dead with the old script this script doesnt start forageing agian after battle until health and action are full so u dont get into another fight right away and die