MichaelCrow

EnchanterNPC

May 9th, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.82 KB | None | 0 0
  1. function enchanter(pUnit, event, player)
  2. pUnit:GossipCreateMenu(300, player, 0)
  3. pUnit:GossipMenuAddItem(10, "|cFF008000Enchant my items, please.|R", 1, 0)
  4. pUnit:GossipMenuAddItem(5, "Nevermind.", 100, 0)
  5. pUnit:GossipSendMenu(player)
  6. end
  7.  
  8. function enchanterselect(pUnit, event, player, id, intid, code)
  9.  
  10. if (intid == 1) then
  11. if (player:GetItemCount(2858) ~= nil) then
  12. if (player:GetItemCount(2858) < 20) then
  13. pUnit:SendChatMessageToPlayer(15, 0, "You haven't enough \124cffa335ee\124Hitem:2858:0:0:0:0:0:0:0:0\124h[Blood]\124h\124r to feed me.", player)
  14. else
  15. pUnit:GossipCreateMenu(301, player, 0)
  16. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Headpiece.|R", 2, 0)
  17. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Shoulders.|R", 3, 0)
  18. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Cloak.|R", 4, 0)
  19. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Chest.|R", 5, 0)
  20. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Wrists.|R", 6, 0)
  21. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Gloves.|R", 7, 0)
  22. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Boots.|R", 8, 0)
  23. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Legs.|R", 9, 0)
  24. pUnit:GossipMenuAddItem(3, "|cFF008000Enchant Weapon.|R", 10, 0)
  25. pUnit:GossipMenuAddItem(5, "Nevermind.", 100, 0)
  26. pUnit:GossipSendMenu(player)
  27. end
  28. end
  29. end
  30.  
  31. if (intid == 2) then
  32. pUnit:GossipCreateMenu(302, player, 0)
  33. pUnit:GossipMenuAddItem(3, "|cFF008000+30 Spellpower, +20 critical strike rating|R", 11, 0)
  34. pUnit:GossipMenuAddItem(3, "|cFF008000+30 Spellpower, +10 Mp5|R", 12, 0)
  35. pUnit:GossipMenuAddItem(3, "|cFF008000+37 stamina, +20 defense rating", 13, 0)
  36. pUnit:GossipMenuAddItem(3, "|cFF008000+50 attack power, +20 critical strike rating|R", 14, 0)
  37. pUnit:GossipMenuAddItem(3, "|cFF008000+30 stamina, +25 resilience rating|R", 15, 0)
  38. pUnit:GossipMenuAddItem(3, "|cFF008000+50 attack power, +20 resilience rating|R", 16, 0)
  39. pUnit:GossipMenuAddItem(3, "|cFF008000+29 spell power, +20 resilience rating|R", 17, 0)
  40. pUnit:GossipMenuAddItem(5, "Back.", 1, 0)
  41. pUnit:GossipSendMenu(player)
  42. end
  43.  
  44. if (intid == 11) then
  45. local pItem = player:GetEquippedItemBySlot(1)
  46. if pItem ~= nil then
  47. pItem:AddEnchantment(59970, 0, 0) -- heres your fucking number, means the same.
  48. player:RemoveItem(2858, 20)
  49. pUnit:GossipComplete(player)
  50. else
  51. player:SendAreaTriggerMessage("|cFF00FFFF[WoWGalore]: |cFFFFA500You have no headpiece equipped!")
  52. pUnit:GossipComplete(player)
  53. end
  54. end
  55.  
  56.  
  57. if (intid == 12) then
  58. local pItem = player:GetEquippedItemBySlot(1)
  59. if pItem ~= nil then
  60. pItem:AddEnchantment(59960, 0, 0)
  61. player:RemoveItem(2858, 20)
  62. pUnit:GossipComplete(player)
  63. else
  64. player:SendAreaTriggerMessage("|cFF00FFFF[WoWGalore]: |cFFFFA500You have no headpiece equipped!")
  65. pUnit:GossipComplete(player)
  66. end
  67. end
  68.  
  69. if (intid == 13) then
  70. local pItem = player:GetEquippedItemBySlot(1)
  71. if pItem ~= nil then
  72. pItem:AddEnchantment(59955, 0, 0)
  73. player:RemoveItem(2858, 20)
  74. pUnit:GossipComplete(player)
  75. else
  76. player:SendAreaTriggerMessage("|cFF00FFFF[WoWGalore]: |cFFFFA500You have no headpiece equipped!")
  77. pUnit:GossipComplete(player)
  78. end
  79. end
  80.  
  81. if (intid == 14) then
  82. local pItem = player:GetEquippedItemBySlot(1)
  83. if pItem ~= nil then
  84. pItem:AddEnchantment(59954, 0, 0)
  85. player:RemoveItem(2858, 20)
  86. pUnit:GossipComplete(player)
  87. else
  88. player:SendAreaTriggerMessage("|cFF00FFFF[WoWGalore]: |cFFFFA500You have no headpiece equipped!")
  89. pUnit:GossipComplete(player)
  90. end
  91. end
  92.  
  93. if (intid == 15) then
  94. local pItem = player:GetEquippedItemBySlot(1)
  95. if pItem ~= nil then
  96. pItem:AddEnchantment(61271, 0, 0)
  97. player:RemoveItem(2858, 20)
  98. pUnit:GossipComplete(player)
  99.  
  100. else
  101. player:SendAreaTriggerMessage("|cFF00FFFF[WoWGalore]: |cFFFFA500You have no headpiece equipped!")
  102. pUnit:GossipComplete(player)
  103. end
  104. end
  105.  
  106. if (intid == 16) then
  107. local pItem = player:GetEquippedItemBySlot(1)
  108. if pItem ~= nil then
  109. pItem:AddEnchantment(59777, 0, 0)
  110. player:RemoveItem(2858, 20)
  111. pUnit:GossipComplete(player)
  112. else
  113. player:SendAreaTriggerMessage("|cFF00FFFF[WoWGalore]: |cFFFFA500You have no headpiece equipped!")
  114. pUnit:GossipComplete(player)
  115. end
  116. end
  117.  
  118. if (intid == 17) then
  119. local pItem = player:GetEquippedItemBySlot(1)
  120. if pItem ~= nil then
  121. pItem:AddEnchantment(59778, 0, 0)
  122. player:RemoveItem(2858, 20)
  123. pUnit:GossipComplete(player)
  124.  
  125. else
  126. player:SendAreaTriggerMessage("|cFF00FFFF[WoWGalore]: |cFFFFA500You have no headpiece equipped!")
  127. pUnit:GossipComplete(player)
  128. end
  129. end
  130.  
  131. if (intid == 3) then
  132. pUnit:GossipCreateMenu(302, player, 0)
  133. pUnit:GossipMenuAddItem(3, "|cFF008000+26 intellect, +20 critical strike rating|R", 11, 0)
  134. pUnit:GossipMenuAddItem(3, "|cFF008000+26 intellect, +20 spirit|R", 12, 0)
  135. pUnit:GossipMenuAddItem(3, "|cFF008000+37 stamina, +20 dodge rating", 13, 0)
  136. pUnit:GossipMenuAddItem(3, "|cFF008000+50 attack power, +20 critical strike rating|R", 14, 0)
  137. pUnit:GossipMenuAddItem(3, "|cFF008000+30 stamina, +25 resilience rating|R", 15, 0)
  138. pUnit:GossipMenuAddItem(3, "|cFF008000+50 attack power, +20 resilience rating|R", 16, 0)
  139. pUnit:GossipMenuAddItem(3, "|cFF008000+29 spell power, +20 resilience rating|R", 17, 0)
  140. pUnit:GossipMenuAddItem(5, "Back.", 1, 0)
  141. pUnit:GossipSendMenu(player)
  142. end
  143. end
  144.  
  145. RegisterUnitGossipEvent(85001, 1, "enchanter")
  146. RegisterUnitGossipEvent(85001, 2, "enchanterselect")
Advertisement
Add Comment
Please, Sign In to add comment