SHARE
TWEET

Untitled

a guest May 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Func PartyCallback($hwnd, $msg, $wparam, $lparam)
  2.     $recvCDS = DllStructCreate("ULONG_PTR;DWORD;PTR", $lparam) ;COPYDATASTRUCT
  3.  
  4.     If DllStructGetData($recvCDS, 1) = 2 Then
  5.         $partyInfo = DllStructCreate($tagPARTYINFO, DllStructGetData($recvCDS, 3)) ;See Struct definition in GWCAConstants.au3
  6.         $ahHndl = _GWCAMemOpen (WinGetProcess($sGW))
  7.         If DllStructGetData($partyInfo, "TeamId") = $myTeamID Then
  8.             For $i = 0 To 3 Step 1
  9.                 $hp[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "HP")
  10.                 $id[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "Id")
  11.                 $Effects[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "Effects")
  12.                 $Name[$i] = _GWCAMemRead (DllStructGetData($partyInfo, "Agent" & $i + 1 & "Name"), $ahHndl, "wchar[24]")
  13.                 $posx[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "X")
  14.                 $posy[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "Y")
  15.                 $prof[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "Primary")
  16.                
  17.             Next
  18.         Else
  19.             For $i = 0 To 3 Step 1
  20.                 $eID[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "Id")
  21.                 $eTarget[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "Target")
  22.                 $eSkill[$i] = DllStructGetData($partyInfo, "Agent" & $i + 1 & "Skill")
  23.             Next
  24.         EndIf
  25.         _GWCAMemClose ($ahHndl)
  26.         $bGotInfo = True
  27.     ElseIf DllStructGetData($recvCDS, 1) == 1 And $evade == 1 Then
  28.         $skillStruct = DllStructCreate($tagSKILLLOGSTRUCT, DllStructGetData($recvCDS, 3))
  29.         $sk = DllStructGetData($skillStruct, "SkillId")
  30.         If DllStructGetData($skillStruct, "TargetId") == $myid Then
  31.             If $sk == 1198 Or $sk == 229 Then
  32.                 out ("trying to evade skill: " & $sk)
  33.                 Dodge(DllStructGetData($skillStruct, "AgentId"))
  34.             ElseIf isrupt ($sk) Then
  35.                 cmd ($CA_CancelAction)
  36.                 out ("interrupt avoided...")
  37.             ElseIf isknockdown ($sk) Then
  38.                 cmdCB ($CA_SkillRecharge, 7)
  39.                 If $cbVar[0] == 0 Then
  40.                     ;cmdcb ($CA_GetMyMaxEnergy)
  41.                     ;If $cbVar[1] > 5 Then
  42.                     cmd ($CA_UseSkill, 7, -2)
  43.                     out ("knockdown avoided..")
  44.                     ;EndIf
  45.                 Else
  46.                     cmdcb ($CA_GetEffectDuration, $skill[7])
  47.                     If $cbVar[1] > 0 Then Return
  48.                     cmdCB ($CA_SkillAdrenaline, 8)
  49.                     If $cbVar[0] = 200 Then
  50.                         cmd ($CA_UseSkill, 8, -2)
  51.                         out ("knockdown alternative.. 75% chance to avoid")
  52.                     EndIf
  53.                 EndIf
  54.             EndIf
  55.         ElseIf isAoE ($sk) Then
  56.         ElseIf $bShouldCast And $sk == $bIsCasting[1] And DllStructGetData($skillStruct, "AgentId") == $myid Then
  57.             out("$bShouldCast = False")
  58.             out("$bIsCasting = True")
  59.             $bShouldCast = false
  60.             $bIsCasting[0] = True
  61.         EndIf
  62.        
  63.     Else
  64.         out (DllStructGetData($recvCDS, 1) & "--")
  65.     EndIf
  66. EndFunc   ;==>PartyCallback
  67.  
  68. Func SkillCancelCallback($hwnd, $msg, $wparam, $lparam)
  69.     If Number($wparam) == $myid And Number($lparam) == $bIsCasting[1] and $bIsCasting[0] Then
  70.         $bIsCasting[0] = False
  71.         $aftercast = TimerInit()
  72.         out("$bIsCasting = False")
  73.     EndIf
  74. EndFunc   ;==>SkillCancelCallback
  75.  
  76. Func SkillCompletedCallback($hwnd, $msg, $wparam, $lparam)
  77.     If Number($wparam) == $myid And Number($lparam) == $bIsCasting[1] and $bIsCasting[0] Then
  78.         $bIsCasting[0] = False
  79.         out("$bIsCasting = False")
  80.     EndIf
  81. EndFunc   ;==>SkillCompletedCallback
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top