9
3

qstnewsforgermainleafsample.lua 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/qstnewsforgermainleafsample.lua
  3. Script Author : Shatou
  4. Script Date : 2020.01.10 07:01:08
  5. Script Purpose :
  6. :
  7. --]]
  8. local NEWS_FOR_GERMAIN_QUEST_ID = 520
  9. local RETURNING_TO_THE_DISTURBANCE_QUEST_ID = 522
  10. local BUSH_PARTS = 475035
  11. local BUSH_SHOVEL = 1587510
  12. local BUSH_FIRE = 1587511
  13. local BUSH_PICKAXE = 1587512
  14. local TREE_TENT = 475041
  15. local TREE_INVIS_BOOK = 1587513
  16. local GNOLL_TENT_MODEL_ID = 2467
  17. local PARTS_MODEL_ID = 5211
  18. local SHOVEL_MODEL_ID = 2212
  19. local FIRE_MODEL_ID = 2019
  20. local PICKAXE_MODEL_ID = 2821
  21. local INVIS_MODEL_ID = 2306
  22. local BOOK_MODEL_ID = 848
  23. function spawn(NPC)
  24. SetRequiredQuest(NPC, NEWS_FOR_GERMAIN_QUEST_ID, 3)
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. end
  29. function respawn(NPC)
  30. end
  31. function can_use_command(NPC, Spawn, Message)
  32. if Message == "Collect Leaf Sample" then
  33. if HasQuest(Spawn, NEWS_FOR_GERMAIN_QUEST_ID) then
  34. if GetQuestStep(Spawn, NEWS_FOR_GERMAIN_QUEST_ID) == 3 then
  35. return true
  36. end
  37. end
  38. end
  39. end
  40. function casted_on(NPC, Spawn, Message)
  41. if Message == "Collect Leaf Sample" then
  42. if HasQuest(Spawn, NEWS_FOR_GERMAIN_QUEST_ID) then
  43. SetStepComplete(Spawn, NEWS_FOR_GERMAIN_QUEST_ID, 3)
  44. end
  45. elseif Message == "Sprinkle Nullification Powder" then
  46. if HasQuest(Spawn, RETURNING_TO_THE_DISTURBANCE_QUEST_ID) then
  47. SetStepComplete(Spawn, RETURNING_TO_THE_DISTURBANCE_QUEST_ID, 1)
  48. local zone = GetZone(Spawn)
  49. local parts_bush = GetSpawnByLocationID(zone, BUSH_PARTS)
  50. local shovel_bush = GetSpawnByLocationID(zone, BUSH_SHOVEL)
  51. local fire_bush = GetSpawnByLocationID(zone, BUSH_FIRE)
  52. local pickaxe_bush = GetSpawnByLocationID(zone, BUSH_PICKAXE)
  53. local tent_tree = GetSpawnByLocationID(zone, TREE_TENT)
  54. local book_tree = GetSpawnByLocationID(zone, TREE_INVIS_BOOK)
  55. SetModelType(parts_bush, PARTS_MODEL_ID)
  56. SpawnSet(parts_bush, "show_command_icon", "false")
  57. SpawnSet(parts_bush, "display_hand_icon", "false")
  58. SpawnSet(parts_bush, "visual_state", "3752")
  59. SetModelType(shovel_bush, SHOVEL_MODEL_ID)
  60. SpawnSet(shovel_bush, "show_command_icon", "false")
  61. SpawnSet(shovel_bush, "display_hand_icon", "false")
  62. SpawnSet(shovel_bush, "visual_state", "3752")
  63. SetModelType(fire_bush, FIRE_MODEL_ID)
  64. SpawnSet(fire_bush, "show_command_icon", "false")
  65. SpawnSet(fire_bush, "display_hand_icon", "false")
  66. SpawnSet(fire_bush, "visual_state", "3752")
  67. SetModelType(pickaxe_bush, PICKAXE_MODEL_ID)
  68. SpawnSet(pickaxe_bush, "show_command_icon", "false")
  69. SpawnSet(pickaxe_bush, "display_hand_icon", "false")
  70. SpawnSet(pickaxe_bush, "visual_state", "3752")
  71. SetModelType(tent_tree, GNOLL_TENT_MODEL_ID)
  72. SpawnSet(tent_tree, "show_command_icon", "false")
  73. SpawnSet(tent_tree, "display_hand_icon", "false")
  74. SetModelType(book_tree, BOOK_MODEL_ID)
  75. SpawnSet(book_tree, "visual_state", "3752")
  76. end
  77. end
  78. end