Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------------------------------------------------------------------------------------------------------
- --[[
- A Boss
- By Stoneharry
- Released at MMOwned.com
- Designed to be used in a LuaBridge version of LuaHypArc
- ----------------------------------------------------------
- Documentation for when the SQL's become out of date
- ----------------------------------------------------------
- BOSS - Display = 25885, flags1 = 2156, rank = 3, type = 7
- BOSS PET - Display = 6374, flags1 = 108
- Three Other Creatures - Display = 11686, rank = 1
- Destructable Object 0 type = 33, displayid = 8387, spellfocus = 100, sound4 = 8387, unknown1 = 8386, unknown2 = 1, unknown 9 = 50, unknown14 = 1, size = 1
- ----------------------------------------------------------
- insert into `creature_spawns`(`id`,`entry`,`map`,`position_x`,`position_y`,`position_z`,`orientation`,`movetype`,`displayid`,`faction`,`flags`,`bytes0`,`bytes1`,`bytes2`,`emote_state`,`npc_respawn_link`,`channel_spell`,`channel_target_sqlid`,`channel_target_sqlid_creature`,`standstate`,`death_state`,`mountdisplayid`,`slot1item`,`slot2item`,`slot3item`,`CanFly`,`phase`) values (138,100000,0,-2354.9,-2462.11,561.814,2.40191,0,25885,21,524288,0,0,1,333,0,0,0,0,0,0,6374,36962,0,0,0,1);
- insert into `creature_names`(`entry`,`name`,`subname`,`info_str`,`flags1`,`type`,`family`,`rank`,`killcredit1`,`killcredit2`,`male_displayid`,`female_displayid`,`male_displayid2`,`female_displayid2`,`unknown_float1`,`unknown_float2`,`leader`,`questitem1`,`questitem2`,`questitem3`,`questitem4`,`questitem5`,`questitem6`,`waypointid`) values (100004,'Black Drake','Blackhand\'s Pet','',108,0,0,3,0,0,6374,0,0,0,1,1,0,0,0,0,0,0,0,0),(100003,'Fire Orb','','',0,0,0,1,0,0,11686,0,0,0,1,1,0,0,0,0,0,0,0,0),(100002,'Charged Orb','','',0,0,0,1,0,0,11686,0,0,0,1,1,0,0,0,0,0,0,0,0),(100001,'','','',0,0,0,1,0,0,11686,0,0,0,1,1,0,0,0,0,0,0,0,0),(100000,'\"Futile\" Blackhand','','',2156,7,0,3,0,0,25885,0,0,0,1,1,1,0,0,0,0,0,0,0);
- insert into `creature_proto`(`entry`,`minlevel`,`maxlevel`,`faction`,`minhealth`,`maxhealth`,`mana`,`scale`,`npcflags`,`attacktime`,`attacktype`,`mindamage`,`maxdamage`,`can_ranged`,`rangedattacktime`,`rangedmindamage`,`rangedmaxdamage`,`respawntime`,`armor`,`resistance1`,`resistance2`,`resistance3`,`resistance4`,`resistance5`,`resistance6`,`combat_reach`,`bounding_radius`,`auras`,`boss`,`money`,`invisibility_type`,`walk_speed`,`run_speed`,`fly_speed`,`extra_a9_flags`,`spell1`,`spell2`,`spell3`,`spell4`,`spell_flags`,`modImmunities`,`isTrainingDummy`,`guardtype`,`summonguard`) values (100002,83,83,21,55500,55500,3508353,1,0,10000,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,'0',0,0,0,2.5,8,14,0,0,0,0,0,0,0,0,0,0),(100001,83,83,21,55500,55500,3553563,1,0,10000,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,'0',0,0,0,2.5,8,14,0,0,0,0,0,0,0,0,0,0),(100000,83,83,15,8000000,9000000,98000000,2,0,2100,0,18000,25000,0,0,0,0,0,12000,25,25,25,25,25,25,1.3,4,'0',1,0,0,2.5,7.6,14,0,0,0,0,0,0,0,0,0,0),(100003,83,83,21,100000,100000,500000,1,0,10000,0,1,1,0,0,0,0,0,20000,30,30,30,30,30,30,1,1,'0',0,0,0,2.5,8,14,0,0,0,0,0,0,0,0,0,0),(100004,83,83,21,2000000,3000000,0,1,0,2400,0,12000,14000,0,0,0,0,0,11000,20,20,20,20,20,20,1.3,4,'0',1,0,0,2.5,8,14,0,0,0,0,0,0,0,0,0,0);
- insert into `gameobject_names` (`entry`, `Type`, `DisplayID`, `Name`, `Category`, `CastBarText`, `UnkStr`, `spellfocus`, `sound1`, `sound2`, `sound3`, `sound4`, `sound5`, `sound6`, `sound7`, `sound8`, `sound9`, `unknown1`, `unknown2`, `unknown3`, `unknown4`, `unknown5`, `unknown6`, `unknown7`, `unknown8`, `unknown9`, `unknown10`, `unknown11`, `unknown12`, `unknown13`, `unknown14`, `Size`, `QuestItem1`, `QuestItem2`, `QuestItem3`, `QuestItem4`, `QuestItem5`, `QuestItem6`) values('1930701','33','8387','Boss Platform (DESTRUCTABLE)','','','','100','0','0','0','8387','0','0','0','0','0','8386','1','0','0','0','0','0','0','50','0','0','0','0','1','1','0','0','0','0','0','0');
- ----------------------------------------------------------
- Description in chronological order:
- This fight starts off on the destructable object 'Malygos Platform'.
- The boss rides a black drake and has a powerful melee, but slow, melee attack.
- Phase 1
- Every few seconds lines of fire will spread out from the boss which players must avoid.
- The boss will mind controll players into either healing the boss or attacking other players every 30 seconds.
- The boss will slow and weaken the tank every 12 seconds.
- The boss will debuff 3 random players with immorlate every 15 seconds.
- The boss will do a area of affect 'death and decay' on a random area every now and then.
- A fireball volley will be followed by a death and decay.
- Phase 2
- The boss returns to spawn point, temporarily stunning players.
- Lighting strikes players and bounces between them, dealing damage.
- All players are weakened and stunned every now and then.
- Two players randomly switch positions every ~30 seconds.
- People find it hard to see due to the screen filter.
- Lightning will prove as a distraction.
- Phase 3
- Exactly the same as Phase 1 but timers are changed and is generally more hard. Players also randomly teleport.
- Phase 4
- The platform blows up, players are able to fly.
- Two types of orb spawn:
- 1st spawns every 10 seconds, drags 3 players to it and then blows up dealing large AOE damage.
- 2nd spawns and just shoots AOE at nearby people.
- Phase 6
- Orbs spawn more often
- Bolts of energy are shot at players every 16 seconds
- After 2 minutes the boss charges a massive attack that hits every single player for ~10-11k damage.
- The platform resets.
- The drake becomes a independant mob.
- The fight continues.
- - The drake can't die (healed by boss)
- - The drake breaths fire and generally is a nuisance
- - The main boss continues like phase 1 till death
- ]]
- -------------------------------------------------------------------------------------------------------
- -- Variable Decleration ------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- local BOSS_PLATFORM_ID = 1930701 -- The destructable object ID of the boss platform
- local BOSS = 100000 -- The ID of the boss
- local FIRE = 100001 -- The ID for the lines of fire that spawn
- local ORB_ID = 100002 -- The ID for the orbs that explode, summon and blow up
- local FIRE_ORB = 100003 -- The ID for the fiery Orb that spawns and shoots
- local BOSS_MOUNT_ID = 100004 -- The ID of the boss' mount.
- local BOSS_MOUNT = nil -- Variable for boss mount handling, do not touch.
- local zX = nil -- Variable for the Lines of Fire, don't touch
- local zY = nil -- Variable for the Lines of Fire, don't touch
- local BOSS_PLATFORM = nil -- Don't touch
- local player = nil -- For the player mind control, don't touch
- ------------------------------------------------------------------------------------------------------
- -- Cleans Database for Pet Bug -----------------------------------------------------------------------
- -- Bit Hack Fix'y but I didn't realise storing a GUID would save it to the DB when I wrote this part -
- ------------------------------------------------------------------------------------------------------
- WorldDBQuery("DELETE FROM `creature_spawns` WHERE `entry` = '"..BOSS_MOUNT_ID.."';") -- We need to do it when the server starts up
- function CLEAN_PET_DRAGONS()
- WorldDBQuery("DELETE FROM `creature_spawns` WHERE `entry` = '"..BOSS_MOUNT_ID.."';") -- And when the function is called
- end
- -------------------------------------------------------------------------------------------------------
- -- On Spawn Cosmetics ---------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function Boss_On_Spawn_Stoneharry(pUnit, Event)
- pUnit:SetFaction(15) -- Prevents people from getting owned as soon as they enter the location
- pUnit:RegisterEvent("Wait_A_Second_Stoneharry", 1000, 1) -- Give the npc a chance to load
- end
- function Wait_A_Second_Stoneharry(pUnit)
- pUnit:SetFaction(15) -- Doesn't always register on spawn
- pUnit:Unroot() -- Incase it bugged from last encounter
- pUnit:SetMovementFlags(1) -- ^
- pUnit:CastSpell(27123) -- Mount visual
- pUnit:SetMount(6374) -- Black Drake
- pUnit:EquipWeapons(36962, 0, 0) -- Two handed axe
- pUnit:SetScale(1.1) -- On drake too big as defualt scale 2
- pUnit:CastSpell(76006) -- Beam visual
- pUnit:RegisterEvent("Beam_Visual_Stoneharry", 10000, 0) -- Visual Maintaining
- end
- function Beam_Visual_Stoneharry(pUnit)
- pUnit:CastSpell(76006) -- Beam visual
- end
- RegisterUnitEvent(BOSS, 18, "Boss_On_Spawn_Stoneharry")
- -----------------------
- function zzzCPEACAE_Cage_asdasd_OnUseZXC(pMisc, event)
- BOSS_PLATFORM = pMisc -- We'll call this later and blow it up
- end
- RegisterGameObjectEvent(BOSS_PLATFORM_ID, 1, "zzzCPEACAE_Cage_asdasd_OnUseZXC")
- -------------------------------------------------------------------------------------------------------
- -- On Combat ------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function OnCombat_Stoneharry(pUnit, Event)
- pUnit:RemoveEvents() -- Stop the visual
- pUnit:SetFaction(21) -- Now were hostile
- pUnit:SendChatMessage(14,0,"You'll find it difficult to speak, without a head!")
- --pUnit:PlaySoundToSet(14622) -- It's random voice - not always this one. :(
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- SetDBCSpellVar(64157, "c_is_flags", 0x01000) -- Makes the spell a debuff - they can't get rid of it hopefully, which means tactics for in 12 seconds big damage
- pUnit:CastSpellOnTarget(64157, plrs) -- Curse of doom
- end
- pUnit:RegisterEvent("Stoneharry_FireLines", math.random(4000, 10000), 1)
- pUnit:RegisterEvent("CurseOf_Reduce_Stoneharry", 15000, 0)
- pUnit:RegisterEvent("ImmorlateThingy_Stoneharry", 17000, 0)
- pUnit:RegisterEvent("Heal_Boss_Player_Tehe", 30000, 0)
- pUnit:RegisterEvent("death_and_decay_Stoneharry", 26000, 0)
- pUnit:RegisterEvent("phase_two_FREEZE_AND_RUN_Tehe", 5000, 0)
- end
- function death_and_decay_Stoneharry(pUnit)
- local arrr = pUnit:GetRandomPlayer(0) -- Getting a random player doesn't always return successful
- if arrr ~= nil then -- Check we did get somebody
- pUnit:CastSpellOnTarget(56359, arrr) -- Hit 'em!
- end
- pUnit:FullCastSpell(38836) -- Fireball volley
- end
- function Heal_Boss_Player_Tehe(pUnit)
- player = pUnit:GetRandomPlayer(0) -- We use this in multiple parts so we save it as a variable available through the whole script
- if player ~= nil then
- player:SetPlayerLock(1) -- Stop him doing anything
- pUnit:SendChatMessage(42,0,"Blackhand is mind controlling "..player:GetName().."!") -- Spam
- player:CancelSpell() -- In case he was in the middle of... something
- if math.random(1,2) == 1 then
- player:SetMana(pUnit:GetMana()+125) -- Give him some mana
- player:FullCastSpellOnTarget(49348, pUnit) -- Go go go, cast it
- else
- player:FullCastSpellOnTarget(72024, pUnit:GetRandomPlayer(0)) -- Should work, even if it returns himself
- end
- pUnit:RegisterEvent("Hang_On_Lets_Cast_Again", 3750, 1)
- pUnit:RegisterEvent("Hang_On_Let_Spells_Finish", 7500, 1)
- end
- end
- function Hang_On_Lets_Cast_Again(pUnit) -- Repeat
- if player ~= nil then
- if math.random(1,2) == 1 then
- player:SetMana(pUnit:GetMana()+125)
- player:FullCastSpellOnTarget(49348, pUnit)
- else
- player:FullCastSpellOnTarget(72024, pUnit:GetRandomPlayer(0))
- end
- end
- end
- function Hang_On_Let_Spells_Finish(pUnit)
- if player ~= nil then -- Make sure he hasn't DC'd or died some other horrible way
- player:SetPlayerLock(0) -- Let him be free
- end
- end
- function CurseOf_Reduce_Stoneharry(pUnit)
- pUnit:FullCastSpellOnTarget(29540, pUnit:GetMainTank()) -- If were in combat there is a tank
- end
- function ImmorlateThingy_Stoneharry(pUnit) -- Repeats 3 times instantly
- local i = 0 -- i = 0, duh
- while i<4 do -- While less than 4 (up to 3)
- i=i+1 -- Add 1 to it
- local play = pUnit:GetRandomPlayer(0)
- if play ~= nil then
- pUnit:CastSpellOnTarget(41958, pUnit:GetRandomPlayer(0))
- end
- end
- end
- function Stoneharry_FireLines(pUnit)
- pUnit:RegisterEvent("Stoneharry_FireLines", math.random(4000, 10000), 1) -- So that the timer is random each time
- local choice = math.random(1,4) -- We can go in 4 directions
- if choice == 1 then
- pUnit:SpawnCreature(FIRE, pUnit:GetX()+5, pUnit:GetY(), pUnit:GetZ(), pUnit:GetO(), 21, 4500) -- One direction
- zX = pUnit:GetX()+5 -- This function won't be called again in the time it takes to finish the next part, so it's safe to use the same variables over and over
- pUnit:RegisterEvent("Keep_spawning_fires_in_a_line", 750, 5) -- Keep them spawning in a line
- elseif choice == 2 then
- pUnit:SpawnCreature(FIRE, pUnit:GetX(), pUnit:GetY()+5, pUnit:GetZ(), pUnit:GetO(), 21, 4500) -- Direction two
- zX = pUnit:GetY()+5
- pUnit:RegisterEvent("zKeep_spawning_fires_in_a_line", 750, 5)
- elseif choice == 3 then
- pUnit:SpawnCreature(FIRE, pUnit:GetX()+5, pUnit:GetY()+5, pUnit:GetZ(), pUnit:GetO(), 21, 4500) -- And so on
- zX = pUnit:GetY()+5
- zY = pUnit:GetX()+5
- pUnit:RegisterEvent("zzKeep_spawning_fires_in_a_line", 750, 5)
- elseif choice == 4 then
- pUnit:SpawnCreature(FIRE, pUnit:GetX()-5, pUnit:GetY()-5, pUnit:GetZ(), pUnit:GetO(), 21, 4500)
- zX = pUnit:GetY()-5
- zY = pUnit:GetX()-5
- pUnit:RegisterEvent("zzzKeep_spawning_fires_in_a_line", 750, 5)
- end
- end
- function Keep_spawning_fires_in_a_line(pUnit) -- These are the variation directions we can go, it shouldn't clash due to variable only being used once at any time
- zX = zX + 5 -- left
- pUnit:SpawnCreature(FIRE, zX, pUnit:GetY(), pUnit:GetZ(), pUnit:GetO(), 21, 5000)
- end
- function zKeep_spawning_fires_in_a_line(pUnit)
- zX = zX + 5 -- Right
- pUnit:SpawnCreature(FIRE, pUnit:GetX(), zX, pUnit:GetZ(), pUnit:GetO(), 21, 5000)
- end
- function zzKeep_spawning_fires_in_a_line(pUnit)
- zX = zX + 5 -- Up
- zY = zY + 5 -- Up
- pUnit:SpawnCreature(FIRE, zY, zX, pUnit:GetZ(), pUnit:GetO(), 21, 5000)
- end
- function zzzKeep_spawning_fires_in_a_line(pUnit)
- zX = zX - 5 -- Down
- zY = zY - 5 -- Down
- pUnit:SpawnCreature(FIRE, zY, zX, pUnit:GetZ(), pUnit:GetO(), 21, 5000)
- end
- RegisterUnitEvent(BOSS, 1, "OnCombat_Stoneharry")
- -------------------------------------------------------------------------------------------------------
- -- Phase 2 --------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function phase_two_FREEZE_AND_RUN_Tehe(pUnit)
- if pUnit:GetHealthPct() < 81 then
- pUnit:SendChatMessage(14, 0, "Let's see how you fight, when your blind!")
- pUnit:CancelSpell() -- Incase he was doing something
- pUnit:RemoveEvents() -- Stop doing old stuff
- pUnit:CastSpell(45213) -- Visual
- SetDBCSpellVar(45922, "c_is_flags", 0x01000) -- These make the spells so that they can't be got rid of, and they appear as a debuff
- SetDBCSpellVar(48864, "c_is_flags", 0x01000)
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:SetPlayerLock(0) -- Lock
- plrs:CastSpell(45922) -- Temporary stun
- plrs:CastSpell(48864) -- Screen visual
- end
- pUnit:SetCombatCapable(1) -- Stops him running like a madman trying to attack the player
- pUnit:ReturnToSpawnPoint() -- Go back to where you belong
- pUnit:RegisterEvent("zffzfz_movetospawnpoint_stoneharry", 500, 0)
- pUnit:RegisterEvent("Lets_Get_On_With_This_Stoneharry", 8000, 1)
- end
- end
- function zffzfz_movetospawnpoint_stoneharry(pUnit, Event)
- pUnit:ReturnToSpawnPoint() -- Keep him in the middle
- end
- function Lets_Get_On_With_This_Stoneharry(pUnit)
- pUnit:RemoveEvents()
- pUnit:SetCombatCapable(0) -- Be free, young one
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:RemoveAura(45922) -- You can move too, children
- end
- pUnit:Root() -- But you can't mr. boss
- pUnit:RegisterEvent("Lightning_Stoneharry", 10000, 0)
- pUnit:RegisterEvent("Shitg_Stoneharry", 18000, 0)
- pUnit:RegisterEvent("messup_Stoneharry", 29000, 0)
- pUnit:RegisterEvent("CastOnAllWeakButStacksAndEntertains_stoneharry", 500, 0)
- pUnit:RegisterEvent("phase_three_FREEZE_AND_RUN_Tehe", 5000, 0)
- end
- function CastOnAllWeakButStacksAndEntertains_stoneharry(pUnit)
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- pUnit:CastSpellOnTarget(45293, plrs) -- Lightning
- end
- end
- function Shitg_Stoneharry(pUnit)
- pUnit:FullCastSpell(23310) -- Freezes time
- end
- function Lightning_Stoneharry(pUnit)
- pUnit:FullCastSpellOnTarget(64974, pUnit:GetClosestPlayer()) -- What were you?
- end
- function messup_Stoneharry(pUnit)
- local plrA = pUnit:GetRandomPlayer(0) -- Get two players
- local plrB = pUnit:GetRandomPlayer(0) -- Get two players
- if plrA ~= nil and plrB ~= nil then -- Make sure we did return somebody in the fight
- if plrA == plrB then -- Make sure they are not the same person
- local plrB = pUnit:GetRandomPlayer(0) -- Try again
- if plrA == plrB then -- You better not be the same person
- plrB = pUnit:GetClosestPlayer() -- That's it, someone more reliable
- end
- end
- plrA:CancelSpell()
- plrB:CancelSpell() -- Stop casting
- plrA:SetPosition(plrB:GetX(), plrB:GetY(), plrB:GetZ(), plrB:GetO()) -- Switch players, muhahaha
- plrB:SetPosition(plrA:GetX(), plrA:GetY(), plrA:GetZ(), plrA:GetO())
- plrA:CastSpell(64446) -- Teleport visual
- plrB:CastSpell(64446)
- end
- end
- -------------------------------------------------------------------------------------------------------
- -- Phase 3 --------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function phase_three_FREEZE_AND_RUN_Tehe(pUnit) -- You should understand everything used in this function by now
- if pUnit:GetHealthPct() < 71 then
- pUnit:SendChatMessage(14, 0, "You only delay the inevitable!")
- pUnit:Unroot()
- pUnit:CancelSpell()
- pUnit:RemoveEvents()
- pUnit:RemoveAura(45213) -- Visual
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:SetPlayerLock(0)
- plrs:RemoveAura(48864) -- Screen visual
- plrs:CancelSpell()
- plrs:CastSpell(29166) -- We have to give them some help? Innervate
- end
- end
- pUnit:RegisterEvent("Stoneharry_FireLines", math.random(4000, 10000), 1)
- pUnit:RegisterEvent("CurseOf_Reduce_Stoneharry", 20000, 0)
- pUnit:RegisterEvent("ImmorlateThingy_Stoneharry", 15000, 0)
- pUnit:RegisterEvent("Heal_Boss_Player_Tehe", 20000, 0)
- pUnit:RegisterEvent("death_and_decay_Stoneharry", 15000, 0)
- pUnit:RegisterEvent("messup_Stoneharry", 30000, 0)
- pUnit:RegisterEvent("phase_four_FREEZE_AND_RUN_Tehe", 5000, 0)
- end
- -------------------------------------------------------------------------------------------------------
- -- Phase 4 --------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function phase_four_FREEZE_AND_RUN_Tehe(pUnit)
- if pUnit:GetHealthPct() < 56 then
- pUnit:SendChatMessage(14, 0, "Beyold... The power of the drake!")
- pUnit:CastSpell(59084)
- pUnit:CancelSpell()
- pUnit:RemoveEvents()
- pUnit:RegisterEvent("wait_one_second_for_visual_stoneharry", 2100, 1)
- end
- end
- function wait_one_second_for_visual_stoneharry(pUnit)
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:EnableFlight(true) -- Let the players fly
- plrs:SetPlayerLock(0)
- plrs:CastSpell(71986) -- Visual
- end
- pUnit:SetMovementFlags(2) -- Let the npc fly
- if BOSS_PLATFORM ~= nil then
- BOSS_PLATFORM:SetUInt32Value(0x0006+0x0003,0x400) -- blows the object up, when it respawns sometimes it changes GUID for some reason
- else
- pUnit:GetGameObjectNearestCoords(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), 1930701):SetUInt32Value(0x0006+0x0003,0x400) -- If it's still nil then the player's a tard and it deserves to error.
- end
- pUnit:RegisterEvent("Spawn_Orbs_That_Blow_Up_Tehe", 10000, 0)
- pUnit:RegisterEvent("Static_Fire_Orb_Spawning_SToneharry", 15000, 0)
- pUnit:RegisterEvent("Phase_FIve_And_Couzntng_Spellzing_Failz", 5000, 0)
- end
- function Spawn_Orbs_That_Blow_Up_Tehe(pUnit)
- local target = pUnit:GetRandomPlayer(0)
- if target ~= nil then
- pUnit:SpawnCreature(ORB_ID, target:GetX(), target:GetY(), target:GetZ(), target:GetO(), 21, 9500) -- Were basically spawning the npc on the player's posisiton
- end
- end
- function Static_Fire_Orb_Spawning_SToneharry(pUnit)
- local target = pUnit:GetRandomPlayer(0)
- if target ~= nil then
- pUnit:SpawnCreature(FIRE_ORB, target:GetX(), target:GetY(), target:GetZ(), target:GetO(), 21, 0) -- 0 = a risk worth taking, since it despawns it's self it shouldn't be a permanent spawn, nothing should trigger it to become one...
- end
- end
- -------------------------------------------------------------------------------------------------------
- -- Phase 5 --------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function Phase_FIve_And_Couzntng_Spellzing_Failz(pUnit)
- if pUnit:GetHealthPct() < 41 then
- pUnit:RemoveEvents()
- pUnit:SendChatMessage(14, 0, "More! We must have more!")
- pUnit:RegisterEvent("Spawn_Orbs_That_Blow_Up_Tehe", 10000, 0)
- pUnit:RegisterEvent("Static_Fire_Orb_Spawning_SToneharry", 10000, 0)
- pUnit:RegisterEvent("PLASMA_BALL_FIRE_IN_TWENTY_RELLS", 16000, 1)
- pUnit:RegisterEvent("TEST_FIRE_IN_DA_HOLE", 30000, 1)
- end
- end
- function PLASMA_BALL_FIRE_IN_TWENTY_RELLS(pUnit)
- local plr = pUnit:GetRandomPlayer(0)
- if plr ~= nil then
- pUnit:FullCastSpellOnTarget(63689, plr)
- end
- end
- function TEST_FIRE_IN_DA_HOLE(pUnit)
- pUnit:RemoveEvents()
- pUnit:SetCombatCapable(1)
- pUnit:Root()
- pUnit:SendChatMessage(42,0,"Blackhand prepares to unleash a powerful attack!") -- Raid message
- pUnit:RegisterEvent("Boom_Headshot_Stoneharry", 5000, 1)
- end
- function Boom_Headshot_Stoneharry(pUnit)
- pUnit:Unroot()
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- pUnit:CastSpellOnTarget(63689, plrs)
- end
- pUnit:ReturnToSpawnPoint()
- pUnit:RegisterEvent("Wait_Another_Five_SEconds_Then_REStz_and_Respawn_Main", 5000, 1)
- end
- function Wait_Another_Five_SEconds_Then_REStz_and_Respawn_Main(pUnit)
- pUnit:SetCombatCapable(0)
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:SetPosition(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), pUnit:GetO()) -- Move the players
- plrs:CastSpell(64446)
- plrs:EnableFlight(false)
- plrs:SetPlayerLock(0)
- plrs:RemoveAura(71986) -- Visual
- end
- if BOSS_PLATFORM ~= nil then
- BOSS_PLATFORM:RemoveFlag(0x0006+0x0003,0x400) -- We respawn the object
- BOSS_PLATFORM:RemoveFlag(0x0006+0x0003,0x200)
- else
- pUnit:GetGameObjectNearestCoords(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), 1930701):RemoveFlag(0x0006+0x0003,0x400) -- If it's still nil then the player's a tard and it deserves to error.
- pUnit:GetGameObjectNearestCoords(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), 1930701):RemoveFlag(0x0006+0x0003,0x200)
- end
- pUnit:SetMount(0) -- Remove his mount
- pUnit:SendChatMessage(42,0,"Blackhound Dismounts!")
- pUnit:SetMovementFlags(1) -- Were on land, fool.
- pUnit:SpawnCreature(BOSS_MOUNT_ID, pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), pUnit:GetO(), 21, 0) -- Hello Magic Kitty Boss, dragon drake thing.
- pUnit:RegisterEvent("Parse_A_Second_Since_we_need_tO_wait_for_variable", 2000, 1)
- end
- function Parse_A_Second_Since_we_need_tO_wait_for_variable(pUnit)
- pUnit:RegisterEvent("Check_Drake_Health_For_Ever_In_Case_it_dies", 2500, 0)
- pUnit:RegisterEvent("Stoneharry_FireLines", math.random(4000, 10000), 1)
- pUnit:RegisterEvent("CurseOf_Reduce_Stoneharry", 15000, 0)
- pUnit:RegisterEvent("ImmorlateThingy_Stoneharry", 17000, 0)
- pUnit:RegisterEvent("Heal_Boss_Player_Tehe", 30000, 0)
- BOSS_MOUNT:RegisterEvent("Breath_Fire_Like_A_Noob", 12000, 1)
- BOSS_MOUNT:CastSpell(26977) -- Debuffs all people for a min, making them weaker to fire
- end
- function Breath_Fire_Like_A_Noob(pUnit)
- BOSS_MOUNT:RegisterEvent("Breath_Fire_Like_A_Noob", math.random(8000,15000), 1)
- BOSS_MOUNT:FullCastSpell(36921) -- Breathing fire like a noob
- end
- function Check_Drake_Health_For_Ever_In_Case_it_dies(pUnit)
- if BOSS_MOUNT:GetHealthPct() < 20 then
- pUnit:SendChatMessage(14,0,"No mortal can harm my drake while I still breath!")
- BOSS_MOUNT:SetHealthPct(35) -- We can't let the drake die now, can we?
- BOSS_MOUNT:CastSpell(24171) -- Heal visual which doesn't appear to work
- end
- end
- -------------------------------------------------------------------------------------------------------
- -- The Boss' Mount ------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function Boss_Mount_On_Soawned_Stoneharru(pUnit)
- BOSS_MOUNT = pUnit -- Allows us to handle it
- BOSS_MOUNT:SetMaxPower(100, 2) -- amount is 100, type is 2
- BOSS_MOUNT:SetPowerType(2) -- type is 2 (focus)
- end
- function BOSS_MOUJn_HAS_DIED_DUN_DUN_DUN(pUnit)
- BOSS_MOUNT:RemoveEvents()
- end
- RegisterUnitEvent(BOSS_MOUNT_ID, 18, "Boss_Mount_On_Soawned_Stoneharru")
- RegisterUnitEvent(BOSS_MOUNT_ID, 4, "BOSS_MOUJn_HAS_DIED_DUN_DUN_DUN")
- -------------------------------------------------------------------------------------------------------
- -- Ressetting the Fight -------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- function OnLeave_Stoneharry(pUnit, Event)
- pUnit:RemoveEvents()
- if pUnit:IsAlive() then -- You can never be sure...
- pUnit:SetFaction(15) -- Reset faction
- BOSS_PLATFORM:RemoveFlag(0x0006+0x0003,0x400) -- Reset object
- BOSS_PLATFORM:RemoveFlag(0x0006+0x0003,0x200)
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:EnableFlight(false) -- Reset players
- plrs:SetPlayerLock(0)
- plrs:RemoveAura(71986) -- Visual
- end
- if BOSS_MOUNT ~= nil then
- BOSS_MOUNT:RemoveEvents() -- Reset drake
- BOSS_MOUNT:Despawn(1,0)
- end
- pUnit:RegisterEvent("Wait_A_Second_Stoneharry", 7500, 1) -- This is like on spawn, but this time we give him a chance to return to his spawn point
- CLEAN_PET_DRAGONS() -- Clean database
- end
- end
- function OnDeath_Stoneharry(pUnit, Event)
- for a, plrs in pairs(pUnit:GetInRangePlayers()) do
- plrs:EnableFlight(false)
- plrs:SetPlayerLock(0)
- plrs:RemoveAura(71986) -- Visual
- end
- BOSS_PLATFORM:RemoveFlag(0x0006+0x0003,0x400)
- BOSS_PLATFORM:RemoveFlag(0x0006+0x0003,0x200)
- pUnit:RemoveEvents()
- if BOSS_MOUNT ~= nil then
- if pUnit:IsAlive() then
- BOSS_MOUNT:RemoveEvents()
- BOSS_MOUNT:Despawn(1,0)
- else
- BOSS_MOUNT:SetHealth(1) -- If he's still alive and boss dies we want him to die as well, so now he dies 1 shot (prob from debuff) so they both die at the same time
- end
- end
- CLEAN_PET_DRAGONS()
- end
- RegisterUnitEvent(BOSS, 2, "OnLeave_Stoneharry")
- RegisterUnitEvent(BOSS, 4, "OnDeath_Stoneharry")
- -------------------------------------------------------------------------------------------------------
- -- Adds -----------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------
- -- Fire Visuals and Damage
- function Fire_Visuals_Stoneharry(pUnit, event)
- pUnit:Root()
- pUnit:SetCombatCapable(1)
- pUnit:RegisterEvent("WAIT_A_SEC_SEC_SEC", 1000, 1)
- end
- function WAIT_A_SEC_SEC_SEC(pUnit, Event)
- pUnit:Root() -- On spawn doesn't always trigger properly, so we'll do it again to be safe
- pUnit:SetCombatCapable(1)
- pUnit:CastSpell(74713) -- Visual and damage
- pUnit:RegisterEvent("zzzWAIT_A_SEC_SEC_SEC", math.random(500,1000), 5) -- To give a bit of variety
- end
- function zzzWAIT_A_SEC_SEC_SEC(pUnit, Event)
- pUnit:CastSpell(74713) -- Visual and damage
- end
- RegisterUnitEvent(FIRE, 18, "Fire_Visuals_Stoneharry")
- -- The Orbs of Summon+Explode
- function Orb_Spawn_And_Explode(pUnit, Event)
- pUnit:SetMovementFlags(2)
- pUnit:SetCombatCapable(1)
- pUnit:Root()
- pUnit:RegisterEvent("HOLD_ON_A_SECOND_MR_ICE_SPHERE", 500, 1)
- end
- function HOLD_ON_A_SECOND_MR_ICE_SPHERE(pUnit)
- pUnit:SetMovementFlags(2)
- pUnit:SetCombatCapable(1)
- pUnit:Root()
- pUnit:RegisterEvent("PullPlayersClose_Tehe", 1000, 3)
- pUnit:RegisterEvent("Lets_Go_Boom_Tehe_Orb", 4000, 1)
- end
- function PullPlayersClose_Tehe(pUnit)
- local rand = pUnit:GetRandomPlayer(0)
- if rand ~= nil then
- pUnit:CastSpell(69090) -- Visual
- pUnit:FullCastSpellOnTarget(41959, rand)
- end
- end
- function Lets_Go_Boom_Tehe_Orb(pUnit)
- pUnit:FullCastSpell(37106)
- end
- RegisterUnitEvent(ORB_ID, 18, "Orb_Spawn_And_Explode")
- -- Fire orbs
- function Fire_orb_goes_lol_stoneharry(pUnit, Event)
- pUnit:Root()
- pUnit:SetMovementFlags(2)
- --pUnit:SetFlying()
- pUnit:RegisterEvent("Lots_OF_us_so_hang_on_A_Second", 500, 1)
- end
- function Lots_OF_us_so_hang_on_A_Second(pUnit)
- pUnit:SetMovementFlags(2)
- pUnit:SetCombatCapable(1)
- pUnit:CastSpell(55928) -- Flame Sphere Visual
- pUnit:CastSpell(55891) -- Flame Sphere Spawn Effect
- --pUnit:SetFlying()
- pUnit:Root()
- pUnit:RegisterEvent("Be_Annoying_With_The_Fire_Things_Tehe", 300, 0)
- pUnit:RegisterEvent("Despawn_the_damn_orb_stoneharry", 20000, 1)
- end
- function Be_Annoying_With_The_Fire_Things_Tehe(pUnit)
- local tram = pUnit:GetClosestPlayer()
- if tram ~= nil then
- pUnit:CastSpellOnTarget(55927, tram)
- end
- end
- function Despawn_the_damn_orb_stoneharry(pUnit)
- if pUnit:IsAlive() then
- pUnit:CancelSpell()
- pUnit:RemoveEvents()
- pUnit:Despawn(1,0)
- end
- end
- RegisterUnitEvent(FIRE_ORB, 18, "Fire_orb_goes_lol_stoneharry")
- ------------------------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement