chaosnight

Rednightwow Forums
 
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 2 lua bosses made by sharrior

Go down 
AuthorMessage
sharrior
GM
GM
avatar

Posts : 78
Join date : 2008-09-25
Age : 22
Location : Norway

PostSubject: 2 lua bosses made by sharrior   Sat Jan 24, 2009 3:46 pm

one boss:



Code:

local spawnID = 78137

    local NPCNAME = Kar'nazur
   
       local SPAWNNAME = Kar'nazur
      
          local NPCID = 78137






function NPCNAME_OnCombat (Unit, Event)
        pUnit:RegisterEvent("NPCNAME_Scale", 900000, 2)
      pUnit:RegisterEvent("NPCNAME_Model", 100000, 2)
        pUnit:SendChatMessage (14, 0, "Im Going to pwn you!")
      pUnit:RegisterEvent("NPCNAME_Spell", 10000, 10)
      pUnit:RegisterEvent("NPCNAME_Aoe", 20000, 10)
      pUnit:RegisterEvent("NPCNAME_CheckA", 30000, 1)
      pUnit:RegisterEvent("NPCNAME_CheckB", 35000, 1)
      pUnit:RegisterEvent("NPCNAME_CheckC", 40000, 2)
      pUnit:RegisterEvent("NPCNAME_CheckD", 40000, 1)
      pUnit:RegisterEvent("NPCNAME_CheckE", 60000, 1)
      pUnit:RegisterEvent("NPCNAME_CheckF", 60000, 1)
end


function NPCNAME_Scale (pUnit, Event)
        pUnit:SetScale  (3)
end


function NPCNAME_Model (pUnit, Event)
        pUnit:SetModel (17523)
end



function NPCNAME_Spell (pUnit, Event)
        pUnit:FullCastSpellOnTarget(11661, pUnit:GetRandomPlayer(0))
      
end

function NPCNAME_Aoe (pUnit, Event)
        pUnit:CastSpell(27212)
end



function NPCNAME_CheckA (pUnit, Event)
        if pUnit:GetHealthPct()  < 80 then
      pUnit:SendChatMessage (14, 0, "so you think you got me now? haha what a joke!")
      pUnit:CastSpellOnTarget(25, pUnit:GetMainTank())
   end
end


function NPCNAME_CheckB(pUnit, Event)
        if pUnit:GetHealthPct() < 50 then
      pUnit:SendChatMessage (14, 0, "I am ready for another round,bring it on!")
      pUnit:CastSpellOnTarget(5, pUnit:GetClosestPlayer(0))
   end
end

function NPCNAME_CheckC(pUnit, Event)
        if pUnit:GetHealthPct() < 3 then
      pUnit:SendChatMessage (14, 0, "NOOO NOT AGAIN! just kidding")
      pUnit:CastSpell(48063)
      pUnit:CastSpell(48063)
      pUnit:CastSpell(48063)
      pUnit:CastSpell(48063)
      pUnit:CastSpell(48063)
      pUnit:CastSpell(48063)
   end
end


function NPCNAME_CheckD(pUnit, Event)
        if pUnit:GetHealthPct() < 25 then
      pUnit:SendChatMessage (14, 0, "Now you made me angry!")
      pUnit:SetModel(11852)
   end
end


function NPCNAME_CheckE(pUnit, Event)
        if pUnit:GetHealthPct() < 20 then
      pUnit:SendChatMessage(14, 0, "Im going to crush you now!")
      pUnit:SetScale(5)
   end
end



function NPCNAME_Death (pUnit, Event)
        pUnit:SendChatMessage(14, 0, "Come forth,my dear son,come and avenge me!")
        pUnit:SpawnCreature (183729, x, y, z, o, 1, 36000);
        pUnit:RemoveEvents()
end

function NPCNAME_OnKilledTarget (pUnit, Event)
        pUnit:SendChatMessage(14, 0, "Wha ha ha ha ha ha")
      pUnit:CastSpellOnTarget(25, pUnit:GetClosestPlayer)
end

function NPCNAME_OnLeaveCombat (pUnit, Event)
        pUnit:SendChatMessage(12, 0, "They just ran away")
      pUnit:RemoveEvents()
end

RegisterUnitEvent(78137, 1, "NPCNAME_OnCombat")
RegisterUnitEvent(78137, 2, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(78137, 3, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(78137, 4, "NPCNAME_Death")


and the second boss(the most advanced boss I've made):

Code:

local spawnID = 183729

    local NPCNAME = Archking Ther'zuras
   
       local SPAWNNAME = Archking Ther'zuras
      
          local NPCID = 183729


function NPCNAME_OnEnterCombat (Unit, Event)
        pUnit:SetFaction(7)
      pUnit:SetMovementType(fly)
        pUnit:SendChatMessage (12, 0, "Im Going to pwn you!")
      pUnit:RegisterEvent("NPCNAME_talk", 100000000, 1)
      pUnit:RegisterEvent("NPCNAME_Spell", 1000000, 10)
      pUnit:RegisterEvent("NPCNAME_CheckA", 20000, 10)
      pUnit:RegisterEvent("NPCNAME_CheckB", 35000, 10)
      pUnit:RegisterEvent("NPCNAME_CheckC", 40000, 10)
      pUnit:RegisterEvent("NPCNAME_CheckD", 40000, 10)
      pUnit:RegisterEvent("NPCNAME_CheckE", 60000, 10)
      pUnit:RegisterEvent("NPCNAME_Spell2", 600000, 5)
end




function NPCNAME_talk(pUnit, Event)
Choice = math.random (1, 10)
        if choice == 1 then
        pUnit:SendChatMessage( 12, 0, "My my...you killed my father,I thought he were stronger than me too")
        pUnit:SendChatMessage(14, 0, "YOU GIVE ME NO CHOICE THEN OTHER THAN TO DESTROY YOU AND AVENGE MY FATHER!")
        pUnit:SetScale(5)
        pUnit:SetModel(19327)
      pUnit:CastSpell(49222)
   end


        if choice == 2 then
        pUnit:SendChatMessage(12, 0, "So my father failed following the way to immortality")
      pUnit:SetModel(18237)
        pUnit:SetScale(5)
        pUnit:SendChatMessage(14, 0, "Im GOING TO CRUSH YOU!")
   end

        if choice == 3 then
        pUnit:SendChatMessage(14, 0, "I AM THE GOD OVER IMMORTALITY!!!!")
        pUnit:CastSpellOnTarget(25, pUnit:GetClosestPlayer(0))
        pUnit:SendChatMessage(14, 0, "KNEEL! KNEEL!!!")
   end


        if choice == 4 then
        pUnit:SendChatMessage(12, 0, "Last time I were killing someone were for...")
        pUnit:CastSpellOntarget(5, pUnit:GetMaintank())
        pUnit:CastSpellOnTarget(25, pUnit:GetRandomPlayer(0))
        pUnit:SendChatMessage(14, 0, "ONE THOUZAND YEARS BECAUSE OF HUMAN BEINGS!!")
   end



        if choice == 5 then
        pUnit:SendChatMessage(12, 0, "Your unlucky today")
        pUnit:CastSpellOnTarget(25, pUnit:GetMainTank())
        pUnit:SendChatMessage(14, 0, "Time for you to see my full power!")
   end



        if choice == 6 then
        pUnit:SendChatMessage(12, 0, "I have defeated Illidan on my own...")
        pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(0))
        pUnit:SendChatMessage(14, 0, "SO WHY SHOULD I LOSE TO YOU!?")
   end


        if choice == 7 then
        pUnit:SendChatMessage(12, 0, "I cant say that my fater were the best father in the world but...")
        pUnit:CastSpellOntarget(11632, pUnit:GetRandomPlayer(0))
        pUnit:SendChatMessage(14 0, "HE WERE MY FATHER,AND THATS WHY IM GOING TO AVENGE HIM!")
   end

        if choice == 8 then
      pUnit:SendChatMessage(12, 0, "I am the destroyer,the king over all kings and wizards...")
      pUnit:CastSpellOnTarget(17523, pUnit:GetMainTank())
      pUnit:SendChatMessage(14, 0, "I AM THE MAKER OF ALLIANCE AND HORDE...")
      pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(0))
      pUnit:SendChatMessage(14, 0, "AND YOU DARE CHALLENGE ME!?")
    end


        if choice == 9 then
      pUnit:SendChatMessage(12, 0, "The truth about god is...")
      pUnit:CastSpellOnTarget(17328, pUnit:GetClosestPlayer(0))
      pUnit:SendChatMessage(14, 0, "THERE IS NON OTHER THAN ME!")
    end


        if choice == 10 then
      pUnit:SendChatMessage(12, 0, "If you think im going to go easy on you just because im old then you are...")
      pUnit:CastSpellOnTarget(127523, pUnit:GetMainTank())
      pUnit:SendChatMessage(14, 0, "THEN YOUR DEADLY WRONG!")
      end
   end




function NPCNAME_Spell (pUnit, Event)
        pUnit:CastSpellOnTarget(11661, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("NPCNAME_CheckA", 20000, 10)
end



function NPCNAME_CheckA (pUnit, Event)
        if pUnit:GetHealthPct()  < 80 then
      pUnit:SendChatMessage (14, 0, "TIME FOR...REVENGE!")
      pUnit:SetScale(3)
      pUnit:CastSpellOnTarget(5, pUnit:GetMainTank())
   end
end


function NPCNAME_CheckB(pUnit, Event)
        if pUnit:GetHealthPct() < 50 then
      pUnit:SendChatMessage (14, 0, "YOU KILLED MY FATHER! LIKE IM GOING TO LET YOU GO!!")
      pUnit:SetModel(18238)
      pUnit:CastSpellOnTarget(5, pUnit:GetClosestPlayer(0))
      pUnit:CastSpellOnTarget(25, pUnit:GetRandomPlayer(0))
   end
end

function NPCNAME_CheckC(pUnit, Event)
        if pUnit:GetHealthPct() < 40 then
      pUnit:SendChatMessage (14, 0, "SO YOU THINK YOU GOT ME NOW!?")
      pUnit:CastSpell(48063)
      pUnit:CastSpell(48063)
   end
end


function NPCNAME_CheckD(pUnit, Event)
        if pUnit:GetHealthPct() < 25 then
      pUnit:SendChatMessage (12, 0, "Im going to avenge my father and master!")
      pUnit:SetModel(29832)
   end
end


function NPCNAME_CheckE(pUnit, Event)
        if pUnit:GetHealthPct() < 20 then
      pUnit:SendChatMessage(14, 0, "IM ANGRY NOW!")
      pUnit:SetModel(10832)
      pUnit:SetScale(5)
   end
end

function NPCNAME_Spell2(pUnit, Event)

    if pUnit:GetHealthPct() < 10 then
        choice = math.random(1, 2)
        if choice == 1 then
      pUnit:SendChatMessage(14, 0, "TIME FOR THE LIGHTNING TO STRIKE DOWN ON YOU!")
      pUnit:CastSpellOnTarget(16033, pUnit:GetRandomPlayer(0))
      pUnit:CastSpellOnTarget(20629, pUnit:GetMainTank())
      end
   
       if choice == 2 then
      pUnit:SendChatMessage(14, 0, "I CAN MANIPULATE BOTH LIGHT AND DARKNESS!")
      pUnit:CastSpellOnTarget(27174, pUnit:GetMainTank())
      pUnit:CastSpellOnTarget(17926, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(49222)
      pUnit:CastSpell(31662)
      end
   end
end


function NPCNAME_OnKilledTarget (pUnit, Event)
        pUnit:SendChatMessage(12, 0, "THAT WAS ONE!")
      pUnit:CastSpellOnTarget(5, pUnit:GetClosestPlayer(0))
      pUnit:SendChatMessage(14, 0, "WAH HA HA,THAT WAS TWO!")
end

function NPCNAME_OnLeaveCombat (pUnit, Event)
        pUnit:SendChatMessage(14, 0, "Im GOING TO FIND YOU WHEREVER YOU HIDE!")
      pUnit:RemoveEvents()
end


function NPCNAME_OnDied (pUnit, Event)
        pUnit:SendChatMessage(12, 0, "Thank you...for releasing me from my master's shadow")
      pUnit:SpawnCreature (82000, x, y, z, o, 1, 36000);
        pUnit:RemoveEvents()
end




RegisterUnitEvent(183729, 1, "NPCNAME_OnEnterCombat")
RegisterUnitEvent(183729, 2, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(183729, 3, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(183729, 4, "NPCNAME_OnDied")
Back to top Go down
View user profile
sharrior
GM
GM
avatar

Posts : 78
Join date : 2008-09-25
Age : 22
Location : Norway

PostSubject: Re: 2 lua bosses made by sharrior   Sat Jan 24, 2009 3:47 pm

Tell me what you think Very Happy
Back to top Go down
View user profile
sharrior
GM
GM
avatar

Posts : 78
Join date : 2008-09-25
Age : 22
Location : Norway

PostSubject: Re: 2 lua bosses made by sharrior   Tue Sep 15, 2009 3:10 pm

why no reply to this post? I want to know what you guys think about it!
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: 2 lua bosses made by sharrior   

Back to top Go down
 
2 lua bosses made by sharrior
Back to top 
Page 1 of 1
 Similar topics
-
» THIS IS THE BEST DRAWING I HAVE PROBABLY EVER MADE.
» Comic Related Statues and Busts
» Rare Marvel Universe Figures ?
» Steve Holt's Workshop Presents......
» Bayangkan klu model Yamaha macam ni??

Permissions in this forum:You cannot reply to topics in this forum
chaosnight :: Rednight server forums :: Coding-
Jump to: