9
3

alostscout(Ghost).lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. AddTimer(newScout, 5000, "Speak")
  24. end
  25. local mostHated = GetMostHated(NPC)
  26. if mostHated ~= nil and IsPlayer(mostHated) then
  27. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  28. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  29. end
  30. end
  31. Despawn(NPC)
  32. end
  33. end