Advertisement
cressidagp

Big Will

Jun 2nd, 2023 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. function bigWill_onSpawn( unit, _ )
  2.    
  3.     unit:SetMovementType( 11 ) -- foward then stop
  4.     unit:CreateCustomWaypointMap()
  5.     unit:CreateCustomWaypoint( 1, -1693, -4343, 4.32, 1, 0, 1, 0 )
  6.     unit:CreateCustomWaypoint( 2, -1684, -4333, 2.78, 1, 0, 1, 0 )
  7.     unit:CreateCustomWaypoint( 3, -1682, -4329, 2.79, 1, 0, 0, 0 )
  8. end
  9.  
  10. function bigWill_onAIUpdate( unit, _ )
  11.  
  12.     unit:RemoveFlag( 0x0006 + 0x0035, 0x00000100 + 0x02000000 )
  13.     unit:DisableCombat( 0 )
  14.     unit:SendChatMessage( 12, 0, "Ready when you are, warrior." )
  15.     local value = unit:GetUInt64Value( 0x0006 + 0x000C )
  16.     local target = unit:GetUnitByGUID( value )
  17.     -- dont crash please
  18.     if target then
  19.         unit:AttackReaction( target, 45, 0 )
  20.     end
  21.     unit:RemoveAIUpdateEvent()
  22. end
  23.  
  24. function bigWill_onReachWaypoint( unit, _, waypointId, _ )
  25.  
  26.     if waypointId == 3 then
  27.    
  28.         unit:DestroyCustomWaypointMap()
  29.         unit:Emote( 27, 0 )
  30.     end
  31. end
  32.  
  33. RegisterUnitEvent( 6238, 18, bigWill_onSpawn )
  34. RegisterUnitEvent( 6238, 19, bigWill_onReachWaypoint )
  35. RegisterUnitEvent( 6238, 21, bigWill_onAIUpdate )
Tags: lua arcemu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement