MerchantFalinShaloon.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : SpawnScripts/DownBelow_Classic/MerchantFalinShaloon.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.11.09 03:11:20
  5. Script Purpose :
  6. :
  7. --]]
  8. local GoodsDownBelow = 5376
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, GoodsDownBelow)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. local count = GetQuestCompleteCount(Spawn, GoodsDownBelow)
  15. FaceTarget(NPC, Spawn)
  16. local conversation = CreateConversation()
  17. if not HasQuest(Spawn, GoodsDownBelow) then
  18. PlayFlavor(NPC, "voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchant_shaloon/merchant_shaloon001.mp3", "", "", 2831988431, 2273687060, Spawn)
  19. AddConversationOption(conversation, "I'll be on my way. ")
  20. if GetLevel(Spawn) <= 20 and count <= 5 then
  21. AddConversationOption(conversation, "How are you able to do business down here?", "Option1")
  22. end
  23. StartConversation(conversation, NPC, Spawn, "Buy something or be on your way! I don't have time to chat with the likes of you...")
  24. elseif GetQuestStep(Spawn, GoodsDownBelow) == 1 or GetQuestStep(Spawn, GoodsDownBelow) == 2 or GetQuestStep(Spawn, GoodsDownBelow) == 3 or GetQuestStep(Spawn, GoodsDownBelow) == 4 then
  25. AddConversationOption(conversation, "Yeah, I'm on it.")
  26. StartConversation(conversation, NPC, Spawn, "You're not going back on your word, are you? I expect you to deliver them goods!")
  27. elseif GetQuestStep(Spawn, GoodsDownBelow) == 5 then
  28. SetStepComplete(Spawn, GoodsDownBelow, 5)
  29. AddConversationOption(conversation, "What do most folks ask you for?", "Option1")
  30. AddConversationOption(conversation, "Thanks.")
  31. StartConversation(conversation, NPC, Spawn, "It's hard to imagine anyone wanting this stuff, let alone paying for it. Anyway, you kept up your end of the bargain. Take this for your trouble.")
  32. end
  33. end
  34. function Option1(NPC, Spawn)
  35. local count = GetQuestCompleteCount(Spawn, GoodsDownBelow)
  36. FaceTarget(NPC, Spawn)
  37. local conversation = CreateConversation()
  38. PlayFlavor(NPC, "")
  39. if count <= 5 then
  40. AddConversationOption(conversation, "I'm interested.", "offer")
  41. end
  42. AddConversationOption(conversation, "Not today.")
  43. StartConversation(conversation, NPC, Spawn, "I get requests for this or that, used for who knows what. It seems that the majority of my clientele have to get their supplies here, 'cause it just ain't available top side. Say, how would you like to make yourself useful?")
  44. end
  45. function offer(NPC, Spawn)
  46. OfferQuest(NPC, Spawn, GoodsDownBelow)
  47. end
  48. function InRange(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. PlayFlavor(NPC, "voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchants/qey_catacomb01_dwarf_merchant_aoi_callout_2aa4e27e.mp3", "If I don't have what you want, you don't need it!", "", 1298570469, 653865762, Spawn)
  51. end
  52. function LeaveRange(NPC, Spawn)
  53. end