JerethBlackshield.lua 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. dmgMod = GetStr(NPC)/10
  11. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  12. SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(45 + dmgMod))
  13. SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(85 + dmgMod))
  14. EmoteLoop(NPC)
  15. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange", Spawn)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if HasQuest(Spawn, AFriendInNeed) and GetQuestStep(Spawn, AFriendInNeed) == 4 then
  20. conversation = CreateConversation()
  21. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield001.mp3", "", "", 115823120, 726915273, Spawn)
  22. AddConversationOption(conversation, "Nethet sent me with this note about Nikora.", "dlg1")
  23. AddConversationOption(conversation, "Nevermind, I'll be going now.")
  24. 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")
  25. elseif GetQuestStep(Spawn, AFriendInNeed) == 6 or HasCompletedQuest(Spawn, AFriendInNeed) then
  26. 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)
  27. end
  28. end
  29. function dlg1(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. conversation = CreateConversation()
  32. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield002.mp3", "", "", 1215093516, 1021957383, Spawn)
  33. AddConversationOption(conversation, "Bet? What bet?", "dlg2")
  34. StartConversation(conversation, NPC, Spawn, "Let me see that. ... ... hrm... ... the little rat does make an interesting offer. I accept the bet.")
  35. end
  36. function dlg2(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. conversation = CreateConversation()
  39. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield003.mp3", "", "", 3296868859, 4215273968, Spawn)
  40. AddConversationOption(conversation, "Wait a minute...", "fight")
  41. 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.")
  42. end
  43. function fight(NPC, Spawn)
  44. SetStepComplete(Spawn, AFriendInNeed, 4)
  45. PlayFlavor(NPC, "jereth_blackshield/commonlands/quests/jereth_blackshield/jereth_blackshield004.mp3", "This time we get to kill the messenger.", "", 70099391, 3895336520, Spawn)
  46. zone = GetZone(Spawn)
  47. SpawnByLocationID(zone, 299830) -- Blackshield thugs Location ID's
  48. SpawnByLocationID(zone, 299831)
  49. SpawnByLocationID(zone, 299832)
  50. end
  51. function respawn(NPC)
  52. spawn(NPC)
  53. end
  54. function InRange(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. if HasQuest(Spawn, AFriendInNeed) then
  57. 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)
  58. end
  59. end
  60. function LeaveRange(NPC, Spawn)
  61. end
  62. function EmoteLoop (NPC)
  63. PlayAnimation(NPC, 12030)
  64. AddTimer(NPC, 15000, "EmoteLoop")
  65. end