[Release]Custom Lua Boss (My First Lua) menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release]Custom Lua Boss (My First Lua)

    This is my first ever lua script. So here it goes. It is one boss but due to lack of understanding, I had to make it into three lua files. There are three major phases. This boss is spawned on GM Island in my server and so that is what all of the coordinates refer to. you may change them if you like. This NPC mainly has one unique thing to him. He teleports a random player in your group to another location where he will fight him alone and then teleports back later on.
    Here are the scripts enjoy:
    Code:
    function Satan_p1(pUnit, Event)
     if pUnit:GetHealthPct() < 90 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "You have seen death, and now you must feel it!")
      pUnit:FullCastSpell(59172, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(42926, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p2",1000, 0)
     end
    end
     
    function Satan_p2(pUnit, Event)
     if pUnit:GetHealthPct() < 80 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "The underworld will rise!")
      pUnit:FullCastSpell(59172, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p3",1000, 0)
     end
    end
     
    function Satan_p3(pUnit, Event)
     if pUnit:GetHealthPct() < 72 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Do you believe in heaven? Cause your in HELL!")
      pUnit:FullCastSpell(47857, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p4",1000, 0)
     end
    end
    
    function Satan_p4(pUnit, Event)
     if pUnit:GetHealthPct() < 60 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "I am the Prince of Darkness!")
      pUnit:FullCastSpell(54322, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(47857, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(47857, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(47857, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p5",1000, 0)
     end
    end
    
    function Satan_p5(pUnit, Event)
     if pUnit:GetHealthPct() < 50 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "I shall not be defeated!!")
      pUnit:FullCastSpell(48158, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p6",1000, 0)
     end
    end
    
    function Satan_p6(pUnit, Event)
     if pUnit:GetHealthPct() < 35 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "You will be made to serve me!")
      pUnit:FullCastSpell(38840)
      pUnit:CastSpell(48125, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(47857, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(48125, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p7",1000, 0)
     end
    end
    
    function Satan_p7(pUnit, Event)
     if pUnit:GetHealthPct() < 20 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Come forth Angels of Darkness")
          x = pUnit:GetX();
          y = pUnit:GetY();
          z = pUnit:GetZ();
          o = pUnit:GetO();
      pUnit:SpawnCreature(95436, x+5, y+5, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+4, y+4, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+3, y+3, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+2, y+2, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+1, y+1, z, o, 72, 60000)
      pUnit:CastSpell(47820, pUnit:GetRandomPlayer(0))
      pUnit:FullCastSpell(42859, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p8",1000, 0)
     end
    end
    
    function Satan_p8(pUnit, Event)
     if pUnit:GetHealthPct() < 7 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "It will take more than that to be rid of me!")
      pUnit:SetHealthPct(100)
      pUnit:RegisterEvent("Satan_p9",1000, 0)
     end
    end
    
    function Satan_p9(pUnit, Event)
     if pUnit:GetHealthPct() < 90 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "Are you so Ignorant? Do you not know who I am? I am the Dark Lord Himself. I am Satan!")
      pUnit:FullCastSpell(47825, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p10",1000, 0)
     end
    end
    
    function Satan_p10(pUnit, Event)
     if pUnit:GetHealthPct() < 60 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Come forth Angels of Darkness and aid me once again!")
          x = pUnit:GetX();
          y = pUnit:GetY();
          z = pUnit:GetZ();
          o = pUnit:GetO();
      pUnit:SpawnCreature(95436, x+5, y+5, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+4, y+4, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+3, y+3, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+2, y+2, z, o, 72, 60000)
      pUnit:SpawnCreature(95436, x+1, y+1, z, o, 72, 60000)
      pUnit:RegisterEvent("Satan_p11",1000, 0)
     end
    end
    
    
    function Satan_p11(pUnit, Event)
     if pUnit:GetHealthPct() < 30 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Bow before your master!")
      pUnit:CastSpell(47857, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(48125, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(47862, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(47843, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satan_p12",1000, 0)
     end
    end
    
    function Satan_p12(pUnit, Event)
     if pUnit:GetHealthPct() < 20 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Face me coward... In my domain!")
      pUnit:Despawn(1, 0)
      pUnit:SpawnCreature(95437, 16227, 16402, -64.38, 1.615564, 233, 0)
      local Target = pUnit:GetRandomPlayer(0)
      Target:Teleport(1, 16228, 16395, -64.37)
     end
    end
    
    function Satan_OnEnterCombat(pUnit, Event)
      pUnit:RegisterEvent("Satan_p1",1000, 0)
      pUnit:SendChatMessage (12, 0, "You stand before the power of Hell and all of its glory!")
     end
    
    function Satan_OnLeaveCombat(pUnit, Event)
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "I am the force to reckon with. You were no match for me!")
     end
    
    RegisterUnitEvent(95435, 1, "Satan_OnEnterCombat")
    RegisterUnitEvent(95435, 2, "Satan_OnLeaveCombat")
    Part 2:
    Code:
    function Satantwo_p1(pUnit, Event)
      pUnit:SetHealthPct(20)
      pUnit:RemoveEvents();
      pUnit:RegisterEvent("Satantwo_p2", 1000, 0)
    end
    
    function Satantwo_p2(pUnit, Event)
    if pUnit:GetHealthPct() < 15 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "You should have listened. No matter, you shall perish!")
      pUnit:SetScale(2)
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satantwo_p3", 1000, 0)
     end
    end
    
    function Satantwo_p3(pUnit, Event)
     if pUnit:GetHealthPct() < 10 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "My domain is no more...")
      pUnit:Despawn(1, 0)
      pUnit:SpawnCreature(95438, 16229.85, 16295.993, 30.777, 2, 233, 0)
      local Target = pUnit:GetRandomPlayer(0)
      Target:Teleport(1, 16227.9, 16300, 30.1)
     end
    end
    
    function Satantwo_OnEnterCombat(pUnit, Event)
      pUnit:RegisterEvent("Satantwo_p1",1000, 0)
      pUnit:SendChatMessage (12, 0, "What is it you desire?")
     end
    
    
    function Satantwo_OnLeaveCombat(pUnit, Event)
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "You were no match in my Domain")
     end
    
    RegisterUnitEvent(95437, 1, "Satantwo_OnEnterCombat")
    RegisterUnitEvent(95437, 2, "Satantwo_OnLeaveCombat")
    part 3:
    Code:
    function Satanthree_p1(pUnit, Event)
      pUnit:SetHealthPct(10)
      pUnit:RemoveEvents();
      pUnit:RegisterEvent("Satanthree_p2", 1000, 0)
    end
    
    function Satanthree_p2(pUnit, Event)
    if pUnit:GetHealthPct() < 5 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "You should have listened. No matter, you shall perish!")
      pUnit:SetScale(2)
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:CastSpell(5, pUnit:GetRandomPlayer(0))
      pUnit:RegisterEvent("Satanthree_p3", 1000, 0)
     end
    end
    
    function Satanthree_p3(pUnit, Event)
    if pUnit:GetHealthPct() < 1 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "You have not seen the last of me!")
      pUnit:FullCastSpell(50438)
      pUnitR:RegeisterEvent("Satanthree_Died", 1000, 0)
     end
    end
    
    function Satanthree_OnEnterCombat(pUnit, Event)
      pUnit:RegisterEvent("Satanthree_p1",1000, 0)
      pUnit:SendChatMessage (12, 0, "My energy where has it gone?")
     end
    
    function Satanthree_OnLeaveCombat(pUnit, Event)
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Is this that all you have?")
     end
    
    function Satanthree_Died(pUnit, Event)
      pUnit:SendChatMessage (12, 0, "It was not supposed to be this way....")
      pUnit:RemoveEvents();
     end
    
    RegisterUnitEvent(95438, 1, "Satanthree_OnEnterCombat")
    RegisterUnitEvent(95438, 2, "Satanthree_OnLeaveCombat")
    RegisterUnitEvent(95438, 4, "Satanthree_Died")
    and lastly here is a link for you to download if you don't like copying and pasting:
    DOWNLOAD NOW!
    credits go to
    zaeran ( for I was looking at his scripts when I made these)
    SeactorSeven (I followed his guides)
    HalestormXV(of Arcemu for helping me with the teleports)
    ME (I scripted it ~YAY~)

    Edit: the password is "y2kss66"
    Last edited by y2kss66; 12-11-2008 at 09:37 PM. Reason: added the password(OOPS!)

    [Release]Custom Lua Boss (My First Lua)
  2. #2
    bsod-staff14's Avatar Member
    Reputation
    35
    Join Date
    Nov 2008
    Posts
    443
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I first met ya you was a noob you improved
    Immortal GamerZ Under Development!

  3. #3
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OMFG, this is a very good script for a starter.
    If you continue like this, you'll become pro in no-time =)
    +Rep

  4. #4
    Hermess's Avatar Member
    Reputation
    12
    Join Date
    Sep 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice for a learner+rep

  5. #5
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks everyone I am going to continue to script and hope for the best.
    edit: anyone else got any ideas for me to script?

    What does do the rest of you people think about this script?

  6. #6
    gangstagreen's Avatar Member
    Reputation
    31
    Join Date
    Sep 2008
    Posts
    426
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tight work, my friend, Tight work
    Project Eve of Imagination - Open-ended WoW RP, I need all the help I can get. PM ME!

  7. #7
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks it only took me 5 days to work all of the bugs also.

  8. #8
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very EPIC! 2x+Rep
    1x +Rep from good english ^^
    1x +Rep from good work

  9. #9
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Indeed this is good for a starter, although I would of put it all into one big script to save space etc :P Like the idea of teleporting them and you put all the credits honoustly. +Rep
    Edit: 24/cd. Remind me to do it later

  10. #10
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for all of the comments and Stoneharry the reason I didn't put them into one script was because I could not get the npc to start at a certain heath percentage with only one npc and script. but thanks for the positive feedback. Oh and Apple's_Ascent, grammar is one of my pet peeves. so that is why I use good English.

  11. #11
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a really good script for a starter +Rep

  12. #12
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    x Elite x I did not get your +Rep point.

    Thanks x Elite x
    Last edited by y2kss66; 12-14-2008 at 12:22 PM.

  13. #13
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here you go, I forgot. Somthing popped up. +rep

  14. #14
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bumpz!! What do you guys think!

  15. #15
    svedin's Avatar Contributor
    Reputation
    124
    Join Date
    Jun 2008
    Posts
    557
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice script ^^

    +Rep to you

    //Svedin

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] Custom LUA Instance
    By Spartansp in forum World of Warcraft Emulator Servers
    Replies: 49
    Last Post: 05-12-2023, 02:55 AM
  2. [Release] Custom Scripted Boss Fight: Your Mom
    By dude891 in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 04-13-2008, 08:08 PM
  3. [Release] The Soulstealer, Custom .LUA Boss.
    By Ebon in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-10-2008, 11:45 AM
  4. [Release] The Soulstealer, Custom .LUA Boss.
    By Ebon in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-10-2008, 08:12 AM
  5. [Release/Info] Custom LUA Bosses!
    By Gastricpenguin in forum World of Warcraft Emulator Servers
    Replies: 38
    Last Post: 02-08-2008, 12:14 PM
All times are GMT -5. The time now is 12:56 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search