thought I'd post this question to the masses as well to see if I could get any additional help.
after playing around with scripting, I thought it might make sense to create a function explicitly for checking for Falken. To do that I used this script:
Code:
Func Falken()
TargetNearestAlly()
if GetNumberOfAlliesInRangeOfAgent(-2,1250) > 0 Then
Out("Falken Punch!!!")
$NoSpawn = $NoSpawn + 1
GUICtrlSetData($NoSpawnLabel, $NoSpawn)
Resign()
Sleep(3000)
Do
Sleep(50)
Until GetIsDead(-2) = True
ReturnToOutpost()
WaitMapLoading($Beetletun)
Else
$bCanContinue = True
EndIf
EndFunc
the good news is that the function works at detecting Falken and resigning. the problem is that I don't think I know the proper way to implement it. I tried just injecting it into the MainFarm() function in the script. The problem is that when it resigns due to Falken, it then wants to go ahead and continue the rest of the function and starts moving around in Beetletun instead of exiting out to restart the MainFarm() loop. I'm clearly missing some if-then statement that would kill the MainFarm() function and start again, but I'm not sure what.
here's how I just slapped it into the MainFarm() code:
Code:
Func MainFarm()
Local $lTimer, $lTime
Local $lDeadlock
Local $lDebug, $lDebugTime
Sleep(1000)
Move(22500, -11700)
WaitMapLoading($NeboTerrace)
$lTimer = TimerInit()
Out("Begin run #" & $Runs)
Falken()
MoveTo(-10998, 18328)
MoveTo(-8005, 17962)
UseSkillEx($DE, -2)
MoveTo(-3618, 17264)
MoveTo(-1077, 16959)
Out("Checking Spawn...")
TargetNearestAlly()
if GetNumberOfAlliesInRangeOfAgent(-2,1250) > 4 Then
$bCanContinue = True
Else
$bCanContinue = False
EndIf
If $bCanContinue = True Then
Out("Found spawn")
Out("Waiting for text")
Sleep(35000)
Out("Pre buff")
UseSkillEx($SOD, -2)
$lDeadlock = TimerInit()
Do
Sleep(50)
Until GetNumberOfFoesInRangeOfAgent(-2, 1250) > 0 Or TimerDiff($lDeadlock) > 50000
UseSkillEx($IAU, -2)
UseSkillEx($EBSOH, -2)
Fight()
If $bCanContinue = True Then PickUpLoot()
If $bCanContinue = True Then $EnemiesKilled = $EnemiesKilled + 7
Resign()
Sleep(3000)
Do
Sleep(200)
Until GetIsDead(-2) = True
ReturnToOutpost()
WaitMapLoading($Beetletun)
Else
Out("No spawn, restarting")
$NoSpawn = $NoSpawn + 1
GUICtrlSetData($NoSpawnLabel, $NoSpawn)
Resign()
Sleep(3000)
Do
Sleep(50)
Until GetIsDead(-2) = True
ReturnToOutpost()
WaitMapLoading($Beetletun)
EndIf
$Runs = $Runs + 1
GUICtrlSetData($RunsLabel, $Runs)
Out("Run finished")
Sleep(200)
Sleep(200)
EndFunc
so if anyone can help me understand how I messed this up, I'll work on tweaking it and releasing an updated version.