JerethBlackshield.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/JerethBlackshield.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.11.17 07:11:52
  5. Script Purpose :
  6. :
  7. --]]
  8. local AFriendInNeed = 422
  9. function spawn(NPC)
  10. EmoteLoop(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange", Spawn)
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. if HasQuest(Spawn, AFriendInNeed) and GetQuestStep(Spawn, AFriendInNeed) == 4 then
  16. conversation = CreateConversation()
  17. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield001.mp3", "", "", 115823120, 726915273, Spawn)
  18. AddConversationOption(conversation, "Nethet sent me with this note about Nikora.", "dlg1")
  19. AddConversationOption(conversation, "Nevermind, I'll be going now.")
  20. StartConversation(conversation, NPC, Spawn, "What do you want messenger? This had better be good or I'll let the rest of the crew here have some fun with you.", "dlg1")
  21. elseif GetQuestStep(Spawn, AFriendInNeed) == 6 or HasCompletedQuest(Spawn, AFriendInNeed) then
  22. PlayFlavor(NPC, "", "I'm impressed, you survived and cut a few of the worthless slugs out of my band. Tell Nethet he wins and I'll call off the contract on Nikora.", "", 1689589577, 4560189, Spawn)
  23. end
  24. end
  25. function dlg1(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. conversation = CreateConversation()
  28. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield002.mp3", "", "", 1215093516, 1021957383, Spawn)
  29. AddConversationOption(conversation, "Bet? What bet?", "dlg2")
  30. StartConversation(conversation, NPC, Spawn, "Let me see that. ... ... hrm... ... the little rat does make an interesting offer. I accept the bet.")
  31. end
  32. function dlg2(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield003.mp3", "", "", 3296868859, 4215273968, Spawn)
  36. AddConversationOption(conversation, "Wait a minute...", "fight")
  37. StartConversation(conversation, NPC, Spawn, "Haha! Why, the bet that you can beat my boys here in a fight to the death. If you win I'll call off the contract on Nikora, if you lose I get double what Nikora owes me. Judging by your looks I think I'm in for watching my boys deliver a good beating.")
  38. end
  39. function fight(NPC, Spawn)
  40. SetStepComplete(Spawn, AFriendInNeed, 4)
  41. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield004.mp3", "This time we get to kill the messenger.", "", 70099391, 3895336520, Spawn)
  42. zone = GetZone(Spawn)
  43. SpawnByLocationID(zone, 299830) -- Blackshield thugs Location ID's
  44. SpawnByLocationID(zone, 299831)
  45. SpawnByLocationID(zone, 299832)
  46. end
  47. function respawn(NPC)
  48. spawn(NPC)
  49. end
  50. function InRange(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. if HasQuest(Spawn, AFriendInNeed) then
  53. PlayFlavor(NPC, "", "I expected that rat Nethet to show up in order to save his friend. It seems he sent a different sort of vermin in his place.", "ponder", 1689589577, 4560189, Spawn)
  54. end
  55. end
  56. function LeaveRange(NPC, Spawn)
  57. end
  58. function EmoteLoop (NPC)
  59. PlayAnimation(NPC, 12030)
  60. AddTimer(NPC, 15000, "EmoteLoop")
  61. end