9
3

Wilhemena.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Wilhemena.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.28 04:06:07
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  10. end
  11. function InRange(NPC, Spawn)
  12. local choice = math.random(0, 100)
  13. if choice <= 25 then
  14. Talk(NPC, Spawn)
  15. end
  16. end
  17. function hailed(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. else
  20. Talk(NPC,Spawn)
  21. end
  22. end
  23. function Talk(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. choice = math.random(1,3)
  26. if choice == 1 then
  27. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/baker/human_baker_service_good_1_hail_gf_9db280de.mp3", "I love the smell of fresh bread in the oven!", "sigh", 1068415951, 2036199467, Spawn)
  28. elseif choice == 2 then
  29. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/baker/human_baker_service_good_1_hail_gf_3d1ca473.mp3", "Tell me, do you prefer Halfling or Elven cuisine? I myself have a hard time deciding between the two.", "confused", 3151047462, 2904038035, Spawn)
  30. elseif choice == 3 then
  31. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/baker/human_baker_service_good_1_hail_gf_cca9cdef.mp3", "Welcome friend, welcome. I hope you brought your appetite with you!", "wink", 488782681, 166399094, Spawn)
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end