9
3

discarded_sack.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/discarded_sack.lua
  3. Script Purpose : the spawn "discarded sack"
  4. Script Author : theFoof
  5. Script Date : 2013.8.11
  6. Script Notes :
  7. --]]
  8. local SometimesKnut = 84
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 100, "SpawnAccess", "SpawnAccess")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function casted_on(NPC, Spawn, SpellName)
  17. if SpellName == 'search the discarded sack' then
  18. if GetQuestStep(Spawn, SometimesKnut) == 1 then
  19. conversation = CreateConversation()
  20. AddConversationOption(conversation, "But it's not in the sack any more.", "GrizChat_2")
  21. StartDialogConversation(conversation, 3, NPC, Spawn, "I smell our prey here. It spent much time bedded down at this location.")
  22. end
  23. end
  24. end
  25. function GrizChat_2(NPC, Spawn)
  26. conversation = CreateConversation()
  27. AddConversationOption(conversation, "Where to next, Griz?", "GrizChat3")
  28. StartDialogConversation(conversation, 3, NPC, Spawn, "It has moved on. But we are on its trail.")
  29. end
  30. function GrizChat3(NPC, Spawn)
  31. SetStepComplete(Spawn, SometimesKnut, 1)
  32. RemoveSpawnAccess(NPC, Spawn)
  33. conversation = CreateConversation()
  34. AddConversationOption(conversation, "How insightful.")
  35. StartDialogConversation(conversation, 3, NPC, Spawn, "Deeper.")
  36. end
  37. function SpawnAccess(NPC, Spawn)
  38. if GetQuestStep(Spawn, SometimesKnut) == 1 then
  39. AddSpawnAccess(NPC, Spawn)
  40. end
  41. end