Advertisement
cressidagp

Meven Korgal

Jul 21st, 2023 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.17 KB | None | 0 0
  1. '''
  2.  
  3. Engine: APE
  4. Zone: Tirisfall Glades
  5. Creature: Meven Korgal
  6.  
  7. '''
  8.  
  9. import arcemu
  10. from arcemu import Unit
  11.  
  12. MEVEN_KORGAL_TEXTS = [
  13. "These undead atrocities will be destroyed!",
  14. "We must be vigilant to eradicate this plague!",
  15. "Keep up the good work.  This scourge will be cleansed!",
  16. "The Scarlet Crusade will scour these lands!",
  17. "Let none with the foul taint of plague live!"
  18. ]
  19.  
  20. MEVEN_KORGAL_STATE = {}
  21.  
  22. NPC_ID_MEVEN_KORGAL = 1667
  23.  
  24. def MevenKorgal_onAIUpdate( unit, event ):
  25.     guid = unit.getGUID()
  26.  
  27.     if guid not in MEVEN_KORGAL_STATE:
  28.         MEVEN_KORGAL_STATE[ guid ] = 0
  29.  
  30.     state = MEVEN_KORGAL_STATE[ guid ]
  31.  
  32.     unit.sendChatMessage( arcemu.CHAT_MSG_MONSTER_YELL, arcemu.LANG_UNIVERSAL, MEVEN_KORGAL_TEXTS[ state ] )
  33.  
  34.     if state == 4:
  35.             state = 0
  36.     else:
  37.             state = state + 1
  38.    
  39.     MEVEN_KORGAL_STATE[ unit.getGUID() ] = state
  40.  
  41. def MevenKorgal_onLoad( unit, event ):
  42.  
  43.     unit.RegisterAIUpdateEvent( 90000 )
  44.  
  45. arcemu.RegisterUnitEvent( NPC_ID_MEVEN_KORGAL, arcemu.CREATURE_EVENT_ON_LOAD, MevenKorgal_onLoad )
  46. arcemu.RegisterUnitEvent( NPC_ID_MEVEN_KORGAL, arcemu.CREATURE_EVENT_ON_AIUPDATE, MevenKorgal_onAIUpdate )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement