9
3

questtreegermainscout.lua 2.6 KB

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