flowersforLandwynslove.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/Antonica/flowersforLandwynslove.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.09.15 03:09:15
  5. Script Purpose :
  6. :
  7. --]]
  8. local UnderAShadyTree = 5356
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
  11. end
  12. function InRange(NPC, Spawn)
  13. if GetQuestStep(Spawn, UnderAShadyTree) == 1 then
  14. SetAccessToEntityCommand(Spawn,NPC,"Pick some Flowers", 1)
  15. SpawnSet(NPC, "show_command_icon", 1)
  16. SpawnSet(NPC, "display_hand_icon", 1)
  17. elseif not HasQuest(Spawn, UnderAShadyTree) or HasCompletedQuest(Spawn, UnderAShadyTree) then
  18. SpawnSet(NPC, "show_command_icon", 0)
  19. SpawnSet(NPC, "display_hand_icon", 0)
  20. SetAccessToEntityCommand(Spawn,NPC,"Pick some Flowers", 0)
  21. end
  22. end
  23. function casted_on(NPC, Spawn, SpellName)
  24. if SpellName == 'Pick some Flowers' then
  25. if GetQuestStep(Spawn, UnderAShadyTree) == 1 then
  26. SetStepComplete(Spawn, UnderAShadyTree, 1)
  27. end
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end