Advertisement
cressidagp

Affray Challenger

Jun 2nd, 2023 (edited)
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. function affrayChallenger_onAIUpdate( unit, _ )
  2.  
  3.     unit:RemoveFlag( 0x0006 + 0x0035, 0x00000100 + 0x02000000 )
  4.     unit:DisableCombat( 0 )
  5.     local value = unit:GetUInt64Value( 0x0006 + 0x000C )
  6.     local target = unit:GetUnitByGUID( value )
  7.     -- dont crash please
  8.     if target then
  9.         unit:AttackReaction( target, 35, 0 )
  10.     end
  11.     unit:RemoveAIUpdateEvent()
  12. end
  13.  
  14. RegisterUnitEvent( 6240, 21, affrayChallenger_onAIUpdate )
Tags: lua arcemu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement