9
3

dpoinvisiblecube.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. --[[
  2. Script Name : SpawnScripts/SummonersTest/dpoinvisiblecube.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.12 04:11:00
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function casted_on(NPC, Spawn, SpellName)
  11. if SpellName == 'Begin the test' then
  12. AddTimer(NPC,2500,"Spawn1",1,Spawn)
  13. CastSpell(Spawn,280024)
  14. end
  15. end
  16. function Spawn1(NPC,Spawn)
  17. local zone = GetZone(Spawn)
  18. if GetSpawnByLocationID(zone,133780602) == nil then
  19. local TestofEarth = SpawnByLocationID(zone,133780602)
  20. end
  21. SpawnSet(NPC, "show_command_icon", 0)
  22. SpawnSet(NPC, "display_hand_icon", 0)
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function Trial1Done(NPC,Spawn)
  28. AddTimer(NPC,2500,"Stage2",1,Spawn)
  29. AddTimer(NPC,4500,"Trial2",1,Spawn)
  30. end
  31. function Trial2Done(NPC,Spawn)
  32. AddTimer(NPC,2500,"Stage3",1,Spawn)
  33. AddTimer(NPC,4500,"Trial3",1,Spawn)
  34. end
  35. function Trial3Done(NPC,Spawn)
  36. AddTimer(NPC,2500,"Stage4",1,Spawn)
  37. AddTimer(NPC,4500,"Trial4",1,Spawn)
  38. end
  39. function Stage2 (NPC,Spawn)
  40. local zone = GetZone(Spawn)
  41. local SummonRing = GetSpawnByLocationID(zone,133780576)
  42. ApplySpellVisual(SummonRing, 124)
  43. local Pet = GetSpawn(Spawn,8350001)
  44. if Pet == nil or not IsAlive(Pet) then
  45. CastSpell(Spawn,280024)
  46. end
  47. end
  48. function Trial2 (NPC,Spawn)
  49. local zone = GetZone(Spawn)
  50. if GetSpawnByLocationID(zone,133780603) == nil then
  51. local TestofWater = SpawnByLocationID(zone,133780603)
  52. end
  53. end
  54. function Stage3 (NPC,Spawn)
  55. local zone = GetZone(Spawn)
  56. local SummonRing = GetSpawnByLocationID(zone,133780576)
  57. ApplySpellVisual(SummonRing, 571)
  58. local Pet = GetSpawn(Spawn,8350001)
  59. if Pet == nil or not IsAlive(Pet) then
  60. CastSpell(Spawn,280024)
  61. end
  62. end
  63. function Trial3 (NPC,Spawn)
  64. local zone = GetZone(Spawn)
  65. local Pet = GetSpawn(Spawn,8350001)
  66. if GetSpawnByLocationID(zone,133780601) == nil then
  67. local TestofAir = SpawnByLocationID(zone,133780601)
  68. end
  69. end
  70. function Stage4 (NPC,Spawn)
  71. local zone = GetZone(Spawn)
  72. local SummonRing = GetSpawnByLocationID(zone,133780576)
  73. ApplySpellVisual(SummonRing, 165)
  74. local Pet = GetSpawn(Spawn,8350001)
  75. if Pet == nil or not IsAlive(Pet) then
  76. CastSpell(Spawn,280024)
  77. end
  78. end
  79. function Trial4 (NPC,Spawn)
  80. local zone = GetZone(Spawn)
  81. if GetSpawnByLocationID(zone,133780604) == nil then
  82. local TestofWater = SpawnByLocationID(zone,133780604)
  83. end
  84. end
  85. function Trial4Done(NPC,Spawn)
  86. AddTimer(NPC,2500,"Ring",1,Spawn)
  87. AddTimer(NPC,4500,"Light2",1,Spawn)
  88. AddTimer(NPC,6500,"Light1",1,Spawn)
  89. if Pet ~= nil or IsAlive(Pet) then
  90. Despawn(Pet)
  91. end
  92. end
  93. function Light1(NPC, Spawn)
  94. local zone = GetZone(Spawn)
  95. local candle1 = GetSpawnByLocationID(zone,133780562)
  96. local candle2 = GetSpawnByLocationID(zone,133780563)
  97. local candle3 = GetSpawnByLocationID(zone,133780564)
  98. local candle4 = GetSpawnByLocationID(zone,133780565)
  99. local candle5 = GetSpawnByLocationID(zone,133780566)
  100. local candle6 = GetSpawnByLocationID(zone,133780568)
  101. local candle7 = GetSpawnByLocationID(zone,133780569)
  102. SpawnSet(candle1,"model_type",5963)
  103. SpawnSet(candle2,"model_type",5963)
  104. SpawnSet(candle3,"model_type",5963)
  105. SpawnSet(candle4,"model_type",5963)
  106. SpawnSet(candle5,"model_type",5963)
  107. SpawnSet(candle6,"model_type",5963)
  108. SpawnSet(candle7,"model_type",5963)
  109. end
  110. function Light2(NPC, Spawn)
  111. local zone = GetZone(Spawn)
  112. local candle8 = GetSpawnByLocationID(zone,133780570)
  113. local candle9 = GetSpawnByLocationID(zone,133780571)
  114. local candle10 = GetSpawnByLocationID(zone,133780572)
  115. local candle11 = GetSpawnByLocationID(zone,133780573)
  116. local candle12 = GetSpawnByLocationID(zone,133780574)
  117. local candle13 = GetSpawnByLocationID(zone,133780575)
  118. local candle14 = GetSpawnByLocationID(zone,133780567)
  119. SpawnSet(candle8,"model_type",5963)
  120. SpawnSet(candle9,"model_type",5963)
  121. SpawnSet(candle10,"model_type",5963)
  122. SpawnSet(candle11,"model_type",5963)
  123. SpawnSet(candle12,"model_type",5963)
  124. SpawnSet(candle13,"model_type",5963)
  125. SpawnSet(candle14,"model_type",5963)
  126. end
  127. function Ring(NPC, Spawn)
  128. local zone = GetZone(Spawn)
  129. local SummonRing = GetSpawnByLocationID(zone,133780576)
  130. SpawnSet(SummonRing,"visual_state",34342)
  131. SpawnSet(SummonRing,"model_type",0)
  132. local Ringlight = GetSpawnByLocationID(zone,133780625)
  133. Despawn(Ringlight)
  134. end