Advertisement
cressidagp

Khadgar

Nov 18th, 2023
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.42 KB | None | 0 0
  1. '''
  2.  
  3. Engine: APE
  4. Zone: Shattrath City
  5. Creature: Khadgar
  6. .npc portto 75998
  7.  
  8. '''
  9.  
  10. import arcemu
  11. from arcemu import GossipMenu
  12.  
  13. KHADGAR_GOSSIPS = [ 9243, 9876, 9877, 9878, 9879, 9880, 9881 ]
  14.  
  15. KHADGAR_OPTIONS = [
  16. "I've heard your name spoken only in whispers, mage.  Who are you?",
  17. "Go on, please.",
  18. "I see.",
  19. "What did you do then?",
  20. "What happened next?",
  21. "I see.",
  22. "There was something else I wanted to ask you."
  23. ]
  24.  
  25. KHADGAR_ID = 18166
  26.  
  27. def khadgar_onHello( unit, event, player ):
  28.  
  29.     menu = GossipMenu( KHADGAR_GOSSIPS[ 0 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  30.  
  31.     menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 0 ], 0, 0 )
  32.  
  33.     menu.sendToPlayer( player )
  34.  
  35. def khadgar_onSelectOption( unit, player, id, enteredCode ):
  36.  
  37.     if id == 0:
  38.  
  39.         menu = GossipMenu( KHADGAR_GOSSIPS[ 1 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  40.  
  41.         menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 1 ], 1, 0 )
  42.  
  43.         menu.sendToPlayer( player )
  44.  
  45.     if id == 1:
  46.  
  47.         menu = GossipMenu( KHADGAR_GOSSIPS[ 2 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  48.  
  49.         menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 2 ], 2, 0 )
  50.  
  51.         menu.sendToPlayer( player )
  52.  
  53.     if id == 2:
  54.  
  55.         menu = GossipMenu( KHADGAR_GOSSIPS[ 3 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  56.  
  57.         menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 3 ], 3, 0 )
  58.  
  59.         menu.sendToPlayer( player )
  60.  
  61.     if id == 3:
  62.  
  63.         menu = GossipMenu( KHADGAR_GOSSIPS[ 4 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  64.  
  65.         menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 4 ], 4, 0 )
  66.  
  67.         menu.sendToPlayer( player )
  68.  
  69.     if id == 4:
  70.  
  71.         menu = GossipMenu( KHADGAR_GOSSIPS[ 5 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  72.  
  73.         menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 5 ], 5, 0 )
  74.  
  75.         menu.sendToPlayer( player )
  76.  
  77.     if id == 5:
  78.  
  79.         menu = GossipMenu( KHADGAR_GOSSIPS[ 6 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  80.  
  81.         menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 6 ], 6, 0 )
  82.  
  83.         menu.sendToPlayer( player )
  84.  
  85.     if id == 6:
  86.  
  87.         menu = GossipMenu( KHADGAR_GOSSIPS[ 0 ], unit, arcemu.GOSSIP_AUTOSEND_FALSE )
  88.  
  89.         menu.addItem( arcemu.ICON_CHAT, KHADGAR_OPTIONS[ 0 ], 0, 0 )
  90.  
  91.         menu.sendToPlayer( player )
  92.  
  93. arcemu.RegisterUnitGossipEvent( KHADGAR_ID, arcemu.GOSSIP_EVENT_HELLO, khadgar_onHello )
  94. arcemu.RegisterUnitGossipEvent( KHADGAR_ID, arcemu.GOSSIP_EVENT_SELECT, khadgar_onSelectOption )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement