9
3

questrunewindstalker.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/Antonica/questrunewindstalker.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.15 06:05:34
  5. Script Purpose :
  6. :
  7. --]]
  8. local Rune = 5829
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 20, "InRange", Spawn)
  11. end
  12. function casted_on(NPC, Spawn, SpellName)
  13. if SpellName == 'Look under boat' then
  14. local con = CreateConversation()
  15. if not HasQuest(Spawn, Rune) and not HasCompletedQuest(Spawn, Rune) then
  16. AddConversationOption(con, "Grab the runestone!", "offer")
  17. AddConversationOption(con, "Leave the boat alone.")
  18. StartDialogConversation(con, 1, NPC, Spawn, "Underneath the boat I found what appears to be a restless runestone. The runestone is a marker used to attract undead to attack or occupy a particular place. Perhaps an army of undead are coming to the area. I should put a stop to this.")
  19. elseif HasCompletedQuest(Spawn, Rune) then
  20. AddConversationOption(con, "Whew! That smell is ripe!")
  21. StartDialogConversation(con, 1, NPC, Spawn, "Under boat you find a rotten fish... and an undead hand? It looks like it was grasping for something no longer there. Perhaps the runestone I removed lured it here originally.")
  22. PlayFlavor(Spawn,"","","stinky",0,0,Spawn)
  23. elseif HasQuest(Spawn, Rune) and not HasCompletedQuest(Spawn, Rune) then
  24. AddConversationOption(con, "I must kill more Caltorsis undead!")
  25. StartDialogConversation(con, 1, NPC, Spawn, "Underneath the boat I found a restless runestone used to attract undead to attack. I should continue to rid Antonica of these undead!")
  26. end
  27. end
  28. end
  29. function offer(NPC, Spawn)
  30. CloseConversation(NPC,Spawn)
  31. OfferQuest(NPC, Spawn, Rune)
  32. PerformCameraShake(Spawn, 0.10000001192092896)
  33. PlaySound(Spawn,"sounds/critters/zombie/flesh/zombie_dead01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  34. end