Advertisement
cressidagp

Devlin Agamand

Aug 19th, 2023
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.29 KB | None | 0 0
  1. '''
  2.  
  3. Engine: APE
  4. Zone: Tirisfall Glades
  5. Creature: Devlin Agamand
  6.  
  7. '''
  8.  
  9. import arcemu
  10. from arcemu import Unit
  11.  
  12. DEVLIN_AGAMAND_TEXTS = [
  13. "Mother, oh mother.  You should have listened to me...",
  14. "They thought I was weak.  Haha!!",
  15. "I am the head of the family.  Me.  ME!!!",
  16. "I'm cold, lord.  When will you keep your promise?",
  17. "My family hates me.  Frightened idiots, all of them!",
  18. "Father?  Are you proud of me now? HAHAH!",
  19. "Thurman my brother, who's laughing now?  Hah!"
  20. ]
  21.  
  22. DEVLIN_AGAMAND_STATE = {}
  23.  
  24. NPC_ID_DEVLIN_AGAMAND = 1657
  25.  
  26. def DevlinAgamand_onAIUpdate( unit, event ):
  27.     guid = unit.getGUID()
  28.  
  29.     if guid not in DEVLIN_AGAMAND_STATE:
  30.         DEVLIN_AGAMAND_STATE[ guid ] = 0
  31.  
  32.     state = DEVLIN_AGAMAND_STATE[ guid ]
  33.  
  34.     unit.sendChatMessage( arcemu.CHAT_MSG_MONSTER_SAY, arcemu.LANG_UNIVERSAL, DEVLIN_AGAMAND_TEXTS[ state ] )
  35.  
  36.     if state == 6:
  37.             state = 0
  38.     else:
  39.             state = state + 1
  40.    
  41.     DEVLIN_AGAMAND_STATE[ unit.getGUID() ] = state
  42.  
  43. def DevlinAgamand_onLoad( unit, event ):
  44.  
  45.     unit.RegisterAIUpdateEvent( 25000 )
  46.  
  47. arcemu.RegisterUnitEvent( NPC_ID_DEVLIN_AGAMAND, arcemu.CREATURE_EVENT_ON_LOAD, DevlinAgamand_onLoad )
  48. arcemu.RegisterUnitEvent( NPC_ID_DEVLIN_AGAMAND, arcemu.CREATURE_EVENT_ON_AIUPDATE, DevlinAgamand_onAIUpdate )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement