9
3

brew_barrel.lua 811 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/Graystone/brew_barrel.lua
  3. Script Purpose : brew_barrel
  4. Script Author : Scatman
  5. Script Date : 2009.10.05
  6. Script Notes :
  7. --]]
  8. -- Quest ID's
  9. local DWARF_MENTOR_QUEST_2 = 285
  10. -- Item ID's
  11. local MAVS_BREW = 9383
  12. function spawn(NPC)
  13. SetRequiredQuest(NPC, DWARF_MENTOR_QUEST_2, 1)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. end
  20. function casted_on(NPC, Spawn, SpellName)
  21. Say(NPC, "HI")
  22. if HasQuest(Spawn, DWARF_MENTOR_QUEST_2) and GetQuestStep(Spawn, DWARF_MENTOR_QUEST_2) == 1 and SpellName == "Collect brew" then
  23. SetStepComplete(Spawn, DWARF_MENTOR_QUEST_2, 1)
  24. -- Mav's Brew
  25. if not HasItem(Spawn, MAVS_BREW, 1) then
  26. SummonItem(Spawn, MAVS_BREW, 1)
  27. SummonItem(Spawn, MAVS_BREW, 1)
  28. SummonItem(Spawn, MAVS_BREW, 1)
  29. end
  30. end
  31. end