TippytoeSkeleton.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/FallenGate/TippytoeSkeleton.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.10 03:07:43
  5. Script Purpose :
  6. :
  7. --]]
  8. local ChargeOfTheLeatherfootBrigade_TheSarge = 5311
  9. function spawn(NPC)
  10. end
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
  13. end
  14. function InRange(NPC, Spawn)
  15. if not HasQuest(Spawn, ChargeOfTheLeatherfootBrigade_TheSarge) or HasCompletedQuest(Spawn, ChargeOfTheLeatherfootBrigade_TheSarge) then
  16. SpawnSet(NPC, "show_command_icon", 0)
  17. SpawnSet(NPC, "display_hand_icon", 0)
  18. SetAccessToEntityCommand(Spawn,NPC,"Inspect Skeleton", 0)
  19. elseif HasQuest(Spawn, ChargeOfTheLeatherfootBrigade_TheSarge) then
  20. SpawnSet(NPC, "show_command_icon", 1)
  21. SpawnSet(NPC, "display_hand_icon", 1)
  22. SetAccessToEntityCommand(Spawn,NPC,"Inspect Skeleton", 1)
  23. end
  24. end
  25. function casted_on(NPC, Spawn, SpellName)
  26. if SpellName == 'Inspect Skeleton' then
  27. if GetQuestStep(Spawn, ChargeOfTheLeatherfootBrigade_TheSarge) == 1 then
  28. SetStepComplete(Spawn, ChargeOfTheLeatherfootBrigade_TheSarge, 1)
  29. SendMessage(Spawn, "You find a small metal tag hanging from the neck of the skeleton that has the word Tippytoe on it.")
  30. SpawnSet(NPC, "show_command_icon", 0)
  31. SpawnSet(NPC, "display_hand_icon", 0)
  32. SetAccessToEntityCommand(Spawn,NPC,"Inspect Skeleton", 0)
  33. end
  34. end
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end