9
3

Skagga.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/BigBend/Skagga.lua
  3. Script Purpose : Skagga
  4. Script Author : torsten
  5. Script Date : 2022.07.11
  6. Script Notes :
  7. --]]
  8. local SkaggaSign = 5623
  9. local SkaggaSkin = 5624
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, SkaggaSign)
  12. ProvidesQuest(NPC, SkaggaSkin)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if HasLanguage(Spawn,15) then
  20. if not HasQuest(Spawn, SkaggaSign) and not HasCompletedQuest(Spawn, SkaggaSign) then
  21. OfferQuest(NPC, Spawn, SkaggaSign)
  22. end
  23. if HasCompletedQuest(Spawn, SkaggaSign) then
  24. if not HasQuest(Spawn, SkaggaSkin) and not HasCompletedQuest(Spawn, SkaggaSkin) then
  25. OfferQuest(NPC, Spawn, SkaggaSkin)
  26. end
  27. end
  28. end
  29. if GetQuestStep(Spawn, SkaggaSign) == 2 then
  30. SetStepComplete(Spawn, SkaggaSign, 2)
  31. end
  32. if GetQuestStep(Spawn, SkaggaSkin) == 2 then
  33. SetStepComplete(Spawn, SkaggaSkin, 2)
  34. end
  35. RandomGreeting(NPC, Spawn)
  36. end
  37. function RandomGreeting(NPC, Spawn)
  38. local choice = MakeRandomInt(1,2)
  39. if choice == 1 then
  40. PlayFlavor(NPC, "", "Whazza yoo want, eh? You wanna give Skagga money for Skagga's precious wares?", "", 0, 0, Spawn, 0)
  41. elseif choice == 2 then
  42. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1031.mp3", 0, 0, Spawn)
  43. end
  44. end