9
3

inspect_reagentshelf01.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/inspect_reagentshelf01.lua
  3. Script Purpose : inspect_reagentshelf01
  4. Script Author : Scatman
  5. Script Date : 2009.10.08
  6. Script Notes :
  7. --]]
  8. local QUEST_1 = 312
  9. local QUEST_FROM_OAKMYST = 228
  10. function spawn(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. end
  17. function casted_on(Target, Caster, SpellName)
  18. if SpellName == "inspect" then
  19. conversation = CreateConversation()
  20. if not HasQuest(Caster, QUEST_1) and not HasCompletedQuest(Caster, QUEST_1) then
  21. AddConversationOption(conversation, "Inspect jars of Oakmyst spider silk.", "OfferQuest1")
  22. end
  23. if HasQuest(Caster, QUEST_FROM_OAKMYST) and GetQuestStep(Caster, QUEST_FROM_OAKMYST) == 1 then
  24. AddConversationOption(conversation, "Inspect jars of Smitelin's Excel-a-gro.", "ExcelAGro")
  25. end
  26. AddConversationOption(conversation, "Stop browsing.", "CloseConversation")
  27. StartDialogConversation(conversation, 1, Target, Caster, "This is Varion Smitelin's reagent shelf. It seems to have various reagents as well as a number of tomes.")
  28. end
  29. end
  30. function OfferQuest1(NPC, Spawn)
  31. OfferQuest(NPC, Spawn, QUEST_1)
  32. local conversation = CreateConversation()
  33. AddConversationOption(conversation, "Stop browsing.", "CloseConversation")
  34. StartDialogConversation(conversation, 1, NPC, Spawn, "This jar is filled with spider silk but looks rather low, I should help Varion out by gathering some more.")
  35. end
  36. function ExcelAGro(NPC, Spawn)
  37. conversation = CreateConversation()
  38. AddConversationOption(conversation, "Take a pinch of the nutrient.", "TakeAPinch")
  39. AddConversationOption(conversation, "Stop browsing.", "CloseConversation")
  40. StartDialogConversation(conversation, 1, NPC, Spawn, "This jar is filled with some form of arcane nutrient for plants.")
  41. end
  42. function TakeAPinch(NPC, Spawn)
  43. SetStepComplete(Spawn, QUEST_FROM_OAKMYST, 1)
  44. conversation = CreateConversation()
  45. AddConversationOption(conversation, "Stop browsing.", "CloseConversation")
  46. StartDialogConversation(conversation, 1, NPC, Spawn, "You take a small pinch of the nutrient and pack it into a small pocket.")
  47. end