Quote:
Originally Posted by vodoulou
thank you maril. one question about survivor title option. ive yet to see it auto-resign and ive been at 20 hp, luckily healed myself but what determines pre death that it will resign u, just curious
|
Code:
Func LDoASurvivor_LowHealth() ;Checks for low health and cancel run if in danger
Local $HealthHP
$HealthHP = ((GetHealth(-2)) * 100/(DllStructGetData(GetAgentByID(-2), 'MaxHP')))
If ($HealthHP < 20) Then
logFile("Danger detected : Re-trying.")
AdlibUnRegister("LDoASurvivor_LowHealth")
LDoA2()
EndIf
EndFunc
So this is the function which is managing the Resign decision. What it does is that it checks if player's health is under 20% then it sends instructions to restart LDoA2 job at start. In LDoA2 function, you can see that it checks if the player is in Foible's Fair, if not and if the mapID is the explorable zone just in front of Foible's Fair : it makes the player resign and go back to outpost.
Code:
Func LDoA2()
Local $MapID = GetStartMapByJobID(1,2)
AdlibUnRegister("LDoASurvivor_LowHealth")
If GetMapID() <> $MapID Then
logFile("Moving to Outpost")
If (GetMapID() == 161) Then
ResignAndReturn()
WaitMapLoading($MapID)
Else
Do
RndTravel($MapID)
rndslp(500)
Until GetMapID() = $MapID
EndIf
EndIf
There's some improvements for me to do. Like adjusting the health's percentage which triggers the resign. Unfortunatly I was only able to test it on a lvl19 character so I've found that 20% was optimal, but may be lower levels gonna need a much higher % to stay alive.
Doing that, absolutly need feedbacks from bot users' : You guys. And I want to thanks everyone who gave me some feedbacks on the bot.