AscentWorld
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeHome  PortalPortal  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 .LUA (need some help and a req)

Go down 
3 posters
AuthorMessage
Fusion
CN Gangster
CN Gangster
Fusion


Posts : 123
Join date : 2008-03-21
Location : Some ware deep in your hard drive

.LUA (need some help and a req) Empty
PostSubject: .LUA (need some help and a req)   .LUA (need some help and a req) EmptySat Mar 22, 2008 6:29 am

hey guys well i did say i made that script a while ago just wondering if any one has the time to fix it and make it work? ive been stumped for a while lol Razz also the REQ if a LUA tut if anyone is intrested.

Code:

--[[ Makka - Medivh.lua


Outline of the fight: ( [#] = Phase number )
[1] take the boss to 80% hp
[2] at 80% Medivh will cast Shadow bolt Volley evry 10 sec ( i done it in % because i don't know how to so it on time
[3] at 70% Medivh will turn into a random form for 20% and use its abillitese (<-- as far as i got about half way through that part)
[4] at 50% he will return and its a tank and spank race to 20% in this time he will cast random spells and attacks ( he will just pick a random attack to use out of a list of 5 and then cast it evry 10 sec)
[5] at 20% he will spawn a load of adds.. thease should be easy to AOE down but will hit VERY hard ( about 25 adds around him that will hit for about 3k and have around 1.5k hp spawn id 60001)
[6] at 15% he will spawn a helper who must be killed or he will heal medivh ( he will spawn a Belf that will throw heals on medivh which can be interupted evry 15 sec he will have 50 - 70k hp and should be offtanked and will hit for a few k)
[7] at 10% he will call on his Dark followers who must be tanked by off tanks while you finish him off ( thease will be spawned around him (2 of them ) they will have 200k hp and hit for around 2-3k  they will be designed so they are better offtanked till medivh is dead)
[8] at 3% he will enrage ( just any enrage spell eg one on illadan or VR or what ever)
-- By Makka ]]


-- SHADOW BOLT VOLLEY --

function Medivh_volley(Unit)
   if Unit:GetHealthPct() < 81 then
      Unit:CastSpellOnTarget(25586)
   end
end

-- CAT FORM AND CAT FORM SPELLS --

function Medivh_form(Unit)
   if Unit:GetHealthPct() < 71 then
f = math.random (3)
      if (f == 1) then
         -- cat --
      Unit:SendChatMessage(12, 0, "Now Your Pissing me off!")
      Unit:SetModel(9993)
      Unit:SetScale(4)      
      Unit:CastSpellOnTarget(27638)
      elseif (f == 2) then
         -- bear --
      Unit:SendChatMessage(12, 0, "Now Your Pissing me off!")
      Unit:SetModel(820)
      Unit:SetScale(4)
      Unit:CastSpellOnTarget(36996)
      elseif (f == 3) then
         -- bird --
      Unit:SendChatMessage(12, 0, "Now Your Pissing me off!")
      Unit:SetModel(20013)
      Unit:SetScale(4)
      Unit:CastSpellOnTarget(43352)
      end
end
end

-- DE- MORPH --
function Medivh_DeMorph(Unit)
   if Unit:GetHealthPct() < 71 then
      Unit:SetModel(18718)
      Unit:SetScale(2)
   end
end

-- MEDIVH'S CASTING FASE SPELLS --


function Medivh_Spells(Unit)

   n = math.random (3)
      if (n == 1) then
         -- AExploson --
         Unit:CastSpell(37106)
      elseif (n == 2) then
         -- fire nova --
         Unit:CastSpell(43464)
      elseif (n == 3) then
         -- Shadow nova --
         Unit:CastSpell(38627)
      end
end

-- MEDIVH'S IMP ADDS --


function Medivh_Adds(Unit)
   Unit:SendChatMessage(12, 0, "RISE!.. RISE my Minions!")
           x = Unit:GetX();
           y = Unit:GetY();
           z = Unit:GetZ();
           o = Unit:GetO();
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60001, x, y, z, o, 17, 0);
end

-- MEDIVH'S BELF HEALER --

function Medivh_Healer(Unit)
   Unit:SendChatMessage(12, 0, "?? I Need Healing Come Help Me!")
           x = Unit:GetX();
           y = Unit:GetY();
           z = Unit:GetZ();
           o = Unit:GetO();
   Unit:SpawnCreature(60002, x, y, z, o, 17, 0);
end

-- HEDIVH'S DARK FOLLOWERS --


function Medivh_DarkFollowers(Unit)
   Unit:SendChatMessage(12, 0, "My Followers Come Help Me! I Fear This May Be The End!")
           x = Unit:GetX();
           y = Unit:GetY();
           z = Unit:GetZ();
           o = Unit:GetO();
   Unit:SpawnCreature(60003, x, y, z, o, 17, 0);
   Unit:SpawnCreature(60003, x, y, z, o, 17, 0);
end


-- MEDIVH ENRAGES --


function Medivh_Enrage(Unit)
   Unit:SendChatMessage(12, 0, "ARGHH Your Not Taking Me With Out A Fight!!")
   Unit:CastSpell(41447)
end


--[[ Start of were the magic happens

   or so i hope =)
--]]


function Medivh_OnCombat(Unit, Event)
   Unit:SendChatMessage (11, 0, "You fools! you will meet your end just like countless others have!")
   Unit:Register Medivh_volley
   Unit:Register Medivh_form
   Unit:Register Medivh_DeMorph
   Unit:Register Medivh_Spells
   Unit:Register Medivh_Adds
   Unit:Register Medivh_Healer
   Unit:Register Medivh_DarkFollowers
   Unit:Register Medivh_Enrage
   Unit:RegisterEvent("Medivh_volley",1000, 0)
   Unit:RegisterEvent("Medivh_form",1000, 0)
   Unit:RegisterEvent("Medivh_DeMorph",1000, 0)
   Unit:RegisterEvent("Medivh_Spells",1000, 0)
   Unit:RegisterEvent("Medivh_Adds",1000, 0)
   Unit:RegisterEvent("Medivh_Healer",1000, 0)
   Unit:RegisterEvent("Medivh_DarkFollowers",1000, 0)
   Unit:RegisterEvent("Medivh_Enrage",1000, 0)

--[[
   Unit:SendChatMessage (11, 0, "You fools! you will meet your end just like countless others have!")
   Unit:RegisterEvent("Medivh_volley",10000, 0)
   Unit:RegisterEvent("Medivh_form",20000, 0)
   Unit:RegisterEvent("Medivh_DeMorph",25000, 0)
   Unit:RegisterEvent("Medivh_Spells",15000, 0)
   Unit:RegisterEvent("Medivh_Adds",35000, 0)
   Unit:RegisterEvent("Medivh_Healer",40000, 0)
   Unit:RegisterEvent("Medivh_DarkFollowers",120000, 0)
   Unit:RegisterEvent("Medivh_Enrage",120000, 0)
--]]

end

function Medivh_OnLeaveCombat(Unit)
   Unit:RemoveEvents()
end

function Medivh_OnKilledTarget(Unit)
   Unit:SendChatMessage(11, 0, "I pitty you thinking you can take me!")
   Unit:RemoveEvents()
end

function Medivh_OnDied(Unit)
   Unit:SendChatMessage(12, 0, "You Fool's you try to change history... *cough* but you Don't relise Someone else will take my place.. *Cough* you'll s..e...e...")
   Unit:RemoveEvents()
end

RegisterUnitEvent(60000, 1, "Medivh_OnCombat")
RegisterUnitEvent(60000, 2, "Medivh_OnLeaveCombat")
RegisterUnitEvent(60000, 3, "Medivh_OnKilledTarget")
RegisterUnitEvent(60000, 4, "Medivh_OnDied")

Medivh minions
Code:

--[[ Makka - Medivh_Minions.lua


Outline of the fight: ( [#] = Phase number )
[1] do 2 AoE's and they are dead ^^
-- By Makka ]]


function MedivhM_Wave(Unit)
   Unit:CastSpell(38536)
end


function MedivhM_OnCombat(Unit, Event)
   Unit:SendChatMessage (11, 0, "I Will Protect You Master!")
   Unit:RegisterEvent("MedivhM_Wave",10000, 0)
end

function MedivhM_OnLeaveCombat(Unit)
   Unit:RemoveEvents()
end

function MedivhM_OnKilledTarget(Unit)
   Unit:SendChatMessage(11, 0, "See Master i told you See See?!")
   Unit:RemoveEvents()
end

function MedivhM_OnDied(Unit)
   Unit:SendChatMessage(12, 0, "Ahh No.. Master I Tryed.. I Tryed I Realy Did")
   Unit:RemoveEvents()
end


RegisterUnitEvent(60001, 1, "MedivhM_OnCombat")
RegisterUnitEvent(60001, 2, "MedivhM_OnLeaveCombat")
RegisterUnitEvent(60001, 3, "MedivhM_OnKilledTarget")
RegisterUnitEvent(60001, 4, "MedivhM_OnDied")
Medivh_followers
Code:

--[[ Makka - Medivh_followers.lua


Outline of the fight: ( [#] = Phase number )
[1] tank them untill medivh is head then just DPS them down.. simple
-- By Makka ]]


function MedivhF_attack1(Unit)
   Unit:CastSpellOnTarget(41975)
end

function MedivhF_attack2(Unit)
   Unit:CastSpellOnTarget(37066)
end


function MedivhF_OnCombat(Unit, Event)
   Unit:SendChatMessage (11, 0, "AHH it looks like you need some help? maby i could be of assistance?")
   Unit:RegisterEvent("MedivhF_attack1",15000, 0)
   Unit:RegisterEvent("MedivhF_attack2",30000, 0)
end

function MedivhF_OnLeaveCombat(Unit)
   Unit:RemoveEvents()
end

function MedivhF_OnKilledTarget(Unit)
   Unit:SendChatMessage(11, 0, "There is one less for you to worry about Haha")
   Unit:RemoveEvents()
end

function MedivhF_OnDied(Unit)
   Unit:SendChatMessage(12, 0, "ARghh Looks to be your on your own Medivh!")
   Unit:RemoveEvents()
end


RegisterUnitEvent(60003, 1, "MedivhF_OnCombat")
RegisterUnitEvent(60003, 2, "MedivhF_OnLeaveCombat")
RegisterUnitEvent(60003, 3, "MedivhF_OnKilledTarget")
RegisterUnitEvent(60003, 4, "MedivhF_OnDied")
Medivh_healer
Code:

--[[ Makka - Medivh_healers.lua


Outline of the fight: ( [#] = Phase number )
[1] tank them untill medivh is head then just DPS them down.. simple
-- By Makka ]]


function MedivhH_Heal(Unit)
   Unit:CastSpell(19775)
end


function MedivhH_OnCombat(Unit, Event)
   Unit:SendChatMessage (11, 0, "You called? i See you Want my healing assistence?")
   Unit:RegisterEvent("MedivhH_Heal",10000, 0)

end

function MedivhH_OnLeaveCombat(Unit)
   Unit:RemoveEvents()
end

function MedivhH_OnKilledTarget(Unit)
   Unit:SendChatMessage(11, 0, "Well that was intresting")
   Unit:RemoveEvents()
end

function MedivhH_OnDied(Unit)
   Unit:SendChatMessage(12, 0, "Mabey My heals arn'y that good afteral")
   Unit:RemoveEvents()
end


RegisterUnitEvent(60002, 1, "MedivhH_OnCombat")
RegisterUnitEvent(60002, 2, "MedivhH_OnLeaveCombat")
RegisterUnitEvent(60002, 3, "MedivhH_OnKilledTarget")
RegisterUnitEvent(60002, 4, "MedivhH_OnDied")
Back to top Go down
http://www.fusionprogramming.co.uk
Pyromagnetic
CN Elite
CN Elite
Pyromagnetic


Posts : 37
Join date : 2008-03-21

.LUA (need some help and a req) Empty
PostSubject: Re: .LUA (need some help and a req)   .LUA (need some help and a req) EmptySat Mar 22, 2008 9:02 am

Fusion wrote:
hey guys well i did say i made that script a while ago just wondering if any one has the time to fix it and make it work? ive been stumped for a while lol Razz also the REQ if a LUA tut if anyone is intrested.

what seems to be the poroblem
Back to top Go down
HalestormXV
Sentinos
Sentinos
HalestormXV


Posts : 43
Join date : 2008-03-21

.LUA (need some help and a req) Empty
PostSubject: Re: .LUA (need some help and a req)   .LUA (need some help and a req) EmptySat Mar 22, 2008 9:43 am

What is the error with it? Casue it looks good.
Back to top Go down
Fusion
CN Gangster
CN Gangster
Fusion


Posts : 123
Join date : 2008-03-21
Location : Some ware deep in your hard drive

.LUA (need some help and a req) Empty
PostSubject: Re: .LUA (need some help and a req)   .LUA (need some help and a req) EmptySat Mar 22, 2008 1:27 pm

Sorry my bad, i got a few probs

medivh wont follow his "timeline" aka %hp also the dudes he spaws attack him lol (that's to do with flags right?) also im not sure how to get his healers to target him and heal him another thing is he castes spells instantly in some cases that's all i can remember atm.
Back to top Go down
http://www.fusionprogramming.co.uk
HalestormXV
Sentinos
Sentinos
HalestormXV


Posts : 43
Join date : 2008-03-21

.LUA (need some help and a req) Empty
PostSubject: Re: .LUA (need some help and a req)   .LUA (need some help and a req) EmptySat Mar 22, 2008 6:10 pm

Alrite just by the description it seems that your problems are as follows.

1. Instan cast spells: Make sure you are using FullCastSpell or FullCastSpellOnTarget

2. His mobs attacking him has to do with faction setting. Make sure when you spawn the mobs you spawn them as the same faction of medivh

3. Not following him time line seems to be an issue with you registering your scripts and using the RemoveEvents function.
(Example: You may have a function to register and check for say phase 2 but you have a script that runs before that that RemoveEvent)

4. As for having mobs target him I have to look threw my files to find that once again.
Back to top Go down
Fusion
CN Gangster
CN Gangster
Fusion


Posts : 123
Join date : 2008-03-21
Location : Some ware deep in your hard drive

.LUA (need some help and a req) Empty
PostSubject: Re: .LUA (need some help and a req)   .LUA (need some help and a req) EmptySun Mar 23, 2008 9:05 am

HalestormXV wrote:
Alrite just by the description it seems that your problems are as follows.

1. Instan cast spells: Make sure you are using FullCastSpell or FullCastSpellOnTarget

2. His mobs attacking him has to do with faction setting. Make sure when you spawn the mobs you spawn them as the same faction of medivh

3. Not following him time line seems to be an issue with you registering your scripts and using the RemoveEvents function.
(Example: You may have a function to register and check for say phase 2 but you have a script that runs before that that RemoveEvent)

4. As for having mobs target him I have to look threw my files to find that once again.

i got told this before but i tryed it and it wouldn't work. so i asked if any one could fix this one up so i know what to do in future
Back to top Go down
http://www.fusionprogramming.co.uk
Sponsored content





.LUA (need some help and a req) Empty
PostSubject: Re: .LUA (need some help and a req)   .LUA (need some help and a req) Empty

Back to top Go down
 
.LUA (need some help and a req)
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
AscentWorld :: LUA and Moon+ Scripts :: LUA-
Jump to: