9
3

LordRee.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. --[[
  2. Script Name : SpawnScripts/WailingCaves/LordRee.lua
  3. Script Author : premierio015
  4. Script Date : 2020.06.30 09:06:01
  5. Script Purpose :
  6. :
  7. --]]
  8. blackguard3_ID = 133769612
  9. blackguard4_ID = 133769613
  10. blackguard1_ID = 404841
  11. blackguard2_ID = 404844
  12. function spawn(NPC)
  13. SetAggroRadius(NPC, 20, true)
  14. SetTempVariable(NPC, "HAILED1", "true") -- IMPORTANT, USED TO RESTRICT PLAYERS TO TALK WITH BOSS AND LAUNCH THE BOSS SCRIPT AGAIN UNTIL HE RESPAWNS
  15. if GetTempVariable(NPC, "HAILED1") == "false" then
  16. AddTimer(NPC, 1800000, "reset")
  17. end
  18. end
  19. function reset(NPC, Spawn)
  20. SetTempVariable(NPC, "HAILED1", "true")
  21. end
  22. function hailed(NPC, Spawn)
  23. if GetTempVariable(NPC, "HAILED1") == "true" then -- IMPORTANT, USED TO RESTRICT PLAYERS TO TALK WITH BOSS AND LAUNCH THE BOSS SCRIPT AGAIN UNTIL HE RESPAWNS
  24. FaceTarget(NPC, Spawn)
  25. conversation = CreateConversation()
  26. PlayFlavor(NPC, "lord_ree/wailingcaves/lord_ree/lord_ree000.mp3", "", "", 376398214, 2276802800, Spawn)
  27. AddConversationOption(conversation, "Your threats don't scare me!", "Phase1")
  28. AddConversationOption(conversation, "Yeah, good idea.")
  29. StartConversation(conversation, NPC, Spawn, "You are puny and weak! Leave now or feel my wrath!")
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end
  35. function Phase1(NPC, Spawn)
  36. SetTempVariable(NPC, "HAILED1", "false") -- IMPORTANT, USED TO RESTRICT PLAYERS TO TALK WITH BOSS AND LAUNCH THE BOSS SCRIPT AGAIN UNTIL HE RESPAWNS
  37. local door = GetSpawn(NPC, 2580105)
  38. CloseDoor(door)
  39. PlayFlavor(NPC, "", "Ha ha ha! Blackguards, take care of this rodent!", "cackle", 1689589577, 4560189, Spawn)
  40. -- BELOW SPAWNS BLACKGUARDS AFTER THE SPEECH
  41. local zone = GetZone(NPC)
  42. blackguard1 = SpawnByLocationID(zone, blackguard1_ID)
  43. blackguard2 = SpawnByLocationID(zone, blackguard2_ID)
  44. blackguard3 = SpawnByLocationID(zone, blackguard3_ID)
  45. blackguard4 = SpawnByLocationID(zone, blackguard4_ID)
  46. AddTimer(NPC, 3000, "blackguard_attack", 1, Spawn)
  47. end
  48. function blackguard_attack(NPC, Spawn)
  49. local zone = GetZone(NPC)
  50. local blackguard1 = GetSpawnByLocationID(zone, blackguard1_ID)
  51. local blackguard2 = GetSpawnByLocationID(zone, blackguard2_ID)
  52. local blackguard3 = GetSpawnByLocationID(zone, blackguard3_ID)
  53. local blackguard4 = GetSpawnByLocationID(zone, blackguard4_ID)
  54. Attack(blackguard1, Spawn)
  55. Attack(blackguard2, Spawn)
  56. Attack(blackguard3, Spawn)
  57. Attack(blackguard4, Spawn)
  58. end
  59. -- BELOW MAKES CONCUBINE ATTACKABLE AND CHANGE THEIR APPEARANCE
  60. function FinalPhase(NPC, Spawn)
  61. local zone = GetZone(NPC)
  62. local Concubine1 = GetSpawnByLocationID(zone, 404836)
  63. local Concubine2 = GetSpawnByLocationID(zone, 133769549)
  64. local Concubine3 = GetSpawnByLocationID(zone, 133769550)
  65. local Concubine4 = GetSpawnByLocationID(zone, 133769551)
  66. if Concubine1 ~= nil then
  67. SpawnSet(Concubine1, "model_type", "2901")
  68. SpawnSet(Concubine1, "attackable", "1")
  69. SpawnSet(Concubine1, "show_level", "1")
  70. SpawnSet(Concubine1, "faction", "1")
  71. SpawnSet(Concubine2, "model_type", "2901")
  72. SpawnSet(Concubine2, "attackable", "1")
  73. SpawnSet(Concubine2, "show_level", "1")
  74. SpawnSet(Concubine2, "faction", "1")
  75. SpawnSet(Concubine3, "model_type", "2901")
  76. SpawnSet(Concubine3, "attackable", "1")
  77. SpawnSet(Concubine3, "show_level", "1")
  78. SpawnSet(Concubine3, "faction", "1")
  79. SpawnSet(Concubine4, "model_type", "2901")
  80. SpawnSet(Concubine4, "attackable", "1" )
  81. SpawnSet(Concubine4, "show_level", "1")
  82. SpawnSet(Concubine4, "faction", "1")
  83. SpawnSet(NPC, "attackable", "1")
  84. SpawnSet(NPC, "show_level", "1")
  85. SpawnSet(NPC, "faction", "1")
  86. SendUpdateDefaultCommand(NPC,10000,"attack")
  87. end
  88. end