Novak.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Novak.lua
  3. Script Purpose : Novak <General Goods>
  4. Script Author : geordie0511, Dorbin
  5. Script Date : 2019.03.13
  6. Script Notes : Auto-Generated Conversation from PacketParser Data - Restructured using dialog mod - 05/11/2023
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Achoo = 464
  10. local DeliveriesForFlores = 5333 -- Deliveries For Flores Quest
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 13, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. FaceTarget(NPC, Spawn)
  20. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  21. elseif MakeRandomInt(0,100) <=50 then
  22. PlayFlavor(NPC, "", "", "beckon", 0, 0, Spawn)
  23. FaceTarget(NPC, Spawn)
  24. end
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC, Spawn)
  29. Dialog.AddDialog("Greetings, perhaps you need to replenish your supplies, or maybe just sell some of what you picked up along the trail?")
  30. Dialog.AddVoiceover("voiceover/english/merchant_novak/antonica/merchantnovak000.mp3", 4148197515, 1288700917)
  31. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  32. if GetQuestStep(Spawn, Achoo) == 1 then
  33. Dialog.AddOption("Matsy sent me for some pepper.", "pepper")
  34. end
  35. if GetQuestStep(Spawn, DeliveriesForFlores) == 1 then
  36. Dialog.AddOption("I'm here to deliver this crate of supplies from Flores.", "Option1")
  37. end
  38. Dialog.AddOption("Not right now.")
  39. Dialog.Start()
  40. end
  41. function Option1(NPC, Spawn)
  42. SetStepComplete(Spawn, DeliveriesForFlores, 1)
  43. FaceTarget(NPC, Spawn)
  44. Dialog.New(NPC, Spawn)
  45. Dialog.AddDialog("Great, I was almost out of supplies as it stands. I would hate to hike all the way back to Flores. Here's a pouch for Flores. Make sure he gets this, okay?")
  46. Dialog.AddVoiceover("voiceover/english/merchant_novak/antonica/merchantnovak001.mp3", 1938438342, 930282390)
  47. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  48. Dialog.AddOption("Thanks. I'll make sure he gets it.")
  49. Dialog.Start()
  50. end
  51. function pepper(NPC, Spawn)
  52. SetStepComplete(Spawn, Achoo, 1)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. AddConversationOption(conversation, "Ok, thanks very much.")
  56. StartConversation(conversation, NPC, Spawn, "Oh, here you go! I will put it on her bill.")
  57. end