KarmentheSwindler.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/KarmentheSwindler.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.24 06:05:03
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange")
  10. end
  11. function InRange(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. PlayFlavor(NPC, "", "Hey you! I got something you might be interested in...", "", 1689589577, 4560189, Spawn)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. local conversation = CreateConversation()
  18. AddConversationOption(conversation, "What are you selling?", "Option1")
  19. AddConversationOption(conversation, "I need to leave.")
  20. StartConversation(conversation, NPC, Spawn, "Hello there! What can I do for you?")
  21. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1007.mp3", "", "", 0, 0, Spawn)
  22. end
  23. function Option1(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. local conversation = CreateConversation()
  26. AddConversationOption(conversation, "What is it used for?", "Option2")
  27. AddConversationOption(conversation, "I need to leave.")
  28. StartConversation(conversation, NPC, Spawn, "This key... I know, I know. It doesn't look like much, but really it's an exact copy of the real thing.")
  29. end
  30. function Option2(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. local conversation = CreateConversation()
  33. AddConversationOption(conversation, "Perfect, I'm going to need one of those..", "Option3")
  34. AddConversationOption(conversation, "I need to leave.")
  35. StartConversation(conversation, NPC, Spawn, "The original was used to open the grate to sewer line number five. You can find the entrance in one of the towers out along the wall in the Commonlands.")
  36. end
  37. function Option3(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. local conversation = CreateConversation()
  40. AddConversationOption(conversation, "Good.")
  41. StartConversation(conversation, NPC, Spawn, "Well then, I'd be happy to sell you one.")
  42. end
  43. function respawn(NPC)
  44. spawn(NPC)
  45. end