9
3

Cordilia.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/Cordilia.lua
  3. Script Purpose : Cordilia
  4. Script Author : torsten\\Dorbin
  5. Script Date : 2022.07.18
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 11, "InRange", "LeaveRange")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. if GetFactionAmount(Spawn,12) <=0 then
  16. FaceTarget(NPC, Spawn)
  17. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn, 0)
  18. elseif MakeRandomInt(0,100)<=50 then
  19. local choice = MakeRandomInt(1,2)
  20. FaceTarget(NPC, Spawn)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn, 0)
  23. else
  24. PlayFlavor(NPC, "", "", "bye", 0, 0, Spawn, 0)
  25. end
  26. end
  27. end
  28. function hailed(NPC, Spawn)
  29. RandomGreeting(NPC, Spawn)
  30. end
  31. function RandomGreeting(NPC, Spawn)
  32. local choice = MakeRandomInt(1,4)
  33. if choice == 1 then
  34. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/service/merchant/human_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", 1817378690, 2459690771, Spawn, 0)
  35. elseif choice == 2 then
  36. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/service/merchant/human_merchant_service_evil_1_hail_gf_7d521aa2.mp3", "Hello! Can I offer you one of our new lifetime extended warranties for any merchandise you purchase? ", "nod", 1377121065, 1621186679, Spawn, 0)
  37. elseif choice == 3 then
  38. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/service/merchant/human_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", 1299723818, 3048193330, Spawn, 0)
  39. elseif choice == 4 then
  40. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/service/merchant/human_merchant_service_evil_1_hail_gf_d088c20d.mp3", "The stuff's over there. Just let me know if you find anything you like.", "ponder", 2963689917, 1457704094, Spawn, 0)
  41. end
  42. end