9
3

LordRee.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. SetTempVariable(NPC, "HAILED1", "true") -- IMPORTANT, USED TO RESTRICT PLAYERS TO TALK WITH BOSS AND LAUNCH THE BOSS SCRIPT AGAIN UNTIL HE RESPAWNS
  14. if GetTempVariable(NPC, "HAILED1") == "false" then
  15. AddTimer(NPC, 1800000, "reset")
  16. end
  17. end
  18. function reset(NPC, Spawn)
  19. SetTempVariable(NPC, "HAILED1", "true")
  20. end
  21. function hailed(NPC, Spawn)
  22. if GetTempVariable(NPC, "HAILED1") == "true" then -- IMPORTANT, USED TO RESTRICT PLAYERS TO TALK WITH BOSS AND LAUNCH THE BOSS SCRIPT AGAIN UNTIL HE RESPAWNS
  23. FaceTarget(NPC, Spawn)
  24. conversation = CreateConversation()
  25. PlayFlavor(NPC, "lord_ree/wailingcaves/lord_ree/lord_ree000.mp3", "", "", 376398214, 2276802800, Spawn)
  26. AddConversationOption(conversation, "Your threats don't scare me!", "Phase1")
  27. AddConversationOption(conversation, "Yeah, good idea.")
  28. StartConversation(conversation, NPC, Spawn, "You are puny and weak! Leave now or feel my wrath!")
  29. end
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end
  34. function Phase1(NPC, Spawn)
  35. SetTempVariable(NPC, "HAILED1", "false") -- IMPORTANT, USED TO RESTRICT PLAYERS TO TALK WITH BOSS AND LAUNCH THE BOSS SCRIPT AGAIN UNTIL HE RESPAWNS
  36. local door = GetSpawn(NPC, 2580105)
  37. CloseDoor(door)
  38. PlayFlavor(NPC, "", "Ha ha ha! Blackguards, take care of this rodent!", "cackle", 1689589577, 4560189, Spawn)
  39. -- BELOW SPAWNS BLACKGUARDS AFTER THE SPEECH
  40. local zone = GetZone(NPC)
  41. blackguard1 = SpawnByLocationID(zone, blackguard1_ID)
  42. blackguard2 = SpawnByLocationID(zone, blackguard2_ID)
  43. blackguard3 = SpawnByLocationID(zone, blackguard3_ID)
  44. blackguard4 = SpawnByLocationID(zone, blackguard4_ID)
  45. Attack(blackguard1, Spawn)
  46. Attack(blackguard2, Spawn)
  47. Attack(blackguard3, Spawn)
  48. Attack(blackguard4, Spawn)
  49. end
  50. -- BELOW MAKES CONCUBINE ATTACKABLE AND CHANGE THEIR APPEARANCE
  51. function FinalPhase(NPC, Spawn)
  52. local zone = GetZone(NPC)
  53. local Concubine1 = GetSpawnByLocationID(zone, 404836)
  54. local Concubine2 = GetSpawnByLocationID(zone, 133769549)
  55. local Concubine3 = GetSpawnByLocationID(zone, 133769550)
  56. local Concubine4 = GetSpawnByLocationID(zone, 133769551)
  57. if Concubine1 ~= nil then
  58. SpawnSet(Concubine1, "model_type", "2901")
  59. SpawnSet(Concubine1, "attackable", "1")
  60. SpawnSet(Concubine1, "show_level", "1")
  61. SpawnSet(Concubine1, "faction", "1")
  62. SpawnSet(Concubine2, "model_type", "2901")
  63. SpawnSet(Concubine2, "attackable", "1")
  64. SpawnSet(Concubine2, "show_level", "1")
  65. SpawnSet(Concubine2, "faction", "1")
  66. SpawnSet(Concubine3, "model_type", "2901")
  67. SpawnSet(Concubine3, "attackable", "1")
  68. SpawnSet(Concubine3, "show_level", "1")
  69. SpawnSet(Concubine3, "faction", "1")
  70. SpawnSet(Concubine4, "model_type", "2901")
  71. SpawnSet(Concubine4, "attackable", "1" )
  72. SpawnSet(Concubine4, "show_level", "1")
  73. SpawnSet(Concubine4, "faction", "1")
  74. SpawnSet(NPC, "attackable", "1")
  75. SpawnSet(NPC, "show_level", "1")
  76. SpawnSet(NPC, "faction", "1")
  77. end
  78. end