9
3

OrdinSleetfoot_(scouting2).lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/OrdinSleetfoot_(scouting2).lua
  3. Script Purpose : Ordin Sleetfoot
  4. Script Author : theFoof
  5. Script Date : 2013.06.11
  6. Script Notes :
  7. --]]
  8. local GoodDistraction = 61
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 15, "Ambush", "Ambush")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function Ambush(NPC, Spawn)
  17. if HasQuest(Spawn, GoodDistraction) then
  18. if GetQuestStep(Spawn, GoodDistraction) == 4 then
  19. AddSpawnAccess(NPC, Spawn)
  20. local mob1 = SpawnByLocationID(GetZone(Spawn), 572713)
  21. local mob2 = SpawnByLocationID(GetZone(Spawn), 572714)
  22. SetTempVariable(mob1, "linked", mob2)
  23. SetTempVariable(mob2, "linked", mob1)
  24. Attack(mob1, Spawn)
  25. Attack(mob2, Spawn)
  26. elseif GetQuestStep(Spawn, GoodDistraction) == 5 then
  27. AddSpawnAccess(NPC, Spawn)
  28. end
  29. end
  30. end
  31. function hailed(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. conversation = CreateConversation()
  34. if GetQuestStep(Spawn, GoodDistraction) == 4 then
  35. PlayFlavor(NPC, "", "Help me, please!", "", 0, 0, Spawn)
  36. elseif GetQuestStep(Spawn, GoodDistraction) == 5 then
  37. PlayFlavor(NPC, "ordin_sleetfoot/halas/cragged_spine/ordin_sleetfoot_two001.mp3", "", "", 70062741, 2568038023, Spawn)
  38. AddConversationOption(conversation, "If you are done, we should head back. Thirin will want a report of what's in these caves.", "Quest1Chat_1")
  39. StartConversation(conversation, NPC, Spawn, "Thank you again. Thirin is right, ye are dependable and I couldn't have done this without ye.")
  40. end
  41. end
  42. function Quest1Chat_1(NPC, Spawn)
  43. AddTimer(NPC, 2000, "HideSpawn", 1, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. conversation = CreateConversation()
  46. PlayFlavor(NPC, "ordin_sleetfoot/halas/cragged_spine/ordin_sleetfoot_two002.mp3", "", "", 2823426244, 1105831845, Spawn)
  47. AddConversationOption(conversation, "Very well. Good luck.")
  48. StartConversation(conversation, NPC, Spawn, "Of course. Ye head back without me. I want to check out what's up ahead. I'll meet ye back with Thirin when I'm done here. ")
  49. end
  50. function HideSpawn(NPC, Spawn)
  51. SetStepComplete(Spawn, GoodDistraction, 5)
  52. RemoveSpawnAccess(NPC, Spawn)
  53. end