Advertisement
cressidagp

Junior Apothecary Holland

Aug 19th, 2023 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.34 KB | None | 0 0
  1. '''
  2.  
  3. Engine: APE
  4. Zone: Tirisfall Glades
  5. Creature: Junior Apothecary Holland
  6.  
  7. '''
  8.  
  9. import arcemu
  10. import ArcPyMath as Math
  11. from arcemu import Unit
  12.  
  13. APOTHECARY_HOLLAND_TEXTS = [
  14. "What could be taking so long?",
  15. "How long can it take to pick a handful of weeds?",
  16. "At this rate I could have gathered them myself!",
  17. "If you want something done right, do it yourself!",
  18. "As if I had all eternity.",
  19. "Ah, this must be him now... no?  Bah!",
  20. "Maybe I should have just bought some off of Faruza?",
  21. "I had to go and requisition an Abomination... an Abomination!"
  22. ]
  23.  
  24. APOTHECARY_HOLLAND_STATE = {}
  25.  
  26. NPC_ID_APOTHECARY_HOLLAND = 10665
  27.  
  28. def ApothecaryHolland_onReachWP( unit, event, waypointId, forward ):
  29.     guid = unit.getGUID()
  30.  
  31.     if guid not in APOTHECARY_HOLLAND_STATE:
  32.         APOTHECARY_HOLLAND_STATE[ guid ] = 0
  33.  
  34.     chance = Math.randomUInt( 99 )
  35.  
  36.     if chance < 10:
  37.          
  38.         state = APOTHECARY_HOLLAND_STATE[ guid ]
  39.  
  40.         unit.sendChatMessage( arcemu.CHAT_MSG_MONSTER_SAY, arcemu.LANG_ORCISH, APOTHECARY_HOLLAND_TEXTS[ state ] )
  41.          
  42.         if state == 7:
  43.                 state = 0
  44.         else:
  45.                 state = state + 1
  46.  
  47.         APOTHECARY_HOLLAND_STATE[ unit.getGUID() ] = state
  48.  
  49. arcemu.RegisterUnitEvent( NPC_ID_APOTHECARY_HOLLAND, arcemu.CREATURE_EVENT_ON_REACH_WP, ApothecaryHolland_onReachWP )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement