adwarvenprisoner.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/BigBend/adwarvenprisoner.lua
  3. Script Purpose : a dwarven prisoner
  4. Script Author : torsten
  5. Script Date : 2022.07.11
  6. Script Notes :
  7. --]]
  8. local DwarvenPayback = 5629
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, DwarvenPayback)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. if not HasQuest(Spawn, DwarvenPayback) and not HasCompletedQuest(Spawn, DwarvenPayback) then
  18. OfferQuest(NPC, Spawn, DwarvenPayback)
  19. end
  20. RandomGreeting(NPC, Spawn)
  21. end
  22. function RandomGreeting(NPC, Spawn)
  23. local choice = MakeRandomInt(1,4)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "", "Stop bothering me, filth!", "", 0, 0, Spawn, 0)
  26. elseif choice == 2 then
  27. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", 0, 0, Spawn)
  28. elseif choice == 3 then
  29. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", 0, 0, Spawn)
  30. elseif choice == 4 then
  31. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", 0, 0, Spawn)
  32. end
  33. end