9
3

FalinShaloon.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --[[
  2. Script Name : SpawnScripts/DownBelow/FalinShaloon.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.10.28 06:10:27
  5. Script Purpose : dialogues for quest
  6. --]]
  7. local GoodsDownBelow = 5376
  8. function spawn(NPC)
  9. ProvidesQuest(NPC, GoodsDownBelow)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. end
  12. function hailed(NPC, Spawn)
  13. local count = GetQuestCompleteCount(Spawn, GoodsDownBelow)
  14. FaceTarget(NPC, Spawn)
  15. local conversation = CreateConversation()
  16. if not HasQuest(Spawn, GoodsDownBelow) then
  17. PlayFlavor(NPC, "voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchant_shaloon/merchant_shaloon001.mp3", "", "", 2831988431, 2273687060, Spawn)
  18. AddConversationOption(conversation, "I'll be on my way. ")
  19. if GetLevel(Spawn) <= 20 and count <= 5 then
  20. AddConversationOption(conversation, "How are you able to do business down here?", "Option1")
  21. end
  22. StartConversation(conversation, NPC, Spawn, "Buy something or be on your way! I don't have time to chat with the likes of you...")
  23. elseif GetQuestStep(Spawn, GoodsDownBelow) == 1 or GetQuestStep(Spawn, GoodsDownBelow) == 2 or GetQuestStep(Spawn, GoodsDownBelow) == 3 or GetQuestStep(Spawn, GoodsDownBelow) == 4 then
  24. AddConversationOption(conversation, "Yeah, I'm on it.")
  25. StartConversation(conversation, NPC, Spawn, "You're not going back on your word, are you? I expect you to deliver them goods!")
  26. elseif GetQuestStep(Spawn, GoodsDownBelow) == 5 then
  27. SetStepComplete(Spawn, GoodsDownBelow, 5)
  28. AddConversationOption(conversation, "What do most folks ask you for?", "Option1")
  29. AddConversationOption(conversation, "Thanks.")
  30. 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.")
  31. end
  32. end
  33. function Option1(NPC, Spawn)
  34. local count = GetQuestCompleteCount(Spawn, GoodsDownBelow)
  35. FaceTarget(NPC, Spawn)
  36. local conversation = CreateConversation()
  37. PlayFlavor(NPC, "")
  38. if count <= 5 then
  39. AddConversationOption(conversation, "I'm interested.", "offer")
  40. end
  41. AddConversationOption(conversation, "Not today.")
  42. 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?")
  43. end
  44. function offer(NPC, Spawn)
  45. OfferQuest(NPC, Spawn, GoodsDownBelow)
  46. end
  47. function InRange(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. 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)
  50. end
  51. function LeaveRange(NPC, Spawn)
  52. end