yeast_1.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/Graystone/yeast_1.lua
  3. Script Purpose : yeast_1
  4. Script Author : Scatman
  5. Script Date : 2009.10.05
  6. Script Notes : yeast_1 gives quest update
  7. --]]
  8. local DWARF_MENTOR_QUEST_1 = 283
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, DWARF_MENTOR_QUEST_1, 2)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. end
  17. function casted_on(NPC, Spawn, SpellName)
  18. if HasQuest(Spawn, DWARF_MENTOR_QUEST_1) and not QuestStepIsComplete(Spawn, DWARF_MENTOR_QUEST_1, 2) and SpellName == "Search barrel" then
  19. conversation = CreateConversation()
  20. AddConversationOption(conversation, "Check for yeast.", "CheckForYeast")
  21. StartDialogConversation(conversation, 1, NPC, Spawn, "This is marked as being part of shipment #2DF0F.")
  22. end
  23. end
  24. function CheckForYeast(NPC, Spawn)
  25. SetStepComplete(Spawn, DWARF_MENTOR_QUEST_1, 2)
  26. conversation = CreateConversation()
  27. AddConversationOption(conversation, "Leave the rest of the shipment.", "CloseConversation")
  28. StartDialogConversation(conversation, 1, NPC, Spawn, "Just under the lid there is a series of small, connected packets with a single label tag: \"Yeast.\"")
  29. end