help with lua script menu

Shout-Out

User Tag List

Results 1 to 12 of 12
  1. #1
    mi_ninja's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help with lua script

    ok im trying to figure out y the boss will not target the proper targets. i want him to target the main tank for one spell and reandom player for other and the last i want to figure out how to make him target a random healer or main hearler if possible.

    function Malchezzar_FastDrain(pUnit)
    pUnit:FullCastSpellOnTarget(34036,punit:GetMainTank())
    end

    function Malchezzar_AirBurst(pUnit)
    pUnit:FullCastSpell(32014)
    end

    function Malchezzar_Drain(pUnit)
    pUnit:CastSpellOnTarget(34036,pUnit:GetRandomPlayer(4))
    end

    function Malchezzar_OnCombat(pUnit)
    pUnit:RegisterEvent("Malchezzar_Drain",45000,0)
    pUnit:RegisterEvent("Malchezzar_Phase1",1000,0)
    end

    RegisterUnitEvent (600099,1,"Malchezzar_OnCombat")
    RegisterUnitEvent (600099,2,"Malchezzar_onLeaveCombat")
    RegisterUnitEvent (600099,4,"Malchezzar_OnDeath")







    function Malchezzar_Phase1(pUnit)
    if pUnit:GetHealthPct() < 45 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I think its time you met some of my friends!")
    x = pUnit:GetX();
    y = pUnit:GetY();
    z = pUnit:GetZ();
    o = pUnit:GetO();
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:RegisterEvent("Malchezzar_Phase2",1000,0)
    pUnit:RegisterEvent("Malchezzar_Drain",15000,0)
    end
    end

    function Malchezzar_Phase2(pUnit)
    if pUnit:GetHealthPct() < 20 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I will not be killed by these mortals!")
    pUnit:SetScale(4);
    pUnit:CastSpell(18173)
    pUnit:RegisterEvent("Malchezzar_FastDrain",2000,0)
    pUnit:RegisterEvent("Malchezzar_AirBurst",90000,0)
    end
    end

    function Malchezzar_OnLeaveCombat(pUnit,Event)
    pUnit:RemoveEvents()
    end

    function Malchezzar_OnDeath(pUnit,Event)
    pUnit:SendChatMessage(12,0,"I will not die...alone.")
    pUnit:CastSpell(38973)
    pUnit:RemoveEvents()
    end
    Last edited by mi_ninja; 06-04-2008 at 08:36 PM.

  2. #2
    Bapesy's Avatar Banned
    Reputation
    35
    Join Date
    May 2008
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please put the script in a Code.

    Bapes

  3. #3
    mi_ninja's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    code:

    function Malchezzar_FastDrain(pUnit)
    pUnit:FullCastSpellOnTarget(34036,punit:GetMainTank())
    end

    function Malchezzar_AirBurst(pUnit)
    pUnit:FullCastSpell(32014)
    end

    function Malchezzar_Drain(pUnit)
    pUnit:CastSpellOnTarget(34036,pUnit:GetRandomPlayer(4))
    end

    function Malchezzar_OnCombat(pUnit)
    pUnit:RegisterEvent("Malchezzar_Drain",45000,0)
    pUnit:RegisterEvent("Malchezzar_Phase1",1000,0)
    end

    RegisterUnitEvent (600099,1,"Malchezzar_OnCombat")
    RegisterUnitEvent (600099,2,"Malchezzar_onLeaveCombat")
    RegisterUnitEvent (600099,4,"Malchezzar_OnDeath")







    function Malchezzar_Phase1(pUnit)
    if pUnit:GetHealthPct() < 45 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I think its time you met some of my friends!")
    x = pUnit:GetX();
    y = pUnit:GetY();
    z = pUnit:GetZ();
    o = pUnit:GetO();
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:RegisterEvent("Malchezzar_Phase2",1000,0)
    pUnit:RegisterEvent("Malchezzar_Drain",15000,0)
    end
    end

    function Malchezzar_Phase2(pUnit)
    if pUnit:GetHealthPct() < 20 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I will not be killed by these mortals!")
    pUnit:SetScale(4);
    pUnit:CastSpell(18173)
    pUnit:RegisterEvent("Malchezzar_FastDrain",2000,0)
    pUnit:RegisterEvent("Malchezzar_AirBurst",90000,0)
    end
    end

    function Malchezzar_OnLeaveCombat(pUnit,Event)
    pUnit:RemoveEvents()
    end

    function Malchezzar_OnDeath(pUnit,Event)
    pUnit:SendChatMessage(12,0,"I will not die...alone.")
    pUnit:CastSpell(38973)
    pUnit:RemoveEvents()
    end

  4. #4
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I hate myself for this but I forgot some of the flags and I'm guessing that the GetRandomPlayer(4)) is the one where he targets someone with mana. And you need to know why these commands aren't working on the right targets? Well, do you have the right targets around for this and is he casting it on himself or on the wrong targets?

  5. #5
    mi_ninja's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    he is casting them on him self and like the air blast when he casts it he targets himself and sends him self off in the air. and yea i was testing with gm gear with a pally and just hitting him so that he lost 5% that way i could test each phase. then i had a group come in and try it out. the only thing he targets is him self for all casts.

  6. #6
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try that for that part of the code and hopefully he wont cast it on himself. If you get and error its because I did this to fast.


    Code:
    function Malchezzar_FastDrain(pUnit)
    local plr = pUnit:GetMainTank())
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(34036,punit:GetMainTank())
    end
    end
    
    function Malchezzar_AirBurst(pUnit)
    local plr = pUnit:GetRandomPlayer(0))
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(32014, pUnit:GetRandomPlayer(0))
    end
    end
    
    function Malchezzar_Drain(pUnit)
    local plr = pUnit:GetRandomPlayer(4))
    if (plr ~= nil) then
    pUnit:CastSpellOnTarget(34036,pUnit:GetRandomPlayer(4))
    end
    end

  7. #7
    mi_ninja's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now i get a lua error 2: unexpected symbol near '>'

    function Malchezzar_FastDrain(pUnit)
    local plr = punit:GetMainTank())
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(34036,punit:GetMainTank())
    end
    end

    function Malchezzar_AirBurst(pUnit)
    local plr = pUnit:GetRandomPlayer(0))
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(32014, pUnit:GetRandomPlayer(0))
    end
    end

    function Malchezzar_Drain(pUnit)
    local plr = pUnit:GetRandomPlayer(4))
    if (plr ~= nil) then
    pUnit:CastSpellOnTarget(34036,pUnit:GetRandomPlayer(4))
    end
    end

    function Malchezzar_OnCombat(pUnit)
    pUnit:RegisterEvent("Malchezzar_Drain",45000,0)
    pUnit:RegisterEvent("Malchezzar_Phase1",1000,0)
    end

    RegisterUnitEvent (600099,1,"Malchezzar_OnCombat")
    RegisterUnitEvent (600099,2,"Malchezzar_onLeaveCombat")
    RegisterUnitEvent (600099,4,"Malchezzar_OnDeath")







    function Malchezzar_Phase1(pUnit)
    if pUnit:GetHealthPct() < 45 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I think its time you met some of my friends!")
    x = pUnit:GetX();
    y = pUnit:GetY();
    z = pUnit:GetZ();
    o = pUnit:GetO();
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:RegisterEvent("Malchezzar_Phase2",1000,0)
    pUnit:RegisterEvent("Malchezzar_Drain",15000,0)
    end
    end

    function Malchezzar_Phase2(pUnit)
    if pUnit:GetHealthPct() < 20 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I will not be killed by these mortals!")
    pUnit:SetScale(4);
    pUnit:CastSpell(18173)
    pUnit:RegisterEvent("Malchezzar_FastDrain",2000,0)
    pUnit:RegisterEvent("Malchezzar_AirBurst",90000,0)
    end
    end

    function Malchezzar_OnLeaveCombat(pUnit,Event)
    pUnit:RemoveEvents()
    end

    function Malchezzar_OnDeath(pUnit,Event)
    pUnit:SendChatMessage(12,0,"I will not die...alone.")
    pUnit:CastSpell(38973)
    pUnit:RemoveEvents()
    end

  8. #8
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That can't be the right symbol but as I was looking through the script for that symbol I did see you like to add ; after some things I don't think it will make a difference if you take them out but they aren't needed.

  9. #9
    mi_ninja's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    didnt work. im lost i cant find anyone that can figure it out i posted on like 5 sites no one understands one guy tested my orig script the script loaded malc targeted himself the whole time.

  10. #10
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oops I forgot to take off the extra ) sorry here should load not sure if he will cast it on the right person.

    Code:
    function Malchezzar_FastDrain(pUnit)
    local plr = punit:GetMainTank())
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(34036,punit:GetMainTank())
    end
    end
    
    function Malchezzar_AirBurst(pUnit)
    local plr = pUnit:GetRandomPlayer(0))
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(32014, pUnit:GetRandomPlayer(0))
    end
    end
    
    function Malchezzar_Drain(pUnit)
    local plr = pUnit:GetRandomPlayer(4))
    if (plr ~= nil) then
    pUnit:CastSpellOnTarget(34036,pUnit:GetRandomPlayer(4))
    end
    end
    
    function Malchezzar_OnCombat(pUnit)
    pUnit:RegisterEvent("Malchezzar_Drain",45000,0)
    pUnit:RegisterEvent("Malchezzar_Phase1",1000,0)
    end
    
    RegisterUnitEvent (600099,1,"Malchezzar_OnCombat")
    RegisterUnitEvent (600099,2,"Malchezzar_onLeaveCombat")
    RegisterUnitEvent (600099,4,"Malchezzar_OnDeath")
    
    
    
    
    
    
    
    function Malchezzar_Phase1(pUnit)
    if pUnit:GetHealthPct() < 45 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I think its time you met some of my friends!")
    x = pUnit:GetX();
    y = pUnit:GetY();
    z = pUnit:GetZ();
    o = pUnit:GetO();
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:RegisterEvent("Malchezzar_Phase2",1000,0)
    pUnit:RegisterEvent("Malchezzar_Drain",15000,0)
    end
    end
    
    function Malchezzar_Phase2(pUnit)
    if pUnit:GetHealthPct() < 20 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I will not be killed by these mortals!")
    pUnit:SetScale(4);
    pUnit:CastSpell(18173)
    pUnit:RegisterEvent("Malchezzar_FastDrain",2000,0)
    pUnit:RegisterEvent("Malchezzar_AirBurst",90000,0)
    end
    end
    
    function Malchezzar_OnLeaveCombat(pUnit,Event)
    pUnit:RemoveEvents()
    end
    
    function Malchezzar_OnDeath(pUnit,Event)
    pUnit:SendChatMessage(12,0,"I will not die...alone.")
    pUnit:CastSpell(38973)
    pUnit:RemoveEvents()
    end

  11. #11
    mi_ninja's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still same error.

  12. #12
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol forgot to edit it sorry here


    Code:
    function Malchezzar_FastDrain(pUnit)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(34036,punit:GetMainTank())
    end
    end
    
    function Malchezzar_AirBurst(pUnit)
    local plr = pUnit:GetRandomPlayer(0)
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(32014, pUnit:GetRandomPlayer(0))
    end
    end
    
    function Malchezzar_Drain(pUnit)
    local plr = pUnit:GetRandomPlayer(4)
    if (plr ~= nil) then
    pUnit:CastSpellOnTarget(34036,pUnit:GetRandomPlayer(4))
    end
    end
    
    function Malchezzar_OnCombat(pUnit)
    pUnit:RegisterEvent("Malchezzar_Drain",45000,0)
    pUnit:RegisterEvent("Malchezzar_Phase1",1000,0)
    end
    
    RegisterUnitEvent (600099,1,"Malchezzar_OnCombat")
    RegisterUnitEvent (600099,2,"Malchezzar_onLeaveCombat")
    RegisterUnitEvent (600099,4,"Malchezzar_OnDeath")
    
    
    function Malchezzar_Phase1(pUnit)
    if pUnit:GetHealthPct() < 45 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I think its time you met some of my friends!")
    x = pUnit:GetX();
    y = pUnit:GetY();
    z = pUnit:GetZ();
    o = pUnit:GetO();
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:SpawnCreature(600015, x, y, z, o, 15, 0);
    pUnit:RegisterEvent("Malchezzar_Phase2",1000,0)
    pUnit:RegisterEvent("Malchezzar_Drain",15000,0)
    end
    end
    
    function Malchezzar_Phase2(pUnit)
    if pUnit:GetHealthPct() < 20 then
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(12,0,"I will not be killed by these mortals!")
    pUnit:SetScale(4);
    pUnit:CastSpell(18173)
    pUnit:RegisterEvent("Malchezzar_FastDrain",2000,0)
    pUnit:RegisterEvent("Malchezzar_AirBurst",90000,0)
    end
    end
    
    function Malchezzar_OnLeaveCombat(pUnit,Event)
    pUnit:RemoveEvents()
    end
    
    function Malchezzar_OnDeath(pUnit,Event)
    pUnit:SendChatMessage(12,0,"I will not die...alone.")
    pUnit:CastSpell(38973)
    pUnit:RemoveEvents()
    end

Similar Threads

  1. Need some help with LUA script
    By SupernovaHH in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 07-22-2009, 07:25 AM
  2. Help with LUA script
    By blackfang500 in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 03-03-2009, 10:58 PM
  3. Please help with Lua Script
    By Silentnvd in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 09-23-2008, 11:16 PM
  4. Anyone willing to help with LUA scripting
    By nickeg in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-09-2008, 05:53 PM
  5. [Request] I need some help with lua script (boss on death)
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-03-2008, 03:47 PM
All times are GMT -5. The time now is 09:43 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2023 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search