[Release] Ramdom Lua boss menu

User Tag List

Results 1 to 8 of 8
  1. #1
    Zaeran's Avatar Active Member
    Reputation
    16
    Join Date
    Dec 2008
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Ramdom Lua boss

    Yeah, First lua script so =\ I've had basic understanding of lua for a while but this is the first time I've actualy ever tried to code something myself. It's had a couple of people bug check so theres hopefully going to be no bugs but =| its code.
    Code:
    function AllyPally_p1(pUnit, Event)
     if pUnit:GetHealthPct() < 90 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Feel the bite of my blade horde scum!!")
      pUnit:FullCastSpell(10308)
      pUnit:CastSpell(36479)
      pUnit:RegisterEvent("AllyPally_p2",1000, 0)
     end
    end
     
    function AllyPally_p2(pUnit, Event)
     if pUnit:GetHealthPct() < 80 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "For the Alliance!")
      pUnit:FullCastSpell(10308)
      pUnit:RegisterEvent("AllyPally_p3",1000, 0)
     end
    end
     
    function AllyPally_p3(pUnit, Event)
     if pUnit:GetHealthPct() < 72 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Fools you cannot defeat me I fight for the Alliance!")
      pUnit:FullCastSpell(21152)
      pUnit:RegisterEvent("AllyPally_p4",1000, 0)
     end
    end
    
    function AllyPally_p4(pUnit, Event)
     if pUnit:GetHealthPct() < 60 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Nothing may harm me! LIGHT GIVE ME STRENGTH")
      pUnit:FullCastSpell(54322)
      pUnit:CastSpell(48782)
      pUnit:CastSpell(48782)
      pUnit:CastSpell(48782)
      pUnit:PlaySoundToSet(5833)
      pUnit:RegisterEvent("AllyPally_p5",1000, 0)
     end
    end
    
    function AllyPally_p5(pUnit, Event)
     if pUnit:GetHealthPct() < 50 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "I shall not be defeated!!")
      punit:SpawnCreature(ID, x, y, z, o, 72, 120000)
      pUnit:FullCastSpell(36479)
      pUnit:RegisterEvent("AllyPally_p6",1000, 0)
     end
    end
    
    function AllyPally_p6(pUnit, Event)
     if pUnit:GetHealthPct() < 35 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "I fear no evil! For I am fear incarnate!")
      pUnit:FullCastSpell(38840)
      pUnit:CastSpell(48819)
      pUnit:CastSpell(21152)
      pUnit:CastSpell(48819)
      pUnit:Castspell(21152)
      pUnit:RegisterEvent("AllyPally_p7",1000, 0)
     end
    end
    
    function AllyPally_p7(pUnit, Event)
     if pUnit:GetHealthPct() < 20 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "To me my brothers!")
         x=GetX();
         y=GetY();
         z=GetZ();
         o=GetO();
      punit:SpawnCreature(ID, x+5, y+5, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+4, y+4, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+3, y+3, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+2, y+2, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+1, y+1, z, o, 72, 120000)
      punit:CastSpell(21152)
      pUnit:FullCastSpell(30852)
      pUnit:RegisterEvent("AllyPally_p8",1000, 0)
     end
    end
    
    function AllyPally_p8(pUnit, Event)
     if pUnit:GetHealthPct() < 7 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "I will not die!")
      pUnit:FullCastSpell(17683)
      pUnit:RegisterEvent("AllyPally_p9",1000, 0)
     end
    end
    
    function AllyPally_p9(pUnit, Event)
     if pUnit:GetHealthPct() < 90 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "You fools refuse to die!")
      pUnit:FullCastSpell(38921)
      pUnit:RegisterEvent("AllyPally_p10",1000, 0)
     end
    end
    
    function AllyPally_p10(pUnit, Event)
     if pUnit:GetHealthPct() < 60 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "To me my brothers!")
         x=GetX();
         y=GetY();
         z=GetZ();
         o=GetO();
      punit:SpawnCreature(ID, x+5, y+5, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+4, y+4, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+3, y+3, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+2, y+2, z, o, 72, 120000)
      punit:SpawnCreature(ID, x+1, y+1, z, o, 72, 120000)
      pUnit:RegisterEvent("AllyPally_p11",1000, 0)
     end
    end
    
    
    function AllyPally_p11(pUnit, Event)
     if pUnit:GetHealthPct() < 30 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Get away from me fools!")
      pUnit:CastSpell(21152)
      pUnit:CastSpell(48819)
      pUnit:CastSpell(32779)
      pUnit:CastSpell(24199)
      pUnit:RegisterEvent("AllyPally_p12",1000, 0)
     end
    end
    
    
    function AllyPally_p12(pUnit, Event)
     if pUnit:GetHealthPct() < 10 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Run from me!")
      pUnit:FullCastSpell(5246)
     end
    end
    
    function AllyPally_start(pUnit, Event)
     pUnit:RegisterEvent("AllyPally_p1",1000, 0)
     pUnit:SendChatMessage (12, 0, "Come! Face your doom!")
     end
    end
    
    Function AllyPally_Leave(pUnit, Event)
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Hah! Not even a challenge!)
     end
    end
    
    Function AllyPally_Death(pUnit, Event)
      pUnit:PlaySoundToSet(11803)
      pUnit:SendChatMessage (12, 0, How..? How can this be?)
      pUnit:RemoveEvents();
    end
    
    RegisterUnitEvent(Insert spawn ID here, 1, "AllyPally_start")
    RegisterUnitEvent(Insert spawn ID here, 2, "AllyPally_Leave")
    RegisterUnitEvent(Insert spawn ID here, 4, "AllyPally_Death")
    As I said, Its my first script so dont winge that its terrible or is very buggy. Feedback however positive or negative is appreciated.

    [Release] Ramdom Lua boss
  2. #2
    Nymphx's Avatar Active Member
    Reputation
    83
    Join Date
    Sep 2008
    Posts
    212
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks good, quite nice for a first script.

    Issues:

    • The script is very messy. . Not a programming issue, just a visual one.
    • The 'ID' should be changed to something like 'MINIONID' or 'SPAWNID' to avoid confusion.




    +Rep! Well done.



    I'm in the middle of patching so I can't bugcheck this.
    Last edited by Nymphx; 12-02-2008 at 04:03 PM.

  3. #3
    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)
    Your actually wrong Nymphx =P
    If you look carefull the mob casts hands of light or something bringing him back up to full hp, but because he's removed events it's then alright to do another < 90 which means it will work fine

  4. #4
    Zaeran's Avatar Active Member
    Reputation
    16
    Join Date
    Dec 2008
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    Your actually wrong Nymphx =P
    If you look carefull the mob casts hands of light or something bringing him back up to full hp, but because he's removed events it's then alright to do another < 90 which means it will work fine
    Yeah, he bubbles and heals with holy light a few times but when he shouts "I will not die" he casts a full hp heal.

  5. #5
    VictoRo's Avatar Contributor
    Reputation
    81
    Join Date
    Feb 2008
    Posts
    219
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very nicely done for a first try zaeran, +rep mate (:

  6. #6
    bobby555's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice script. I'm gonna give it a try.

  7. #7
    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)
    Really nice, you are making some progress +Rep from FrostTeam

    EDIT: DAMN, need to spread , Sorry

  8. #8
    Zaeran's Avatar Active Member
    Reputation
    16
    Join Date
    Dec 2008
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Edude View Post
    Really nice, you are making some progress +Rep from FrostTeam

    EDIT: DAMN, need to spread , Sorry
    You managed to comment on my second script then comment on my first one after and say i was making progress :P

Similar Threads

  1. [Release]Custom Lua Boss (My First Lua)
    By y2kss66 in forum WoW EMU General Releases
    Replies: 17
    Last Post: 02-23-2009, 06:03 PM
  2. [Just Another Small Release] Second LUA Boss I made :)
    By The_Zealot in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 03-01-2008, 09:59 PM
  3. [Release] First LUA boss
    By Spartansp in forum World of Warcraft Emulator Servers
    Replies: 37
    Last Post: 02-25-2008, 08:27 PM
  4. [Release/Info] Custom LUA Bosses!
    By Gastricpenguin in forum World of Warcraft Emulator Servers
    Replies: 38
    Last Post: 02-08-2008, 12:14 PM
  5. [Release] Sargeras .LUA Boss
    By Ebon in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-27-2008, 05:04 PM
All times are GMT -5. The time now is 06:16 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