Trying to fix M'uru.lua   NEED HELP! menu

User Tag List

Results 1 to 5 of 5
  1. #1
    _DEFiANT's Avatar Member
    Reputation
    44
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trying to fix M'uru.lua NEED HELP!

    I compiled my own server and now I am trying to work out all the LUA bugs. I fixed the "UNIT-MagistersTerrace-SunbladeMagister.lua", but I still have a problem with M'uru. I get this error in the world.exe

    Code:
    failed <could not load>
    	scriptsM'uru.Lua:142: '<name>' expected near ')'
    Here is line 142 of M'uru.lua


    Code:
    	pUnit:FullCastSpellOnTarget(46101, pUnit:)


    +Rep to one LUA Expert who can figure out whats wrong with line 142 :P

    EDIT: Incase you need the whole LUA file, here it is...

    Code:
    --[[ M'Uru.lua  Author:Shorts
    ********************************
    *                                                            *
    * The LUA++ Scripting Project        *
    *                                                            *
    ********************************
    
    This software is provided as free and open source by the
    staff of The LUA++ Scripting Project, in accordance with 
    the AGPL 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.
    
    ~~End of License Agreement
    -- LUA++ staff, March 26, 2008. ]]
    --[[ ~~NOTE~~ This script is untested and unfinished, add's have to be added/scripted, which I am unable to do because I do n
    not have a server to get the positions for them]]--
    
    
    ---------------------------
    -- M'uru AI Script
    ---------------------------
    
    function MuruOnCombat(pUnit, event)
    	pUnit:StopMovement()
    	pUnit:RegisterEvent("MuruNegEn", 1000, 0)
    	pUnit:RegisterEvent("MuruDarkness", 45000, 0)
    	pUnit:RegisterEvent("VoidSentinel", 60000, 0)
    	pUnit:RegisterEvent("DarkFiendSummon", 45000, 0)
    	pUnit:RegisterEvent("SummonHumanoids", 10000, 1)
    	--pUnit:RegisterEvent("MuruEnrage", 600000, 0)
    end
    
    function MuruOnLeaveCombat(pUnit, event)
    	pUnit:RemoveEvents()
    end
    
    function MuruOnDeath(pUnit, event)
    	pUnit:RemoveEvents()
    	local X = GetX()
    	local Y = GetY()
    	local Z = GetZ()
    	local O = GetO()
    	pUnit:SpawnCreature(25840, X, Y, Z, o, 0)
    	pUnit:Despawn()
    end
    
    function MuruNegEn(pUnit, event)
    	pUnit:CastSpellOnTarget(46008, pUnit:GetRandomTarget(0))
    end
    
    function MuruDarkness(pUnit, event)
    	local X = GetX()
    	local Y = GetY()
    	local Z = GetY()
    	local O = GetO()
    	pUnit:CastSpellAoF(X, Y, Z, 45996)
    end
    
    --function DarkFiendSummon(pUnit, event)
    --
    --end
    
    function SummonHumanoids(pUnit, event)
    	pUnit:SpawnCreature()
    	pUnit:SpawnCreature()
    	pUnit:SpawnCreature()
    	pUnit:SpawnCreature()
    	pUnit:SpawnCreature()
    	pUnit:SpawnCreature()
    end
    
    function VoidSentinel(pUnit, event)
    	pUnit:SpawnCreature()
    end
    
    --function MuruEnrage(pUnit, event)
    --pUnit:CastSpell()
    --end
    
    RegisterUnitEvent(25741, 1, "MuruOnCombat")
    RegisterUnitEvent(25741, 2, "MuruOnLeaveCombat")
    RegisterUnitEvent(25741, 4, "MuruOnDeath")
    
    ------------------------------
    -- Entropius AI Script
    ------------------------------  
    
    function EntropiusOnCombat(pUnit, event)
    	pUnit:RegisterEvent("EntropiusNegEn", 1000, 0)
    	pUnit:RegisterEvent("EntropiusBlackHole", 45000, 0)
    end
    
    function EntropusOnLeaveCombat(pUnit, event)
    	pUnit:RemoveEvents()
    end
    
    function EntropiusOnDeath(pUnit, event)
    	pUnit:RemoveEvents()
    end
    
    function EntropiusNegEn(pUnit, event)
    	pUnit:CastSpellOnTarget(46289, pUnit:GetRandomTarget(0))
    end
    
    function EntropiusBlakHole(pUnit, event)
    	local X = GetX()
    	local Y = GetY()
    	local Z = GetY()
    	local O = GetO()
    	pUnit:CastSpellAoF(X, Y, Z, 46282)
    end
    
    RegisterUnitEvent(25840, 1, "EntropiusOnCombat")
    RegisterUnitEvent(25840, 2, "EntropiusOnLeaveCombat")
    RegisterUnitEvent(25840, 4, "EntropiusOnDeath")
    
    -----------------------------
    -- M'uru Adds AI Scripts
    -----------------------------
    
    function ShadowBerserk(pUnit, event)
    	pUnit:RegisterEvent("Flurry", math.random(25000, 30000),0)
    end
    
    RegisterUnitEvent(25798, 1, "ShadowBerserk")
    
    function Flurry(pUnit, event)
    	pUnit:CastSpell(46160)
    end
    
    --------------------------------------
    
    function ShadowFuryMage(pUnit, event)
    	pUnit:RegisterEvent("FelFireball", 0)
    	pUnit:RegisterEvent("SpellFury", 0)
    end
    
    function FelFireball(pUnit, event)
    	pUnit:FullCastSpellOnTarget(46101, pUnit:)
    end
    
    function SpellFury(pUnit, event)
    	pUnit:CastSpell(46102)
    end
    RegisterUnitEvent(25799, 1, "ShadowFuryMage")
    Last edited by _DEFiANT; 08-27-2008 at 09:33 PM.

    Trying to fix M'uru.lua   NEED HELP!
  2. #2
    kreegoth's Avatar Contributor
    Reputation
    122
    Join Date
    Jun 2008
    Posts
    810
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pUnit:FullCastSpellOnTarget(46101, pUnit

    You need a Type after the : try something like

    pUnit:FullCastSpellOnTarget(46101, pUnit:GetRandomTarget(0))

    or
    pUnit:FullCastSpellOnTarget(46101, pUnit:GetRandomPlayer(1))


    If that doesnt work Let me know i have a M`uru script you can use that works if you want

  3. #3
    _DEFiANT's Avatar Member
    Reputation
    44
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kreegoth View Post
    pUnit:FullCastSpellOnTarget(46101, pUnit

    You need a Type after the : try something like

    pUnit:FullCastSpellOnTarget(46101, pUnit:GetRandomTarget(0))

    or
    pUnit:FullCastSpellOnTarget(46101, pUnit:GetRandomPlayer(1))


    If that doesnt work Let me know i have a M`uru script you can use that works if you want
    Yeah, that didn't work

    Can you give me your working one please

  4. #4
    kreegoth's Avatar Contributor
    Reputation
    122
    Join Date
    Jun 2008
    Posts
    810
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works on my server

    Code:
    function Muru_OnEnterCombat(Unit, Event)
    Unit:RegisterEvent("Muru_NegativeEnergy",2000,0)
    Unit:RegisterEvent("Muru_Darkness",45000,0)
    Unit:RegisterEvent("Muru_VoidSentinel",30000,0)
    Unit:RegisterEvent("Muru_Summonset",60000,0)
    Unit:RegisterEvent("Muru_Enrage",6000000,0)
    Unit:StopMovement()
    end
    
    function Muru_NegativeEnergy(Unit, event)
       Unit:CastSpellOnTarget(46008, Unit:GetRandomPlayer(0))
    end
    
    function Muru_Darkness(Unit, event)
       Unit:CastSpell(45996)
    end
    
    function Muru_Enrage(Unit, Event)
            Unit:CastSpell(26662)
    end
    
    function Muru_Summonset(Unit, Event)
    Choice=math.random(1, 2)
    if Choice==1 then
             Unit:SpawnCreature(25798, 1781.98, 665.4370, 71.2, 5.23, 16,0)
             Unit:SpawnCreature(25798, 1777.76, 662.8, 71.2, 5.21, 16,0)
             Unit:SpawnCreature(25799, 1848.0813, 598.78, 71.3143, 2.4368, 16,0)
    end   
    if Choice==2 then
             Unit:SpawnCreature(25799, 1781.98, 665.4370, 71.2, 5.23, 16,0)
             Unit:SpawnCreature(25798, 1849.64, 595.196, 71.3143, 2.4886, 16,0)
                            Unit:SpawnCreature(25798, 1848.0813, 598.78, 71.3143, 2.4368, 16,0)
    end
    end
    
    function Muru_VoidSentinel(Unit, Event)
    Choice=math.random(1, 2)
    if Choice==1 then
             Unit:SpawnCreature(25772, 1796.94 ,605.072, 71.203, 0.67, 16,0)
    end   
    if Choice==2 then
                            Unit:SpawnCreature(25772, 1838.32 ,650.789, 71.243, 4.26, 16,0)
    end
    end
    
    function Muru_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    
    function Muru_OnDied(Unit, Event)
    Unit:CastSpell(46217)
    Unit:Despawn(1000,0)
    Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(25741, 1, "Muru_OnEnterCombat")
    RegisterUnitEvent(25741, 2, "Muru_OnLeaveCombat")
    RegisterUnitEvent(25741, 4, "Muru_OnDied")
    
    
    --Entropius
    function Entropius_OnEnterCombat(Unit, Event)
    Unit:RegisterEvent("Entropius_NegativeEnergy",4000,0)
    Unit:RegisterEvent("Entropius_Darkness",45000,0)
    Unit:RegisterEvent("Entropius_BlackHole",150000,0)
    Unit:RegisterEvent("Entropius_Enrage",6000000,0)
    end
    
    function Entropius_NegativeEnergy(Unit, event)
       Unit:CastSpellOnTarget(46008, Unit:GetRandomPlayer(0))
       Unit:CastSpellOnTarget(46008, Unit:GetRandomPlayer(0))
       Unit:CastSpellOnTarget(46008, Unit:GetRandomPlayer(0))
    end
    
    function Entropius_Enrage(Unit, Event)
            Unit:CastSpell(26662)
    end
    
    function Entropius_Darkness(Unit, Event)
            Unit:FullCastSpellOnTarget (45141, Unit:GetRandomPlayer(0))   
    end
    
    function Entropius_BlackHole(Unit, Event)
       x = Unit:GetX ()
       y = Unit:GetY ()
       z = Unit:GetZ ()
       o = Unit:GetO ()
       Unit:SpawnCreature(25855, x-1, y, z, o, 16, o)
       Unit:SpawnCreature(25855, x+1, y, z, o, 16, o)
       Unit:CastSpellOnTarget(45996, Unit:GetRandomPlayer(0))
    end
    
    function Entropius_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    
    function Entropius_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(25840, 1, "Entropius_OnEnterCombat")
    RegisterUnitEvent(25840, 2, "Entropius_OnLeaveCombat")
    RegisterUnitEvent(25840, 4, "Entropius_OnDied")
    
    
    ------------------------Summon
    --Summonmove
    function Summonmove(Unit)   
       Unit:MoveTo(1815.3, 625.193, 69.6075, 2.3)
    end
    
    RegisterUnitEvent(25798,6,"Summonmove")
    RegisterUnitEvent(25799,6,"Summonmove")
    
    --VoidSentinel 25772
    
    function VoidSentinel1_OnEnterCombat(Unit, Event)
    Unit:RegisterEvent("VoidSentinel1_ShadowPulsePeriodic",7000,0)
    Unit:RegisterEvent("VoidSentinel1_VoidBlast",3000,0)
    Unit:Despawn(60000, 0)
    end
    
    function VoidSentinel1_ShadowPulsePeriodic(Unit, Event)
            Unit:CastSpellOnTarget (46086,Unit:GetRandomPlayer(0))
    end
    
    function VoidSentinel1_VoidBlast(Unit, Event)
            Unit:FullCastSpellOnTarget (46161,Unit:GetRandomPlayer(1))
    end
    
    function VoidSentinel1_OnDied(Unit, Event)
       x = Unit:GetX ()
       y = Unit:GetY ()
       z = Unit:GetZ ()
       o = Unit:GetO ()
       Unit:SpawnCreature(25782, x-1, y, z, o, 16, o)
       Unit:SpawnCreature(25782, x+1, y, z, o, 16, o)
       Unit:SpawnCreature(25782, x, y-1, z, o, 16, o)
       Unit:SpawnCreature(25782, x, y+1, z, o, 16, o)
       Unit:SpawnCreature(25782, x-3, y, z, o, 16, o)
       Unit:SpawnCreature(25782, x+5, y, z, o, 16, o)
    end
    
    function VoidSentinel1_spawndisplay(Unit, Event)
    Unit:SetModel(22742)
    end
    
    function VoidSentinel1_moveset(Unit)   
            Unit:RegisterEvent("VoidSentinel1_spawndisplay",1000,1)
       Unit:RegisterEvent("VoidSentinel1_move",4000,0)
    end
    
    function VoidSentinel1_move(Unit, Event)
       Unit:MoveTo(1815.3, 625.193, 69.6075, 2.3)
            Unit:SetModel(23372)
    end
    
    RegisterUnitEvent(25772, 1, "VoidSentinel1_OnEnterCombat")
    RegisterUnitEvent(25772, 4, "VoidSentinel1_OnDied")
    RegisterUnitEvent(25772, 6, "VoidSentinel1_moveset")
    
    --VoidSentinel2 summon
    
    function VoidSentinel2_OnEnterCombat(Unit, Event)
    Unit:RegisterEvent("VoidSentinel2_ShadowBoltVolley",5000,0)
    Unit:Despawn(30000, 0)
    end
    
    function VoidSentinel2_ShadowBoltVolley(Unit, Event)
            Unit:FullCastSpellOnTarget (46082,Unit:GetRandomPlayer(1))
    end
    
    function VoidSentinel2_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(25782, 1, "VoidSentinel2_OnEnterCombat")
    RegisterUnitEvent(25782, 4, "VoidSentinel2_OnDied")
    
    --Summon shadow FuryMage
    
    function SummonFuryMage_OnEnterCombat(Unit, Event)
    Unit:RegisterEvent("SummonFuryMage_FelFireball",5000,0)
    Unit:RegisterEvent("SummonFuryMage_SpellFury",5000,0)
    end
    
    function SummonFuryMage_FelFireball(Unit, Event)
            Unit:FullCastSpellOnTarget (46101,Unit:GetRandomPlayer(1))
    end
    
    function SummonFuryMage_SpellFury(Unit, Event)
            Unit:FullCastSpellOnTarget (46102,Unit:GetRandomPlayer(1))
    end
    
    
    function SummonFuryMage_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(25798, 1, "SummonFuryMage_OnEnterCombat")
    RegisterUnitEvent(25798, 4, "SummonFuryMage_OnDied")
    
    --Summon shadow Berserk
    
    function SummonBerserk_OnEnterCombat(Unit, event)
    Unit:RegisterEvent("SummonBerserk_Flurry", math.random(25000, 30000),0)
    end
    
    function SummonBerserk_Flurry(Unit, event)
       pUnit:CastSpell(46160)
    end
    
    function SummonBerserk_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(25798, 1, "SummonBerserk_OnEnterCombat")
    RegisterUnitEvent(25798, 4, "SummonBerserk_OnDied")

  5. #5
    _DEFiANT's Avatar Member
    Reputation
    44
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it does work

    Thank you, Kreegoth.


    +Rep

    EDIT: Gotta spread it around first. Sorry!

Similar Threads

  1. NoAddiction, using LUAs need help!
    By ShasVa in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 05-08-2011, 04:24 AM
  2. [LUA] Need Help
    By EmuX in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 02-10-2010, 05:38 PM
  3. Mount Any Where lua need help
    By [Shon3m] in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 02-09-2009, 06:37 PM
  4. New to LUA need help with script
    By nickelo in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 06-30-2008, 01:34 PM
  5. [Help] New to LUA, Need help with script.
    By nickelo in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-14-2008, 11:23 PM
All times are GMT -5. The time now is 08:49 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