9
3

MolinDriftwater.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/MolinDriftwater.lua
  3. Script Purpose : Molin Driftwater
  4. Script Author : Dorbin
  5. Script Date : 2022.07.18
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 11, "InRange", "LeaveRange")
  11. SetInfoStructString(NPC, "action_state", "ponder")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if GetFactionAmount(Spawn,12) <=0 then
  18. FaceTarget(NPC, Spawn)
  19. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn, 0)
  20. elseif MakeRandomInt(0,100)<=50 then
  21. local choice = MakeRandomInt(1,2)
  22. FaceTarget(NPC, Spawn)
  23. if choice == 1 then
  24. PlayFlavor(NPC, "", "", "beckon", 0, 0, Spawn, 0)
  25. else
  26. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn, 0)
  27. end
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end
  33. function hailed(NPC, Spawn)
  34. if GetFactionAmount(Spawn,12) >0 then
  35. Dialog1(NPC, Spawn)
  36. elseif GetFactionAmount(Spawn,12) <=0 then
  37. FaceTarget(NPC, Spawn)
  38. PlayFlavor(NPC, "voiceover/english/barbarian_eco_good_1/ft/service/petretailer/barbarian_petretailer_service_good_1_notcitizen_gm_820dc7e.mp3", "I'm afraid that I'm closed for the day. I'm going to have to ask you to leave now.", "heckno", 1325380097, 3928490350
  39. , Spawn)
  40. end
  41. end
  42. function Dialog1(NPC, Spawn)
  43. FaceTarget(NPC,Spawn)
  44. local choice = MakeRandomInt(1,3)
  45. if choice == 1 then
  46. PlayFlavor(NPC, "voiceover/english/halfelf_eco_evil_1/ft/service/merchant/halfelf_merchant_service_evil_1_hail_gf_aff3fc07.mp3", "Are you going to buy anything today or am I just wasting my time? This isn't a museum display you know!", "glare", 175282120, 2443997290, Spawn)
  47. elseif choice == 2 then
  48. PlayFlavor(NPC, "voiceover/english/halfelf_eco_evil_1/ft/service/merchant/halfelf_merchant_service_evil_1_hail_gf_d088c20d.mp3", "The stuff's over there. Just let me know if you find anything you like.", "ponder", 2378717460, 740610806, Spawn)
  49. elseif choice == 3 then
  50. PlayFlavor(NPC, "voiceover/english/halfelf_eco_evil_1/ft/service/merchant/halfelf_merchant_service_evil_1_hail_gf_f715099e.mp3", "Hello there, kind adventurer. My merchandise carries the seal of the Overlord himself! Go ahead, take a look!", "salute_freeport", 3198881432, 747888667, Spawn)
  51. end
  52. end