DillanBolefreg.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : SpawnScripts/Antonica/DillanBolefreg.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.08.16 05:08:02
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 15, "InRange")
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. local choice = MakeRandomInt(1, 3)
  14. if choice == 1 then
  15. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1054.mp3", "", "", 0, 0, Spawn)
  16. elseif choice == 2 then
  17. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1054.mp3", "", "", 0, 0, Spawn)
  18. elseif choice == 3 then
  19. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1054.mp3", "", "", 0, 0, Spawn)
  20. end
  21. local conversation = CreateConversation()
  22. AddConversationOption(conversation, "Are you selling anything other than food?", "Option1")
  23. AddConversationOption(conversation, "I need to leave.")
  24. StartConversation(conversation, NPC, Spawn, "Hello. You in the market for some food?")
  25. end
  26. function Option1(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. local conversation = CreateConversation()
  29. AddConversationOption(conversation, "I am interested in it.", "Option2")
  30. AddConversationOption(conversation, "I need to leave.")
  31. StartConversation(conversation, NPC, Spawn, "Just the old key I have. It supposedly goes to a condemned catacomb that the Guards of Qeynos no longer watch over. Maybe an adventure there for you?")
  32. end
  33. function Option2(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. local conversation = CreateConversation()
  36. AddConversationOption(conversation, "Thanks.")
  37. StartConversation(conversation, NPC, Spawn, "Sure, just let me know when you want to buy it.")
  38. end
  39. function InRange(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. PlayFlavor(NPC, "", "You there, I might have something you want to buy...", "", 1689589577, 4560189, Spawn)
  42. end
  43. function respawn(NPC)
  44. spawn(NPC)
  45. end