If you are planning to use this for farming items, remove the semicolon on line 578 -> ;PickUpLoot()
This is an excerpt from the StayAlive function;
Code:
If IsRecharged($shroud) Then
If $lSpellCastCount > 0 And DllStructGetData(GetEffect($SKILL_ID_SHROUD), "SkillID") == 0 Then
UseSkillEx($shroud)
ElseIf DllStructGetData($lMe, "HP") < 0.6 Then
UseSkillEx($shroud)
ElseIf $lAdjCount > 20 Then
UseSkillEx($shroud)
EndIf
EndIf
Evidently the code doesn't care if Shadow Form is expiring, it will just cycle through all the maintained skills and try and cast Shadow Form in-between.
The simplest solution to this is to add a condition based on the remaining skill duration of Shadow Form, such as if Shadow Form is near expiration, don't bother casting the other maintenance skills.
Unfortunately functions like GetEffectTimeRemaining appear to be broken (I'm guessing we just need to update those headers.) so I went down a simpler route and made use of a timer.
I've declared a global timer
$timer in the head section and whenever Shadow Form is cast the timer is reinitialised
Code:
Func UseSF($lProximityCount)
If IsRecharged($sf) And $lProximityCount > 0 Then
UseSkillEx($paradox)
UseSkillEx($sf)
$timer = TimerInit()
EndIf
EndFunc
We can then estimate a point where we wouldn't want to cast maintenance skills, I've gone with a very conservative 15 seconds.
Example
Code:
If IsRecharged($shroud) And TimerDiff($timer) < 15000 Then
If $lSpellCastCount > 0 And DllStructGetData(GetEffect($SKILL_ID_SHROUD), "SkillID") == 0 Then
UseSkillEx($shroud)
ElseIf DllStructGetData($lMe, "HP") < 0.6 Then
UseSkillEx($shroud)
ElseIf $lAdjCount > 20 Then
UseSkillEx($shroud)
EndIf
EndIf
Akin to the above, I was also bothered by the pre-kill sequence, it would just walk to the final position and start casting Arcane Echo followed by Wastrels.
Instead I've dialled in a do until loop which waits for SF to be cast
Code:
;Out("Blocking enemies in spot")
MoveAggroing(12920, -17032, 30)
MoveAggroing(12847, -17136, 30)
MoveAggroing(12720, -17222, 30)
WaitFor(300)
MoveAggroing(12617, -17273, 30)
WaitFor(300)
MoveAggroing(12518, -17305, 20)
WaitFor(300)
MoveAggroing(12445, -17327, 10)
;Avoids a rare-ish occurence where the bot starts the kill sequence just before SF runs out. Most noticeable on non assassin primary professions.
Out("Waiting for Shadow Form")
Local $lDeadlock_2 = TimerInit()
$sfTime = TimerDiff($timer)
Out($sfTime)
Do
WaitFor(100)
If GetIsDead(-2) = 1 Then Return
Until (TimerDiff($timer)) < $sfTime Or (TimerDiff($lDeadlock_2) > 20000)
UseSF(True)
Out("Shadow Form casted")
Kill()
I left this running over night on my Mesmer, woke up to 155 runs and 1 fail. Pretty happy with it considering it got me Legendary Survivor without breaking a sweat.
I'm going to take a stab and say the one death was related to the Wastrels spam in the Kill() function, it also does not care if SF is near expiration.
Skills & Equipment For Mesmers
Skills: OQdUAQROqPP8Id2BkAiAvpLBTAA
Domination 9+1+1
Fast Casting 8+1
Full Blessed, 3 Attunement Runes
Anniversary Shield with "Like A Rolling Stone"
Peace :mofo:
Second test results 195:0
[Only registered and activated users can see links. Click Here To Register...]