acrate.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/acrate.lua
  3. Script Purpose : a crate
  4. Script Author : Scatman
  5. Script Date : 2009.09.20
  6. Script Notes : Updated by Jabantiz (4/22/2017)
  7. --]]
  8. local HALF_ELF_MENTOR_QUEST_1 = 218
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, HALF_ELF_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)
  18. if HasQuest(Spawn, HALF_ELF_MENTOR_QUEST_1) and GetQuestStep(Spawn, HALF_ELF_MENTOR_QUEST_1) == 2 then
  19. local spawn_id = GetSpawnID(NPC)
  20. conversation = CreateConversation()
  21. AddConversationOption(conversation, "Close box.")
  22. -- Contents: Raisins and Dried Apricots
  23. if spawn_id == 2370094 then
  24. StartDialogConversation(conversation, 1, NPC, Spawn, "This box is filled with bottles.")
  25. -- Contents: Carving Wood
  26. elseif spawn_id == 2370097 then
  27. StartDialogConversation(conversation, 1, NPC, Spawn, "This box is filled with clay figures.")
  28. -- Contents: Herbs
  29. elseif spawn_id == 2370093 then
  30. StartDialogConversation(conversation, 1, NPC, Spawn, "This box is filled with herbs inside.")
  31. -- Contents: Bottles
  32. elseif spawn_id == 2370095 then
  33. StartDialogConversation(conversation, 1, NPC, Spawn, "This box has carving wood inside.")
  34. -- Contents: Clay Figures
  35. elseif spawn_id == 2370096 then
  36. StartDialogConversation(conversation, 1, NPC, Spawn, "This box has raisins & dried apricots inside.")
  37. end
  38. end
  39. end