alostscout(Ghost).lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : <script-name>
  3. Script Purpose : <purpose>
  4. Script Author : Jabantiz
  5. Script Date : 9/9/2016
  6. Script Notes : <special-instructions>
  7. --]]
  8. local JoiningTheForwardRanks = 163
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. end
  16. function casted_on(NPC, Spawn, Message)
  17. local Cleric = GetSpawn(NPC, 2530111)
  18. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  19. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  20. if newScout ~= nil then
  21. CopySpawnAppearance(newScout, NPC)
  22. SpawnSet(newScout, "visual_state", "0")
  23. SpawnSet(newScout, "attackable", "false")
  24. AddTimer(newScout, 5000, "Speak")
  25. end
  26. local mostHated = GetMostHated(NPC)
  27. if mostHated ~= nil and IsPlayer(mostHated) then
  28. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  29. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  30. end
  31. end
  32. Despawn(NPC)
  33. end
  34. end