chaosnight

Rednightwow Forums
 
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 sharrior boss script made by sharrior

Go down 
AuthorMessage
sharrior
GM
GM
avatar

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

PostSubject: sharrior boss script made by sharrior   Wed Jan 14, 2009 8:55 am

Code:
local spawnID = 123412

    local NPCNAME = Sharrior
   
       local SPAWNNAME = Sharrior
      
          local NPCID = 761298






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

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

function NPCNAME_Aoe (pUnit, Event)
        pUnit: FullCast (11661)
end


function NPCNAME_CheckA (pUnit, Event)
        if pUnit:GetHealthPct()  < 80 then
      pUnit:SendChatMessage (12, 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 (12, 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() < 1 then
      pUnit:SendChatMessage (12, 0, "NOOO NOT AGAIN! just kidding")
      pUnit:CastSpell(48063)
      pUnit:CastSpell(48063)
   end
end


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


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




function NPCNAME_Summon (pUnit, Event)
        x = pUnit:GetX();
      y = pUnit:GetY();
      z = pUnit:GetZ();
      o = pUnit:GetO();
      pUnit:SendChatMessage(12, 0, "Come forth mighty mc.Avery!")
      pUnit:SpawnCreature (82000, x, y, z, o, 1, 36000);
end


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


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


function NPCNAME_OnDied (pUnit, Event)
        pUnit:SendChatMessage(12, 0, "NOOO,I CANT DIE! I AM IMMORTAL")
        pUnit:RemoveEvents()
end

function NPCNAME_OnKilledTarget (pUnit, Event)
        pUnit:SendChatMessage(12, 0, "Wha ha ha,he just died")
      pUnit:CastSpellOnTarget(25, pUnit:GetClosestPlayer)
end

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

RegisterUnitEvent(123412, 1, "NPCNAME_OnCombat")
RegisterUnitEvent(123412, 2, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(123412, 3, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(123412, 4, "NPCNAME_OnDied")




What you think?`not bad for my first Lua script,but I dunno if it works Razz
Back to top Go down
View user profile
streetdeath
GM
GM
avatar

Posts : 23
Join date : 2008-10-02
Age : 26
Location : BOB (england):P

PostSubject: Re: sharrior boss script made by sharrior   Sat Jan 24, 2009 3:43 pm

nice good work better than i could ever do Razz hope it works


it is for a boss right?

which means if it is we can then use that as a template for other bosses???
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: sharrior boss script made by sharrior   Sat Jan 24, 2009 3:49 pm

yes you can,but that is just the basic stuff lol.
Back to top Go down
View user profile
Swanitalia
Admin
Admin
avatar

Posts : 161
Join date : 2008-09-22
Location : I dont know

PostSubject: Re: sharrior boss script made by sharrior   Sat Jan 24, 2009 8:07 pm

i have a script for your boss, but this is nice. I will try it out when i try my script out too

_________________




RIP Grandma
Back to top Go down
View user profile http://rednight.selfip.net
sharrior
GM
GM
avatar

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

PostSubject: Re: sharrior boss script made by sharrior   Sun Jan 25, 2009 8:55 am

;P thanks.
What do you think about the 2 other Lua boss scripts I made?
Back to top Go down
View user profile
Swanitalia
Admin
Admin
avatar

Posts : 161
Join date : 2008-09-22
Location : I dont know

PostSubject: Re: sharrior boss script made by sharrior   Tue Jan 27, 2009 9:25 am

they are good too

_________________




RIP Grandma
Back to top Go down
View user profile http://rednight.selfip.net
Sponsored content




PostSubject: Re: sharrior boss script made by sharrior   

Back to top Go down
 
sharrior boss script made by sharrior
Back to top 
Page 1 of 1

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