OrianDRak.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/LongshadowAlley/OrianDRak.lua
  3. Script Purpose : Orian D`Rak
  4. Script Author : torsten
  5. Script Date : 2022.07.18
  6. Script Notes :
  7. --]]
  8. local OgreWatch = 5676
  9. local InformationGatheringFromaFishmonger = 5677
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, OgreWatch)
  12. ProvidesQuest(NPC, InformationGatheringFromaFishmonger)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. if not HasQuest(Spawn, OgreWatch) and not HasCompletedQuest(Spawn, OgreWatch) then
  19. OfferQuest(NPC, Spawn, OgreWatch)
  20. end
  21. if HasCompletedQuest(Spawn, OgreWatch) then
  22. if not HasQuest(Spawn, InformationGatheringFromaFishmonger) and not HasCompletedQuest(Spawn, InformationGatheringFromaFishmonger) then
  23. OfferQuest(NPC, Spawn, InformationGatheringFromaFishmonger)
  24. end
  25. end
  26. if GetQuestStep(Spawn, OgreWatch) == 2 then
  27. SetStepComplete(Spawn, OgreWatch, 2)
  28. end
  29. if GetQuestStep(Spawn, InformationGatheringFromaFishmonger) == 2 then
  30. SetStepComplete(Spawn, InformationGatheringFromaFishmonger, 2)
  31. end
  32. RandomGreeting(NPC, Spawn)
  33. end
  34. function RandomGreeting(NPC, Spawn)
  35. local choice = MakeRandomInt(1,3)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "", "How dare you barge into my house! Who do you think you are, fool?", "", 0, 0, Spawn, 0)
  38. elseif choice == 2 then
  39. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3", 0, 0, Spawn)
  40. elseif choice == 3 then
  41. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1008.mp3", 0, 0, Spawn)
  42. end
  43. end