Ah yes, i suspected there is a reason.
Maybe you can explain it ?
Look at the 2 functions:
Code:
;~ Description: Use a skill.
Func UseSkill($aSkillSlot, $aTarget, $aCallTarget = False)
Local $lTargetID
If IsDllStruct($aTarget) = 0 Then
$lTargetID = ConvertID($aTarget)
Else
$lTargetID = DllStructGetData($aTarget, 'ID')
EndIf
DllStructSetData($mUseSkill, 2, $aSkillSlot)
DllStructSetData($mUseSkill, 3, $lTargetID)
DllStructSetData($mUseSkill, 4, $aCallTarget)
Enqueue($mUseSkillPtr, 16)
EndFunc ;==>UseSkill
;~ Description: Use a skill and wait for it to be used.
Func UseSkillEx($lSkill, $lTgt = -2, $aTimeout = 3000)
If GetIsDead(-2) Then Return
If Not IsRecharged($lSkill) Then Return
Local $Skill = GetSkillByID(GetSkillBarSkillID($lSkill, 0))
Local $Energy = StringReplace(StringReplace(StringReplace(StringMid(DllStructGetData($Skill, 'Unknown4'), 6, 1), 'C', '25'), 'B', '15'), 'A', '10')
If GetEnergy(-2) < $Energy Then Return
Local $lAftercast = DllStructGetData($Skill, 'Aftercast')
Local $lDeadlock = TimerInit()
UseSkill($lSkill, $lTgt)
Do
Sleep(50)
If GetIsDead(-2) = 1 Then Return
Until (Not IsRecharged($lSkill)) Or (TimerDiff($lDeadlock) > $aTimeout)
Sleep($lAftercast * 1000)
EndFunc ;==>UseSkillEx
UseSkill is simple. It says useskill in which slot on your skillbar.
UseSkillEx asks if you are dead, because if you try and use a skill and are dead, you may disconnect. If the skill is not recharged, it won't let you use the skill, because the game won't either. If you don't have enough energy, it won't let you use the skill or try. It also accounts for aftercast so you don't try and use another skill before this one is cast. It also has sleeps to wait for it to be recharged/alive/timer.
Look at the code it tells you what it does and why should be evident.
May i ask why UseSkillEx is present in the "old" GWA2 but not in the new one?, ty for your time!.
I have an old copy of the official GWA2 3.6.9 (it was posted as official on ************)(I attached it here for historical sake).
EDIT:
UseSkillEx is not in there. I don't know who wrote the first iteration of it.
I believe GWA2.au3 version 3.6.9 was released public, then GWAddsOn.au3 came along with additional handy functions ported over from GWCA. GWAddsOn stayed its own file to keep GWA2 clean, but over time and many authors later, hundreds of GWA2 versions existed.
I may be way off on my history since I was not around until 2011-2012 on GR.
I attached a copy of GWAddsOn, but don't know which version it is. I believe ddarek wrote this copy.
Soup with beans and mushrooms 04/22/2018 - Off Topic - 2 Replies Advise me a delicious soup, in which one of the ingredients should be mushrooms and beans. Recently tried macaroni with broccoli and corn..it was AMAZING (never eaten something like this :D )
JOIN MY SERVER :D TO 1v1 Me We have quick soup 07/12/2013 - Minecraft Server Advertising - 0 Replies 99.166.172.145 Is the ip come on to 1v1 me in iron or op armour your choice its just until the servver finishes
:handsdown: