[Lua] Help:( menu

User Tag List

Thread: [Lua] Help:(

Results 1 to 3 of 3
  1. #1
    ucigashu's Avatar Member
    Reputation
    22
    Join Date
    Aug 2007
    Posts
    138
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Help:(

    i get 2 errors in ascent-world.




    and my skill in Lua is 0%.
    I hope someone can help me with this one.

    Here's the lua scripts:

    Code:
    --[[
    ********************************
    *                              *
    *      The Moon Project        *
    *                              *
    ********************************
    
    This software is provided as free and open source by the
    staff of The Moon Project, in accordance with 
    the GPL license. This means we provide the software we have 
    created freely and it has been thoroughly tested to work for 
    the developers, but NO GUARANTEE is made it will work for you 
    as well. Please give credit where credit is due, if modifying,
    redistributing and/or using this software. Thank you.
    
    Staff of Moon Project, Feb 2008
    ~~End of License Agreement
    --Moon April 2008]]
    
    function SunbladeBloodKnight_OnCombat(Unit, Event)
        Unit:RegisterAIUpdateEvent(10000)
    end
    
    
    function SunbladeBloodKnight_HolyLight(Unit, Event)
        Unit:FullCastSpell(27136)
    end
    
    function SunbladeBloodKnight_LeaveCombat(Unit, Event)
        Unit:RemoveAIUpdateEvent()
    end
    
    function SunbladeBloodKnight_Died(Unit, Event)
        Unit:RemoveAIUpdateEvent()
    end
    
    
    RegisterUnitEvent(27136, 1, "SunbladeBloodKnight_OnCombat")
    RegisterUnitEvent(27136, 21 "SunbladeBloodKnight_HolyLight")
    RegisterUnitEvent(27136, 2, "SunbladeBloodKnight_LeaveCombat")
    RegisterUnitEvent(27136, 4, "SunbladeBloodKnight_Died")
    and the other one

    Code:
    --[[
    ********************************
    *                              *
    *      The Moon Project        *
    *                              *
    ********************************
    
    This software is provided as free and open source by the
    staff of The Moon Project, in accordance with 
    the GPL license. This means we provide the software we have 
    created freely and it has been thoroughly tested to work for 
    the developers, but NO GUARANTEE is made it will work for you 
    as well. Please give credit where credit is due, if modifying,
    redistributing and/or using this software. Thank you.
    
    Staff of Moon Project, Feb 2008
    ~~End of License Agreement
    --Moon April 2008]]
    
    function SunbladeMagister_OnCombat(Unit, Event)
        Unit:RegisterAIUpdateEvent(3000)
    end
    
    function SunbladeMagister_Frostbolt(Unit, Event)
        local plr = Unit:GetRandomPlayer(1)
        if plr then
            Unit:FullCastSpellOnTarget(46035,plr)
        end
    end
    
    function SunbladeMagister_ArcaneNova(Unit)
        local arcaneflip = math.random(1,6)
        local plr = Unit:GetRandomPlayer(7)
        if arcaneflip == 1 and plr ~= nil then
            Unit:FullCastSpellOnTarget(46036,plr)
        else
        end
    end
    
    function SunbladeMagister_LeaveCombat(Unit)
        Unit:RemoveEvents()
        Unit:RemoveAIUpdateEvent()
    end
    
    function SunbladeMagister_Died(Unit)
        Unit:RemoveEvents()
        Unit:RemoveAIUpdateEvent()
    end
    
    
    RegisterUnitEvent(24685, 1, "SunbladeMagister_OnCombat")
    RegisterUnitEvent(24685, 21,"SunbladeMagister_Frostbolt")
    RegisterUnitevent(24685, 21,"SunbladeMagister_ArcaneNova")
    RegisterUnitEvent(24685, 2, "SunbladeMagister_LeaveCombat")
    RegisterUnitEvent(24685, 4, "SunbladeMagister_Died")

    [Lua] Help:(
  2. #2
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use these, they dont error for me, but im not sure if theyre 999% blizzlike..
    Code:
    --[[
    ********************************
    *                              *
    *      The Moon Project        *
    *                              *
    ********************************
    
    This software is provided as free and open source by the
    staff of The Moon Project, in accordance with 
    the GPL license. This means we provide the software we have 
    created freely and it has been thoroughly tested to work for 
    the developers, but NO GUARANTEE is made it will work for you 
    as well. Please give credit where credit is due, if modifying,
    redistributing and/or using this software. Thank you.
    
    Staff of Moon Project, Feb 2008
    ~~End of License Agreement
    --Moon April 2008]]
    
    function SunbladeMagister_OnCombat(Unit, Event)
    Unit:RegisterEvent("SunbladeMagister_Frostbolt", 3000, 40)
    Unit:RegisterEvent("SunbladeMagister_ArcaneNova", 3000, 40)
    end
    
    function SunbladeMagister_Frostbolt(Unit, Event)
    Unit:FullCastSpellOnTarget(46035, Unit:GetRandomPlayer(1))
    end
    
    function SunbladeMagister_ArcaneNova(Unit, Event)
    ArcaneFlip=math.random(1, 6)
    if ArcaneFlip==1 then
    Unit:FullCastSpellOnTarget(46036, Unit:GetRandomPlayer(7))
    else
    ArcaneFlip=nil
    end
    end
    
    function SunbladeMagister_LeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    
    function SunbladeMagister_Died(Unit, Event)
    Unit:RemoveEvents()
    end
    
    
    RegisterUnitEvent(24685, 1, "SunbladeMagister_OnCombat")
    RegisterUnitEvent(24685, 2, "SunbladeMagister_LeaveCombat")
    RegisterUnitEvent(24685, 4, "SunbladeMagister_Died")
    Code:
    --[[
    ********************************
    *                              *
    *      The Moon Project        *
    *                              *
    ********************************
    
    This software is provided as free and open source by the
    staff of The Moon Project, in accordance with 
    the GPL license. This means we provide the software we have 
    created freely and it has been thoroughly tested to work for 
    the developers, but NO GUARANTEE is made it will work for you 
    as well. Please give credit where credit is due, if modifying,
    redistributing and/or using this software. Thank you.
    
    Staff of Moon Project, Feb 2008
    ~~End of License Agreement
    --Moon April 2008]]
    
    function SunbladeBloodKnight_OnCombat(Unit, Event)
    Unit:RegisterEvent("SunbladeBloodKnight_HolyLight", 6300, 40)
    end
    
    function SunbladeBloodKnight_HolyLight(Unit, Event)
    Unit:FullCastSpell(27136)
    end
    
    function SunbladeBloodKnight_LeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    
    function SunbladeBloodKnight_Died(Unit, Event)
    Unit:RemoveEvents()
    end
    
    
    RegisterUnitEvent(27136, 1, "SunbladeBloodKnight_OnCombat")
    RegisterUnitEvent(27136, 2, "SunbladeBloodKnight_LeaveCombat")
    RegisterUnitEvent(27136, 4, "SunbladeBloodKnight_Died")
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  3. #3
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First one:
    Code:
    --[[
    ********************************
    *                              *
    *      The Moon Project        *
    *                              *
    ********************************
    
    This software is provided as free and open source by the
    staff of The Moon Project, in accordance with 
    the GPL license. This means we provide the software we have 
    created freely and it has been thoroughly tested to work for 
    the developers, but NO GUARANTEE is made it will work for you 
    as well. Please give credit where credit is due, if modifying,
    redistributing and/or using this software. Thank you.
    
    Staff of Moon Project, Feb 2008
    ~~End of License Agreement
    --Moon April 2008]]
    
    function SunbladeBloodKnight_OnCombat(Unit, Event)
        Unit:RegisterAIUpdateEvent(10000)
    end
    
    --[[-- I dont't know how often he does this just set it to 6, 3 sec--]]
    function SunbladeBloodKnight_HolyLight(Unit, Event)
        Unit:FullCastSpell(27136)
    end
    
    function SunbladeBloodKnight_LeaveCombat(Unit, Event)
        Unit:RemoveAIUpdateEvent()
    end
    
    function SunbladeBloodKnight_Died(Unit, Event)
        Unit:RemoveAIUpdateEvent()
    end
    
    
    RegisterUnitEvent(27136, 1, "SunbladeBloodKnight_OnCombat")
    RegisterUnitEvent(27136, 21, "SunbladeBloodKnight_HolyLight")
    RegisterUnitEvent(27136, 2, "SunbladeBloodKnight_LeaveCombat")
    RegisterUnitEvent(27136, 4, "SunbladeBloodKnight_Died")
    Second one:

    Code:
    --[[
    ********************************
    *                              *
    *      The Moon Project        *
    *                              *
    ********************************
    
    This software is provided as free and open source by the
    staff of The Moon Project, in accordance with 
    the GPL license. This means we provide the software we have 
    created freely and it has been thoroughly tested to work for 
    the developers, but NO GUARANTEE is made it will work for you 
    as well. Please give credit where credit is due, if modifying,
    redistributing and/or using this software. Thank you.
    
    Staff of Moon Project, Feb 2008
    ~~End of License Agreement
    --Moon April 2008]]
    
    function SunbladeMagister_OnCombat(Unit, Event)
        Unit:RegisterAIUpdateEvent(3000)
    end
    
    function SunbladeMagister_Frostbolt(Unit, Event)
        local plr = Unit:GetRandomPlayer(1)
        if plr then
            Unit:FullCastSpellOnTarget(46035,plr)
        end
    end
    
    function SunbladeMagister_ArcaneNova(Unit)
        local arcaneflip = math.random(1,6)
        local plr = Unit:GetRandomPlayer(7)
        if arcaneflip == 1 and plr ~= nil then
            Unit:FullCastSpellOnTarget(46036,plr)
        else
        end
    end
    
    function SunbladeMagister_LeaveCombat(Unit)
        Unit:RemoveEvents()
        Unit:RemoveAIUpdateEvent()
    end
    
    function SunbladeMagister_Died(Unit)
        Unit:RemoveEvents()
        Unit:RemoveAIUpdateEvent()
    end
    
    
    RegisterUnitEvent(24685, 1, "SunbladeMagister_OnCombat")
    RegisterUnitEvent(24685, 21,"SunbladeMagister_Frostbolt")
    RegisterUnitEvent(24685, 21,"SunbladeMagister_ArcaneNova")
    RegisterUnitEvent(24685, 2, "SunbladeMagister_LeaveCombat")
    RegisterUnitEvent(24685, 4, "SunbladeMagister_Died")
    I've had the same problems, second one's fix is the last registerunitevents, one of them had a RegisterUnitevent, while it should be RegisterUnitEvent.

    Capitals is important in lua.

    Tell me if they work.


    Last edited by Reflection; 08-05-2008 at 02:41 PM.

Similar Threads

  1. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  2. [Help] i need Lua help with this script...
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 25
    Last Post: 03-03-2008, 03:45 PM
  3. LUA help
    By stoneharry in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 02-25-2008, 03:27 PM
  4. Lua help
    By reconz in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-18-2008, 07:03 PM
  5. Lua help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-04-2008, 12:17 PM
All times are GMT -5. The time now is 05:41 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search