9
3

evilgoblintent3.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : SpawnScripts/OutpostOverlord/evilgoblintent3.lua
  3. Script Author : Vo1d
  4. Script Date : 2019.10.23 05:10:55
  5. Script Purpose :
  6. :
  7. --]]
  8. local TheFinalAssault = 367
  9. local EvilGoblinTent1 = 2780125
  10. local EvilGoblinTent2 = 2780124
  11. local EvilGoblinTent3 = 2780123
  12. function spawn(NPC)
  13. SetRequiredQuest(NPC, TheFinalAssault, 2)
  14. SpawnSet(NPC, "show_command_icon", 1)
  15. SpawnSet(NPC, "display_hand_icon", 1)
  16. end
  17. function respawn(NPC)
  18. Spawn(NPC)
  19. end
  20. function casted_on(NPC, Spawn, SpellName)
  21. if SpellName == "burn tent" then
  22. if CheckTent(Spawn, NPC) == true then
  23. if GetQuestStep(Spawn, TheFinalAssault) == 2 then
  24. AddStepProgress(Spawn, TheFinalAssault, 2, 1)
  25. BurnTent(Spawn, NPC)
  26. elseif GetQuestStep(Spawn, TheFinalAssault) == 3 then
  27. SetStepComlete(Spawn, TheFinalAssault, 2)
  28. else
  29. end
  30. end
  31. end
  32. end
  33. function BurnTent(Caster, Target)
  34. SpawnSet(Target, "show_command_icon", 0)
  35. AddTimer(Target, 60000, "enable_command_icon_tent")
  36. end
  37. function enable_command_icon_tent(NPC, Player)
  38. SpawnSet(NPC, "show_command_icon", 1)
  39. end
  40. function CheckTent(Caster, Target)
  41. if GetSpawnID(Target) == EvilGoblinTent1 or
  42. GetSpawnID(Target) == EvilGoblinTent2 or
  43. GetSpawnID(Target) == EvilGoblinTent3 then
  44. return true
  45. else
  46. return false
  47. end
  48. end