9
3

OrdinSleetfoot_(scouting1).lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/OrdinSleetfoot_(scouting1).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) == 2 then
  19. AddSpawnAccess(NPC, Spawn)
  20. local mob1 = SpawnByLocationID(GetZone(Spawn), 572712)
  21. local mob2 = SpawnByLocationID(GetZone(Spawn), 34004)
  22. SetTempVariable(mob1, "linked", mob2)
  23. SetTempVariable(mob2, "linked", mob1)
  24. Attack(mob1, Spawn)
  25. Attack(mob2, Spawn)
  26. elseif GetQuestStep(Spawn, GoodDistraction) == 3 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) == 2 then
  35. PlayFlavor(NPC, "", "Help me, please!", "", 0, 0, Spawn)
  36. elseif GetQuestStep(Spawn, GoodDistraction) == 3 then
  37. AddTimer(NPC, 2000, "HideSpawn", 1, Spawn)
  38. PlayFlavor(NPC, "ordin_sleetfoot/halas/cragged_spine/ordin_sleetfoot_one001.mp3", "", "", 678640011, 1694488257, Spawn)
  39. AddConversationOption(conversation, "Be more careful next time.")
  40. AddConversationOption(conversation, "I will protect you no matter what.")
  41. StartConversation(conversation, NPC, Spawn, "Thanks for the back up there, I thought this was a good spot to hide. Well, shall we continue on? I'll meet you further into the cavern. Keep up the good work, and I'll be able to scout around undetected.")
  42. end
  43. end
  44. function HideSpawn(NPC, Spawn)
  45. SetStepComplete(Spawn, GoodDistraction, 3)
  46. RemoveSpawnAccess(NPC, Spawn)
  47. end