PDA

View Full Version : [Release] Onyxia Lua Script!!!


warlcok
03-22-2009, 07:37 PM
This is the first release completely by me!!!! (Copy and paste it into notepad and save it as Lua into your scripts folder, for those who dont know how to add a script) function Onyxia_PhaseOneSpells(pUnit, event)
local randomspell=math.random(1, 4);
if randomspell == 1 then
pUnit:FullCastSpellOnTarget(18435, pUnit:GetMainTank())
pUnit:RegisterEvent("Onyxia_PhaseOneSpells", math.random(16000, 20000), 1)
return;
end
if randomspell == 2 then
pUnit:FullCastSpellOnTarget(18500, pUnit:GetMainTank())
pUnit:RegisterEvent("Onyxia_PhaseOneSpells", math.random(16000, 20000), 1)
return;
end
if randomspell == 3 then
pUnit:FullCastSpellOnTarget(19983, pUnit:GetMainTank())
pUnit:RegisterEvent("Onyxia_PhaseOneSpells", math.random(16000, 20000), 1)
return;
end

if randomspell == 4 then
pUnit:RegisterEvent("Onyxia_PhaseOneSpells", math.random(16000, 20000), 1)
local tbl=pUnit:GetInRangePlayers();
for k,v in pairs(tbl) do
if v:IsInBack(pUnit) == true then
local behindtargets={}
if v:IsInBack(pUnit) == true then
table.insert(behindtargets, v)
local player=math.random(1, table.getn(behindtargets))
pUnit:FullCastSpellOnTarget(15847,behindtargets[player])
end
end
end
end
end

function Onyxia_KnockAway(pUnit, event)
local maintank=pUnit:GetMainTank();
pUnit:FullCastSpellOnTarget(19633, maintank)
--local threatcalc=pUnit:GetThreat(maintank) / (4);
--local playerthreat=threatcalc * (3);
--pUnit:ModThreat(maintank, playerthreat)
end

function Onyxia_BellowingRoar(pUnit, event)
pUnit:FullCastSpell(18431)
end

function Onyxia_PhaseThree(pUnit, event)
if pUnit:GetHealthPct() <= 40 then
pUnit:RemoveEvents()
pUnit:Land()
pUnit:RegisterEvent("Onyxia_PhaseOneSpells", math.random(16000, 20000), 1)
pUnit:RegisterEvent("Onyxia_KnockAway", 22000, 0)
pUnit:RegisterEvent("Onyxia_BellowingRoar", 18000, 0)
end
end

function Onyxia_PhaseTwo(pUnit, event)
if pUnit:GetHealthPct() <= 65 then
pUnit:RemoveEvents()
pUnit:SetCombatTargetingCapable(1)
pUnit:SetCombatMeleeCapable(1)
pUnit:MoveTo(-75.945, -219.245, -83.375, 0.004947)
pUnit:RegisterEvent("Onyxia_ReachedWaypoint", 11000, 1)
pUnit:RegisterEvent("Onyxia_PhaseThree", 1000, 0)
end
end

function Onyxia_OnEnterCombat(pUnit, event)
pUnit:SendChatMessage(14, 0, "How fortuitous, usually I must leave my lair to feed!")
pUnit:RegisterEvent("Onyxia_PhaseOneSpells", math.random(12000, 17000), 1)
pUnit:RegisterEvent("Onyxia_KnockAway", 22000, 0)
pUnit:RegisterEvent("Onyxia_PhaseTwo", 1000, 0)
end

RegisterUnitEvent(10184, 1, "Onyxia_OnEnterCombat")

function Onyxia_Fireball(pUnit, event)
local player=pUnit:GetRandomPlayer(0);
pUnit:CastSpellAoF(player:GetX(), player:GetY(), player:GetZ(), 18392)
end

function Onyxia_WaypointTwelve(pUnit, event)
pUnit:RegisterEvent("Onyxia_Fireball", 5000, 4)
pUnit:RegisterEvent("Onyxia_WaypointThree", 23001, 1)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
end

function Onyxia_WaypointEleven(pUnit, event)
pUnit:MoveTo(-4.868, -217.171, -86.710, 3.141590)
pUnit:RegisterEvent("Onyxia_WaypointTwelve", 10000, 1)
end

function Onyxia_WaypointTen(pUnit, event)
pUnit:RegisterEvent("Onyxia_Fireball", 5000, 4)
pUnit:RegisterEvent("Onyxia_WaypointEleven", 23001, 1)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
end

function Onyxia_WaypointNine(pUnit, event)
pUnit:MoveTo(27.875, -178.547, -66.041, 3.908957)
pUnit:RegisterEvent("Onyxia_WaypointTen", 10000, 1)
end

function Onyxia_WaypointEight(pUnit, event)
pUnit:RegisterEvent("Onyxia_Fireball", 5000, 4)
pUnit:RegisterEvent("Onyxia_WaypointNine", 23001, 1)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
end

function Onyxia_WaypointSeven(pUnit, event)
pUnit:MoveTo(-80.257, -174.240, -69.293, 5.695741)
pUnit:RegisterEvent("Onyxia_WaypointEight", 10000, 1)
end

function Onyxia_WaypointSix(pUnit, event)
pUnit:RegisterEvent("Onyxia_Fireball", 5000, 4)
pUnit:RegisterEvent("Onyxia_WaypointSeven", 23001, 1)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
end

function Onyxia_WaypointFive(pUnit, event)
pUnit:MoveTo(-79.020, -252.374, -68.965, 0.885179)
pUnit:RegisterEvent("Onyxia_WaypointSix", 10000, 1)
end

function Onyxia_WaypointFour(pUnit, event)
pUnit:RegisterEvent("Onyxia_Fireball", 5000, 4)
pUnit:RegisterEvent("Onyxia_WaypointFive", 23001, 1)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
end

function Onyxia_WaypointThree(pUnit, event)
pUnit:MoveTo(12.270, -254.694, -67.997, 2.395585)
pUnit:RegisterEvent("Onyxia_WaypointFour", 10000, 1)
end

function Onyxia_WaypointTwo(pUnit, event)
pUnit:RegisterEvent("Onyxia_Fireball", 5000, 4)
pUnit:RegisterEvent("Onyxia_WaypointThree", 23001, 1)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -35.813, -169.427, -90.000, 5.384, 14, 0)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -35.813, -169.427, -90.000, 5.384, 14, 0)
pUnit:SpawnCreature(11262, -30.812, -166.395, -89.000, 5.160, 14, 0)
pUnit:SpawnCreature(11262, -30.233, -264.158, 89.896, 1.129, 14, 0)
pUnit:SpawnCreature(11262, -35.813, -169.427, -90.000, 5.384, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -35.377, -267.320, -91.000, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -35.377, -267.320, -91.000, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -36.104, -260.961, -90.600, 1.111, 14, 0)
pUnit:SpawnCreature(11262, -34.643, -164.080, -90.000, 5.364, 14, 0)
pUnit:SpawnCreature(11262, -35.377, -267.320, -91.000, 1.111, 14, 0)
end

function Onyxia_ReachedWaypoint(pUnit, event)
pUnit:SetCombatTargetingCapable(0)
pUnit:SetFlying()
pUnit:MoveTo(42.621, -217.195, -66.056, 3.014011)
pUnit:RegisterEvent("Onyxia_WaypointTwo", 10000, 1)
end

function Onyxia_OnWipe(pUnit, event)
if pUnit:IsAlive() == true then
pUnit:Land()
pUnit:RemoveEvents()
else
pUnit:RemoveEvents()
end
end

RegisterUnitEvent(10184, 2, "Onyxia_OnWipe")

function Whelps_OnSpawn(pUnit, event)
local player=pUnit:GetClosestPlayer();
pUnit:ModifyWalkSpeed(8)
pUnit:SetOutOfCombatRange(10000)
pUnit:MoveTo(player:GetX(), player:GetY(), player:GetZ(), player:GetO())
end

RegisterUnitEvent(11262, 18, "Whelps_OnSpawn")


--Onyxia Warder AI
function Warder_FireNova(pUnit, event)
pUnit:FullCastSpell(38728)
pUnit:RegisterEvent("Warder_FireNova", math.random(8000, 11000), 1)
end

function Warder_FlameLash(pUnit, event)
pUnit:FullCastSpell(18958)
pUnit:RegisterEvent("Warder_FlameLash", math.random(7000, 14000), 1)
end

function Warder_OnEnterCombat(pUnit, event)
pUnit:RegisterEvent("Warder_FireNova", math.random(8000, 11000), 1)
pUnit:RegisterEvent("Warder_FlameLash", math.random(7000, 14000), 1)
end

RegisterUnitEvent(12129, 1, "Warder_OnEnterCombat")

function Warder_OnWipe(pUnit, event)
pUnit:RemoveEvents()
end

RegisterUnitEvent(12129, 2, "Warder_OnWipe")


THIS WAS MADE BY WARLCOK OF AC-WEB AND NO ONE ELSE!!

QQrofl
03-22-2009, 07:38 PM
Nice script! 100% Top notch!

$PearBear- AKA -PeRRy$
03-22-2009, 07:38 PM
KEEEL HIS ASS MAN i cuts him ,ima cut him so bad he,he gun wish i no cuts him so bad

QQrofl
03-22-2009, 07:45 PM
+Rep btw, warlcok... Wtf QQ Reps!?!?!?

Gemy
03-22-2009, 07:47 PM
Nice im going to use this!!

Amiturgan
03-22-2009, 07:54 PM
EPIC I have never had a private server with a ony script!!

spyvirus
03-22-2009, 07:56 PM
Hope this works +rep

Hotdogz
03-22-2009, 07:58 PM
Woot it works! Thanks for this script!

navidlurker
03-22-2009, 08:04 PM
good job

warlcok
03-22-2009, 08:08 PM
Thanks guys

Bump

R3dW3r3W0lf
03-22-2009, 09:34 PM
Isn't there already a script for Onyxia?

edit: Never mind, Just checked. Im gonna add this. +Rep! :)

warlcok
03-22-2009, 10:20 PM
Isn't there already a script for Onyxia?

edit: Never mind, Just checked. Im gonna add this. +Rep! :)

sweet thanks

Jeffy
03-22-2009, 10:24 PM
Stolen, I have this LUA in my Script Bin already.

112233445566
03-22-2009, 10:28 PM
Stolen, I have this LUA in my Script Bin already.

Just because you have it does not mean someone has stolen it, it could have been made by someone else, scripts are very common especially boss scripts

Oh and +rep

Jeffy
03-22-2009, 10:31 PM
NVM.. rather not share the SVN.

Neeko
03-22-2009, 10:55 PM
Thanks for sharing this. :cool:

warlcok
03-23-2009, 12:16 AM
Thanks for sharing this. :cool:

your welcome

slade1000
03-23-2009, 12:27 AM
good job +rep

warlcok
03-23-2009, 12:34 AM
good job +rep

Thanks slade, have not seen you in awhile

M3DIC911
03-23-2009, 12:40 AM
Awesome Work Warlok +Rep!

slade1000
03-23-2009, 12:41 AM
im around lol

QQrofl
03-23-2009, 12:42 AM
In her pants!

slade1000
03-23-2009, 12:44 AM
Now that was random

slade1000
03-23-2009, 12:47 AM
ahhha i get it ok mabey not so random then

Mikeambrose3
03-23-2009, 01:22 AM
WoW, Very Nice! Works!
REP FOR YOU!

warlcok
03-23-2009, 09:46 AM
Thanks guys!! Hope this helps everyone!!

skreem
03-23-2009, 04:34 PM
+Rep btw, warlcok... Wtf QQ Reps!?!?!?

No he don't I happen to know qqrofl. He wont even rep his best
dev/gm/headAdmin/SexyBeastTravis
You are a fake! ;)

warlcok
03-23-2009, 10:55 PM
No he don't I happen to know qqrofl. He wont even rep his best
dev/gm/headAdmin/SexyBeastTravis
You are a fake! ;)

Naa lol that was real qqrofl lol he told me he did on MSN

EDIT: Hey gotmilk!!

lordcranberry3
03-23-2009, 10:56 PM
cool ty man

skreem
03-24-2009, 01:33 AM
Naa lol that was real qqrofl lol he told me he did on MSN

EDIT: Hey gotmilk!!

Olla! warlock

warlcok
03-24-2009, 01:21 PM
Olla! warlock

Hola Seniorita Milk!!

zade749
10-22-2009, 12:22 AM
looks very nice O.o +rep

Slinky
10-22-2009, 01:04 AM
Using this for ChaoScape. +rep

~BakayarO

Brianplast
10-22-2009, 01:07 PM
Thx:)

tom12e
10-22-2009, 02:09 PM
bump + rep

eatos
10-22-2009, 02:14 PM
nice try to claim it as your own! This script was released on kdb a long time ago on rev 37 i belive so you just copied it...In othere words stolen it

frathir
10-22-2009, 06:58 PM
is this old lvl 60 onyxia or new 80? :P or can you just change her level to 80? +rep epic stuff made

Lbniese
10-22-2009, 07:05 PM
Nice release dude

thastijn
10-22-2009, 08:53 PM
lol you did not make this, you just edited it a bit...

Ikizami
10-22-2009, 11:06 PM
Even if it was just some edits improved into this, Just tried her out. Overall seemed pretty good. :D

ZXD
10-23-2009, 10:21 AM
She Deepbreaths?

Gambini
10-23-2009, 03:07 PM
Did you guys read the original post date? It was like April >.<

OnyxiaKing
10-23-2009, 07:45 PM
she deepbreaths?

N
o

Ikillonyxia
11-10-2009, 05:53 PM
Fyi to everyone here, I AM the original creator of this script. This is Ikillonyxia from LUA++, if you check the old svn you will see it commited there as I progressed on it. So stop trying to steal shit.

darren
11-11-2009, 12:27 PM
edit:
i fail

Sticky-Buds
11-11-2009, 12:29 PM
Looks great !

Lexythelord
02-27-2011, 12:20 PM
Is this blizzlike? Or just something u come up with to get rep?