9
3

MerchantRTok.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/TheGraveyard_Classic/MerchantRTok.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.04 12:11:19
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 9, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. if MakeRandomInt(1, 100) <= 33 and GetFactionAmount(Spawn,12) >0 then
  17. FaceTarget(NPC, Spawn)
  18. PlayFlavor(NPC, "voiceover/english/optional2/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_aoi_gm_53388b91.mp3", "Only traitors to the Overlord would pass up a bargain like this. You're not a traitor are you?", "beckon", 1403936443, 3068231605, Spawn)
  19. elseif GetFactionAmount(Spawn,12) <=0 then
  20. FaceTarget(NPC, Spawn)
  21. PlayFlavor(NPC, "", "", "shakefist", 4267987983, 4115199119, Spawn, 0)
  22. end
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function hailed(NPC, Spawn)
  28. if GetFactionAmount(Spawn,12) >0 then
  29. Dialog1(NPC, Spawn)
  30. elseif GetFactionAmount(Spawn,12) <=0 then
  31. FaceTarget(NPC, Spawn)
  32. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/innkeeper/darkelf_innkeeper_service_evil_1_notcitizen_gm_85c35337.mp3", "We don't serve your pathetic kind here. Get out of my sight!", "heckno", 4267987983, 4115199119, Spawn, 0)
  33. end
  34. end
  35. function Dialog1(NPC, Spawn)
  36. FaceTarget(NPC,Spawn)
  37. local choice = MakeRandomInt(1,3)
  38. if choice == 1 then
  39. PlayFlavor(NPC, "voiceover/english/optional2/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_hail_gm_f715099e.mp3", "Hello there, kind adventurer. My merchandise carries the seal of the Overlord himself! Go ahead, take a look!", "salute_freeport", 1302153135, 3653961458, Spawn)
  40. elseif choice == 2 then
  41. PlayFlavor(NPC, "voiceover/english/optional2/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_hail_gm_6ec08438.mp3", "In spite of the cost of living, it's still quite a popular item.", "ponder", 2781916825, 678640011, Spawn)
  42. elseif choice == 3 then
  43. PlayFlavor(NPC, "voiceover/english/optional2/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_hail_gm_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", 898812878, 1402234103, Spawn)
  44. end
  45. end