PDA

View Full Version : [Lua Script] Illidan Boss Battle by Nadskap2


Blyitgen
02-01-2009, 01:00 PM
Hi all. I created this little (a little big) script because i wanted to get a fair fight between illidan and me :) + i created a new SQL for illidan because everyone is unable to attack him in most repacks. I used the spells from WoWHead and the stats from WoWHead.

DOWNLOAD NOW! (http://filebeam.com/cbe1136bf4cd5e04fd5c4233cfe92e6c)

No pictures. But some info:

Name: Illidan Stormrage
<The Betrayer>
Level: ?? (Boss)
Race: Demon
Display id: 21135
Scale: 1
HP: 4,249,280
Mana: 6,774

If u dont wanna download then copy this:

LUA Script:


-- Start function --



function Illidan Stormrage
_OnEnterCombat(pUnit,Event)
pUnit:SetModel(22917)
pUnit:PlaySoundToSet(22917)
pUnit:SetScale(2)
pUnit:SetCombatCapable(1)
pUnit:SetFaction(35)
pUnit:SendChatMessage(0, 0, "")
pUnit:RegisterEvent("NPCNAME_TalkStart1", 5000, 0)
end


-- Phase one --

function Illidan Stormrage
_SpellpUnitShear,Event)
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))

end


function Illidan Stormrage
_SpellFlameCrash(pUnit,Event)
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))

end


function Illidan Stormrage
_Phaseone(pUnit,Event)
Choice=math.random(1, 2, 3, 4)
if Choice==1 then
pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
end
if Choice==2 then
pUnit:CastSpellOnTarget(40904,pUnit:GetRandomPlaye r(0))
end
if Choice==3 then
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
end
if Choice==4 then
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))

end
end
if nit:GetHealthPct() <= 80 then
Unit:RegisterEvent("Illidan Stormrage
_Phasetwo", 1000, 0)
not Unit:RegisterEvent("Illidan Stormrage
_Phaseone", 1000, 0)

end

--Phase two--


function Illidan Stormrage
_Phasetwo(pUnit,Event)
Choice=math.random(1, 2, 3)
if Choice==1 then
pUnit:CastSpellOnTarget(40018,pUnit:GetRandomPlaye r(0))
end
if Choice==2 then
pUnit:CastSpellOnTarget(40598,pUnit:GetRandomPlaye r(0))
end
if Choice==3 then
pUnit:CastSpellOnTarget(40585,pUnit:GetRandomPlaye r(0))
end

end
if nit:GetHealthPct() <= 70 then
Unit:RegisterEvent("Illidan Stormrage
_Phasethree", 1000, 0)
not Unit:RegisterEvent("Illidan Stormrage
_Phasetwo", 1000, 0
end
--Phase 3--
function Illidan Stormrage
_SpellpUnitShear,Event)
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))

end


function Illidan Stormrage
_SpellFlameCrash(pUnit,Event)
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))

end


function Illidan Stormrage
_Phasethree(pUnit,Event)
Choice=math.random(1, 2, 3, 4, 5)
if Choice==1 then
pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
end
if Choice==2 then
pUnit:CastSpellOnTarget(40904,pUnit:GetRandomPlaye r(0))
end
if Choice==3 then
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
end
if Choice==4 then
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
end
if Choice==5 then
pUnit:CastSpellOnTarget(40932,pUnit:GetRandomPlaye r(0))
end
if nit:GetHealthPct() <= 50 then
Unit:RegisterEvent("Illidan Stormrage
_Phasefour", 1000, 0)
not Unit:RegisterEvent("Illidan Stormrage
_Phasethree", 1000, 0)
end
--Phase 4--


function Illidan Stormrage
_SpellR(pUnit,Event)
Choice=math.random(1, 2, 3, 4)
if Choice==1 then
pUnit:CastSpellOnTarget(41078,pUnit:GetRandomPlaye r(0))
end
if Choice==2 then
pUnit:CastSpellOnTarget(41126,pUnit:GetRandomPlaye r(0))
end
if Choice==3 then
pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
end
if Choice==4 then
pUnit:CastSpellOnTarget(41142,pUnit:GetRandomPlaye r(0))

end
if nit:GetHealthPct() <= 25 then
Unit:RegisterEvent("NPCNAME_Phasefive", 1000, 0)
not Unit:RegisterEvent("NPCNAME_Phasefour", 1000, 0)
end
--Phase 5--
function Illidan Stormrage
_SpellpUnitShear,Event)
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))

end


function Illidan Stormrage
_SpellFlameCrash(pUnit,Event)
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))

end


function Illidan Stormrage
_SpellR(pUnit,Event)
Choice=math.random(1, 2, 3, 4, 5, 6, 7)
if Choice==1 then
pUnit:CastSpellOnTarget(41117,pUnit:GetMainTank(0) )
end
if Choice==2 then
pUnit:CastSpellOnTarget(40904,pUnit:GetMainTank(0) )
end
if Choice==3 then
pUnit:CastSpellOnTarget(41032,pUnit:GetMainTank(0) )
end
if Choice==4 then
pUnit:CastSpellOnTarget(40832,pUnit:GetMainTank(0) )
end
if Choice==5 then
pUnit:CastSpellOnTarget(40932,pUnit:GetRandomPlaye r(0))
end
if Choice==6 then
pUnit:CastSpellOnTarget(40647,pUnit:GetRandomPlaye r(0))
end
if Choice==7 then
pUnit:CastSpellOnTarget(40683,pUnit:GetRandomPlaye r(0))
if nit:GetHealthPct() <= o then
Unit:RegisterEvent("Illidan Stormrage
_death", 1000, 0)
not Unit:RegisterEvent("Illidan Stormrage
_Phasefive", 1000, 0

end
-- Extra --



function Illidan Stormrage
_Death(pUnit)
pUnit:SetScale(2)
pUnit:PlaySoundToSet(22917)
pUnit:RemoveEvents()


function Illidan Stormrage
_OnLeaveCombat(pUnit, event)
pUnit:RemoveEvents()
pUnit:SetModel(22917)
pUnit:SetScale(2)
end


function Illidan Stormrage
_OnKilledTarget(pUnit)
pUnit:PlaySoundToSet(22917)
end





-- Start functions --


RegisterUnitEvent(22917, 1, "Illidan Stormrage_OnEnterCombat")
RegisterUnitEvent(22917, 2, "Illidan Stormrage_OnLeaveCombat")
RegisterUnitEvent(22917, 3, "Illidan Stormrage_OnKilledTarget")
RegisterUnitEvent(22917, 4, "Illidan Stormrage_Death")


Save as Illidan Stormrage.lua in your scripts folder

SQL:

replace into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('22917', "Illidan Stormrage", "The Betrayer", '', '0', '3', '0', '3', '0', '0', '21135', '21135', '21135', '21135', '1', '1', '0', '0');

replace 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`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('22917', '72', '72', '14', '4249280', '4249280', '6774', '1', '0', '1500', '0', '13000', '16000', '0', '0', '0', '0', '600', '56000', '56', '56', '56', '56', '56', '56', '0', '0', "0", '1', '450000', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');


Save as Illidan.sql and execute into your world database

oandy1010
02-01-2009, 02:36 PM
very nice!

+rep to you

Blyitgen
02-01-2009, 02:45 PM
thx :) it took me some time

+rep back to you :)

herculis
02-01-2009, 07:38 PM
hah sick +rep

abc
02-04-2009, 11:05 AM
ty w8 for this long time +rep

bighairycamel
03-01-2009, 06:06 PM
In arcemu-world.exe I get the message
"failed. (could not load) scripts\Illidan Stormrage.lua:5 '(' expected near 'Stormrage'

Did I do something incorrectly? In the readme it says to Execute the SQL into your database. What I did was open the DB in HediSQL and did Import>Load SQL file>Illidan SQL.sql Maybe I did this step incorrectly?

Edit: I did do that step incorrectly because I did not select "Execute this SQL" after I imported it. However, after resetting and reloading the server it was still not fixed.

Naggerguy
03-02-2009, 02:07 AM
In arcemu-world.exe I get the message
"failed. (could not load) scripts\Illidan Stormrage.lua:5 '(' expected near 'Stormrage'

Did I do something incorrectly? In the readme it says to Execute the SQL into your database. What I did was open the DB in HediSQL and did Import>Load SQL file>Illidan SQL.sql Maybe I did this step incorrectly?

Edit: I did do that step incorrectly because I did not select "Execute this SQL" after I imported it. However, after resetting and reloading the server it was still not fixed.

I get the same thing.

GravitatisVis
03-02-2009, 06:02 AM
hey, I was able to execute your code fine, but when I spawn him in game, he just stand there and I'm unable to attack him. Any ideas?

djoksa
03-02-2009, 12:10 PM
nice work, is this blizzlike? +rep

arjo112
03-02-2009, 01:20 PM
hey, I was able to execute your code fine, but when I spawn him in game, he just stand there and I'm unable to attack him. Any ideas?

Maby for some strange reason his faction is friendly with yours:P just change it then if not , which means he is unfriendly i just don't know:P

Blyitgen
03-02-2009, 04:07 PM
i know how :) you must use him in black temple :) it needs the working Akama script

assmunch
05-16-2009, 05:57 PM
Yea, it won't load the script, but the SQL worked fine.

In arcemu-world.exe I get the message
"failed. (could not load) scripts\Illidan Stormrage.lua:5 '(' expected near 'Stormrage'

Same as bighairycamel and Naggerguy.

Blyitgen
05-16-2009, 06:38 PM
this script is outdated

T4PO
05-16-2009, 06:56 PM
Nad, nice script, Shouldn't this go in the script section??

Blyitgen
05-16-2009, 07:04 PM
i released this before those sections was there ;)

T4PO
05-16-2009, 07:36 PM
oh.

OnyxiaKing
06-13-2009, 06:36 PM
Nope, when i execute the SQL in HeidiSQL i get the following error: "SQL Error: Unknown column 'can_ranged' in 'field list'
Any help?

jammyjay
06-13-2009, 07:33 PM
Nice script +rep

cmullins2003
04-13-2010, 08:17 PM
EPIC! Going to try this when I get home. I am designing a server now which is under beta. I will close The Black Temple for a while until I get the testers to check it out. THANKS SO MUCH FOR THIS!

Blyitgen
04-14-2010, 02:58 PM
this is so old lol

Cronic
04-14-2010, 07:46 PM
yeah and you didnt even write it right

AwkwardDev
04-14-2010, 07:51 PM
Old or not, its cool. So + rep from me too :P.

Xyolexus
04-14-2010, 10:12 PM
STOP F**KING NECROPOSTING, Noob!