SlaverBrona.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/BigBend/SlaverBrona.lua
  3. Script Purpose : Slaver Brona
  4. Script Author : torsten
  5. Script Date : 2022.07.11
  6. Script Notes :
  7. --]]
  8. local BronaThralls = 5630
  9. local BronaGuardCheck = 5631
  10. function spawn(NPC)
  11. if HasLanguage(Spawn,14) then
  12. ProvidesQuest(NPC, BronaThralls)
  13. ProvidesQuest(NPC, BronaGuardCheck)
  14. end
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. if HasLanguage(Spawn,14) then
  22. if not HasQuest(Spawn, BronaThralls) and not HasCompletedQuest(Spawn, BronaThralls) then
  23. OfferQuest(NPC, Spawn, BronaThralls)
  24. end
  25. if HasCompletedQuest(Spawn, BronaThralls) then
  26. if not HasQuest(Spawn, BronaGuardCheck) and not HasCompletedQuest(Spawn, BronaGuardCheck) then
  27. OfferQuest(NPC, Spawn, BronaGuardCheck)
  28. end
  29. end
  30. end
  31. if GetQuestStep(Spawn, BronaThralls) == 2 then
  32. SetStepComplete(Spawn, BronaThralls, 2)
  33. end
  34. if GetQuestStep(Spawn, BronaGuardCheck) == 6 then
  35. SetStepComplete(Spawn, BronaGuardCheck, 6)
  36. end
  37. RandomGreeting(NPC, Spawn)
  38. end
  39. function RandomGreeting(NPC, Spawn)
  40. local choice = MakeRandomInt(1,2)
  41. if choice == 1 then
  42. PlayFlavor(NPC, "", "It's hard to find help that's not afraid of me!", "", 0, 0, Spawn, 0)
  43. elseif choice == 2 then
  44. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1001.mp3", 0, 0, Spawn)
  45. end
  46. end