[RELEASE] Yet another Lua script menu

User Tag List

Results 1 to 9 of 9
  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] Yet another Lua script

    Hi again everyone - Its me again with another of my starting scripts
    knocked this one together earlier during school hours when i have 3 hours of computing lessons - of course i did some REAL work for a bit now and then so it wasnt solid coding.
    Here it is for you :
    Code:
    Boss - Ghost of Past.
    
    Description
    
    
    
    
    
    
    -----------------[Phase 1]-------------------------------------------------------------------------------
    
    
    
    function GhostofPast_p1(pUnit, Event)
     if pUnit:GetHealthPct() < 90 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Daring to attack me is not a mistake you will make again!")
      pUnit:FullCastSpell(42931)
      pUnit:RegisterEvent("GhostofPast_p2",1000, 0)
     end
     end
    
    -----------------[Phase 2]-------------------------------------------------------------------------------
    
    function GhostofPast_p2(pUnit, Event)
     if pUnit:GetHealthPct() < 88 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Embrace the cold")
      pUnit:GetRandomPlayer(7)
      pUnit:CastSpell(38089)
      pUnit:CastSpell(42842)
      pUnit:GetRamdomPlayer(7)
      pUnit:CastSpell(38089)
      pUnit:CastSpell(42842)
      pUnit:GetRamdomPlayer(7)
      pUnit:CastSpell(38089)
      pUnit:CastSpell(42842)
      pUnit:GetRamdomPlayer(7)
      pUnit:GetMainTank()
      pUnit:CastSpell(38089)
      pUnit:Castspell(42842)
      pUnit:RegisterEvent("GhostofPast_p3",1000, 0)
     end
     end
    
    -----------------[Phase 3]-------------------------------------------------------------------------------
    
    function GhostofPast_p3(pUnit, Event)
     if pUnit:GetHealthPct() < 85 then
      pUnit:RemoveEvents();
      pUnit:GetRandomPlayer(7)
      pUnit:CastSpell(38089)
      pUnit:CastSpell(42842)
      pUnit:GetRamdomPlayer(7)
      pUnit:CastSpell(38089)
      pUnit:CastSpell(42842)
      pUnit:GetMainTank()
      pUnit:CastSpell(42931)
      pUnit:CastSpell(42914)
      pUnit:RegisterEvent("GhostofPast_p4",1000, 0)
     end
    end
    
    -----------------[Phase 4]-------------------------------------------------------------------------------
    
    function GhostofPast_p4(pUnit, Event)
     if pUnit:GetHealthPct() < 81 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12,  0, "Feel the cold - Feel it burn!")
      pUnit:GetRandomPlayer(7)
      pUnit:CastSpell(47610)
      pUnit:GetRandomPlayer(7)
      pUnit:CastSpell(47610)
      pUnit:GetRandomPlayer(7)
      pUnit:CastSpell(47610)
      pUnit:GetRandomPlayer(7)
      pUnit:CastSpell(47610)
      pUnit:GetRandomPlayer(7)
      pUnit:CastSpell(47610)
      pUnit:GetMainTank()
      pUnit:CastSpell(47610)
      pUnit:RegisterEvent("GhostofPast_p5",1000, 0)
     end
    end
    
    -----------------[Phase 5]-------------------------------------------------------------------------------
    
    function GhostofPast_p5(pUnit, Event)
     if pUnit:GetHealthPct() < 79 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "DIE FOOLS!")
      pUnit:FullCastSpell(8398)
      pUnit:RegisterEvent("GhostofPast_p6",1000, 0)
     end
    end
    
    -----------------[Phase 6]-------------------------------------------------------------------------------
    
    function GhostofPast_p6(pUnit, Event)
     if pUnit:GetHealthPct() < 77 then
      pUnit:RemoveEvents();
      pUnit:FullCastSpell(8398)
      pUnit:RegisterEvent("GhostofPast_p7",1000, 0)
     end
    end
    
    -----------------[Phase 7]-------------------------------------------------------------------------------
    
    function GhostofPast_p7(pUnit, Event)
     if pUnit:GetHealthPct() < 75 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "You shall be defeated! I will be triumphant!")
      pUnit:FullCastSpell(8398)
      pUnit:RegisterEvent("GhostofPast_p8",1000, 0)
     end
    end
    
    -----------------[Phase 8]-------------------------------------------------------------------------------
    
    function GhostofPast_p8(pUnit, Event)
     if pUnit:GetHealthPct() < 73 then
      pUnit:RemoveEvents();
      pUnit:CastSpell(42931)
      pUnit:RegisterEvent("GhostofPast_p9",1000, 0)
     end
    end
    
    -----------------[Phase 9]-------------------------------------------------------------------------------
    
    function GhostofPast_p9(pUnit, Event)
     if pUnit:GetHealthPct() < 72 then
      pUnit:RemoveEvents();
      pUnit:CastSpell(42917)
      pUnit:CastSpell(42931)
      pUnit:FullCastSpell(42842)
      pUnit:RegisterEvent("GhostofPast_p10",1000, 0)
     end
    end
    
    -----------------[Phase 10]-------------------------------------------------------------------------------
    
    function GhostofPast_p10(pUnit, Event)
     if pUnit:GetHealthPct() < 70 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "I see. Your spells keep you alive - Not for long!")
      pUnit:FullCastSpell(32375)
      pUnit:RegisterEvent("GhostofPast_p11",1000, 0)
     end
    end
    
    
    -----------------[Phase 11]-------------------------------------------------------------------------------
    
    
    function GhostofPast_p11(pUnit, Event)
     if pUnit:GetHealthPct() < 60 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "Be quiet! BE QUIET!")
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:RegisterEvent("GhostofPast_p12",1000, 0)
     end
    end
    
    
    -----------------[Phase 12]-------------------------------------------------------------------------------
    
    function GhostofPast_p12(pUnit, Event)
     if pUnit:GetHealthPct() < 50 then
      pUnit:RemoveEvents();
      pUnit:FullCastSpell(8398)
      pUnit:RegisterEvent("GhostofPast_p13",1000, 0)
     end
    end
    
    -----------------[Phase 13]-------------------------------------------------------------------------------
    
    function GhostofPast_p13(pUnit, Event)
     if pUnit:GetHealthPct() < 45 then
      pUnit:RemoveEvents();
      pUnit:FullCastSpell(8398)
      pUnit:RegisterEvent("GhostoffPast_p14",1000, 0)
     end
    end
    
    
    -----------------[Phase 14]-------------------------------------------------------------------------------
    
    
    function GhostofPast_p14(pUnit, Event)
     if pUnit:GetHealthPct() < 40 then
      pUnit:RemoveEvents();
      pUnit:FullCastSpell(8398)
      pUnit:RegisterEvent("GhostoffPast_p15",1000, 0)
     end
    end 
    
    
    -----------------[Phase 15]-------------------------------------------------------------------------------
    
    function GhostofPast_p15(pUnit, Event)
     if pUnit:GetHealthPct() < 38 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "Be quiet! BE QUIET!")
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetRamdomPlayer(4)
      pUnit:FullCastSpell(2139)
      pUnit:GetMainTank()
      pUnit:CastSpell(49236)
      pUnit:FullCastSpell(32375)
      pUnit:RegisterEvent("GhostofPast_p16",1000, 0)
     end
    end
    
    -----------------[Phase 16]-------------------------------------------------------------------------------
    
    function GhostofPast_p16(pUnit, Event)
     if pUnit:GetHealthPct() < 32 then
       pUnit:RemoveEvents();
       pUnit:SendChatMessage(12, 0, "Be gone you fool!")
       pUnit:GetMainTank()
       pUnit:FullCastSpell(24199)
       pUnit:RegisterEvent(GhostofPast_p17,1000, 0)
     end
    end
    
    -----------------[Phase 17]-------------------------------------------------------------------------------
     
    function GhostofPast_p17(pUnit, Event)
     if pUnit:GetHealthPct() < 25 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "To me my brethren, I'm in need of Aid!"
         x=GetX();
         y=GetY();
         z=GetZ();
         o=GetO();
      pUnit:SpawnCreature(CreatureID, x+5, y+10, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 120000) - Need to be murlocs or you have to remove the play sound to set
      pUnit:PlaySoundToSet(11802)
      pUnit:RegisterEvent(GhostofPast_p18,1000, 0)
     end
    end
    
    -----------------[Phase 18]-------------------------------------------------------------------------------
    
    function GhostofPast_p18(pUnit, Event)
     if pUnit:GetHealthPct() < 18 then
       pUnit:RemoveEvents();
       pUnit:CastSpell(42931)
       pUnit:CastSpell(42917)
       pUnit:FullCastSpell(8398)
       pUnit:RegisterEvent(GhostofPast_p19,1000, 0)
     end
    end
    
    -----------------[Phase 19]-------------------------------------------------------------------------------
    
    function GhostofPast_p19(pUnit, Event)
     if pUnit:GetHealthPct() < 10 then 
       Punit:Removeevents();
       pUnit:SendChatMessage(12, 0, "My end is near... But so is yours!")
       pUnit:CastSpell(8398)
       pUnit:RegisterEvent(GhostofPast_p20,1000, 0)
     end
    end
    
    -----------------[Phase 2]-------------------------------------------------------------------------------
    
    function Ghostofpast_p20(pUnit, Event)
     if pUnit:GetHealthPct() < 17 then
      pUnit:Castspell(8398)
      pUnit:RegisterEvent(GhostofPast_p21,1000, 0)
     end
    end 
    
    -----------------[Phase 21]-------------------------------------------------------------------------------
    
    function GhostofPast_p21(pUnit, Event)
     if pUnit:GetHealthPct() < 16 then
      pUnit:RemoveEvents();
      pUnit:CastSpell(8398)
      pUnit:CastSpell(8398)
      pUnit:RegisterEvent(GhostofPast_p22,1000, 0)
     end
    end
    
    -----------------[Phase 22]-------------------------------------------------------------------------------
    
    function GhostofPast_p22(pUnit, Event)
     if pUnit:GetHealthPct() < 8 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "You shall fall before I do - I will see to that"
         x=GetX();
         y=GetY();
         z=GetZ();
         o=GetO();
      pUnit:SpawnCreature(CreatureID, x+5, y+10, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 120000)
      pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 120000) - Need to be murlocs or you have to remove the play sound to set
      pUnit:PlaySoundToSet(11802)
      pUnit:CastSpell(8398)
      pUnit:Castspell(8398)
     end
    end
    
    function GhostofPast_start(pUnit, Event)
     pUnit:RegisterEvent("GhostofPast_p1",1000, 0)
     pUnit:SendChatMessage (12, 0, "Your life ends now!")
     end
    end
    
    Function GhostofPast_Leave(pUnit, Event)
      pUnit:RemoveEvents();
      pUnit:SendChatMessage (12, 0, "Fools! You thought to challenge me?")
     end
    end
    
    Function GhostofPast_Death(pUnit, Event)
      pUnit:PlaySoundToSet(11803)
      pUnit:SendChatMessage (12, 0, "You have far from won mortals")
      pUnit:RemoveEvents();
    end
    
    RegisterUnitEvent(Spawn ID, 1, "GhostofPast_start")
    RegisterUnitEvent(Spawn ID, 2, "GhostofPast_Leave")
    RegisterUnitEvent(Spawn ID, 4, "GhostofPast_Death")
    As before all feedback appreciated - And please point out any bugs.
    Last edited by Zaeran; 12-03-2008 at 11:53 AM.

    [RELEASE] Yet another Lua script
  2. #2
    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)
    Nice man, +Rep you. Its a big script for a starter. If I could give 2points of Rep, I would :P

    Good work keep going :P

  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)
    Code:
    pUnit:GetRamdomPlayer(4)
    It's a bit messy like this and it looks more proffesional if you do it the other way.
    Should be:

    Code:
    pUnit:CastSpellOnTarget(spellid, pUnit:GetRandomPlayer(4))
    or full cast.
    Last edited by stoneharry; 12-03-2008 at 12:13 PM.

  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)
    Well, I'm only a starter :P and the guide made by runiker says that pUnit:GetRamdomPlayer(4)
    Will cause it to target a ramdom player that has mana

  5. #5
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    +rep x2 nub


  6. #6
    dod's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very nice + rep

    could u posibly make a whole instance

    elite instance
    20-30 man

  7. #7
    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 dod View Post
    very nice + rep

    could u posibly make a whole instance

    elite instance
    20-30 man
    I could quite possibly do that....
    Contact me on msn - [email protected]
    to go into further detail.

  8. #8
    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)
    Looks pretty cool, i'm gonna try this tonight

  9. #9
    Kabukiblood's Avatar Member
    Reputation
    18
    Join Date
    Oct 2008
    Posts
    38
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do I spawn this?

Similar Threads

  1. [Release] Yet Another WoW Radar
    By run32.dll in forum World of Warcraft Bots and Programs
    Replies: 32
    Last Post: 12-04-2008, 11:13 PM
  2. [Release]Shamankings/Pedregons Lua Scripts
    By Pedregon in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 06-15-2008, 11:56 AM
  3. [Guide] Another LUA Scripting Guide
    By Bapes in forum WoW EMU Guides & Tutorials
    Replies: 13
    Last Post: 05-08-2008, 05:01 PM
  4. [Release] Dragon boss lua script
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 04-18-2008, 07:56 PM
  5. [Release] A few lua scripts
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 03-31-2008, 08:27 PM
All times are GMT -5. The time now is 09:27 AM. 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