Problem with lua boss script menu

User Tag List

Results 1 to 14 of 14
  1. #1
    nickeg's Avatar Member
    Reputation
    15
    Join Date
    Jan 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with lua boss script

    Code:
    function Rexxar_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "You threaten my people, you will die in the name of Mok'Nathal.")
    Unit:RegisterEvent("Rexxar_Enrage", 8000, 11)
    Unit:RegisterEvent("Rexxar_Thunder clap", 4000, 0)
    Unit:RegisterEvent("Rexxar_War stomp", 6000, 0)
    end
    
    function Rexxar_Enrage(pUnit, Event) 
    pUnit:CastSpell(39249, pUnit:GetRandomPlayer(0)) 
    end
    
    function Rexxar_Thunder clap(pUnit, Event) 
    pUnit:CastSpell(23931, pUnit:GetClosestPlayer()) 
    end
    
    function Rexxar_War stomp(pUnit, Event) 
    pUnit:CastSpell(15593, pUnit:GetRandomPlayer(6)) 
    end
    
    function Rexxar_OnLeaveCombat(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "") 
    end
    
    function Rexxar_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "Hahaha, you may have defeated me, but my people will destroy you!") 
    end
    
    function Rexxar_OnKilledTarget(Unit, Event) 
    Unit:SendChatMessage(11, 0, "This is to easy...") 
    end
    
    RegisterUnitEvent(21984, 1, "Rexxar_OnCombat")
    RegisterUnitEvent(21984, 2, "Rexxar_OnLeaveCombat")
    RegisterUnitEvent(21984, 3, "Rexxar_OnKilledTarget")
    RegisterUnitEvent(21984, 4, "Rexxar_OnDied")

    The script is for blizz Rexxar

    Rexxar - NPC - World of Warcraft



    But when i installed it ... it dint work ... could anyone skilled read it and see if he found something wrong about it...

    +Rep for help

    Problem with lua boss script
  2. #2
    Shao111's Avatar Active Member
    Reputation
    33
    Join Date
    Jul 2007
    Posts
    281
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function Rexxar_OnCombat(pUnit, Event) 
    pUnit:SendChatMessage(12, 0, "You threaten my people, you will die in the name of Mok'Nathal.")
    pUnit:RegisterEvent("Rexxar_Enrage", 8000, 11)
    pUnit:RegisterEvent("Rexxar_Thunder clap", 4000, 0)
    pUnit:RegisterEvent("Rexxar_War stomp", 6000, 0)
    end
    
    function Rexxar_Enrage(pUnit, Event) 
    pUnit:CastSpell(39249, pUnit:GetRandomPlayer(0)) 
    end
    
    function Rexxar_Thunder clap(pUnit, Event) 
    pUnit:CastSpell(23931, pUnit:GetClosestPlayer()) 
    end
    
    function Rexxar_War stomp(pUnit, Event) 
    pUnit:CastSpell(15593, pUnit:GetRandomPlayer(6)) 
    end
    
    function Rexxar_OnLeaveCombat(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(11, 0, "") 
    end
    
    function Rexxar_OnDied(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(11, 0, "Hahaha, you may have defeated me, but my people will destroy you!") 
    end
    
    function Rexxar_OnKilledTarget(pUnit, Event) 
    pUnit:SendChatMessage(11, 0, "This is to easy...") 
    end
    
    RegisterUnitEvent(21984, 1, "Rexxar_OnCombat")
    RegisterUnitEvent(21984, 2, "Rexxar_OnLeaveCombat")
    RegisterUnitEvent(21984, 3, "Rexxar_OnKilledTarget")
    RegisterUnitEvent(21984, 4, "Rexxar_OnDied")
    Still touching up on my LUA, but, hey, give this a try.

    EDIT: just noticed you have war stomp in there, seeing as how it's an AoE stun, I don't think you would need:

    pUnit:GetRandomPlayer(6)

    But, im not 100% on that...
    Last edited by Shao111; 08-14-2008 at 07:07 PM. Reason: Obvious


  3. #3
    FinnZor's Avatar Member
    Reputation
    50
    Join Date
    May 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unit:RegisterEvent("Rexxar_War stomp", 6000, 0)

    Unit:RegisterEvent("Rexxar_War stomp", LoadingTime, HowManyTimesThisAttackWillDoUnderCombat.)

    Seems to me like War Stomp Does 0 Times .. Same with ThunderClap.. But hey i am new to lua.. But you could try this one :

    function Rexxar_Enrage(pUnit, Event)
    pUnit:CastSpell(39249, pUnit:GetRandomPlayer(0))
    end

    function Rexxar_Thunder clap(pUnit, Event)
    pUnit:CastSpell(23931, pUnit:GetClosestPlayer())
    end

    function Rexxar_War stomp(pUnit, Event)
    pUnit:CastSpell(15593, pUnit:GetRandomPlayer(0))
    end

    function Rexxar_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end

    function Rexxar_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "You threaten my people, you will die in the name of Mok'Nathal.")
    Unit:RegisterEvent("Rexxar_Enrage", 8000, 11)
    Unit:RegisterEvent("Rexxar_Thunder clap", 4000, 10)
    Unit:RegisterEvent("Rexxar_War stomp", 6000, 10)
    end

    function Rexxar_OnDied(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(11, 0, "Hahaha, you may have defeated me, but my people will destroy you!")
    end

    function Rexxar_OnKilledTarget(Unit, Event)
    Unit:SendChatMessage(11, 0, "This is to easy...")
    end

    RegisterUnitEvent(21984, 1, "Rexxar_OnCombat")
    RegisterUnitEvent(21984, 2, "Rexxar_OnLeaveCombat")
    RegisterUnitEvent(21984, 3, "Rexxar_OnKilledTarget")
    RegisterUnitEvent(21984, 4, "Rexxar_OnDied")
    It should work out..
    And make sure that you use the ID of the monster : 21984.

  4. #4
    nickeg's Avatar Member
    Reputation
    15
    Join Date
    Jan 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks so much i will try this...+Rep both of you.

  5. #5
    nickeg's Avatar Member
    Reputation
    15
    Join Date
    Jan 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm still not working , any ideas?

  6. #6
    Blackboy0's Avatar Member
    Reputation
    70
    Join Date
    Nov 2007
    Posts
    377
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First thing I noticed was that you changed from pUnit to Unit halfway through the Script (Well, 2nd line really :P) You should always keep the same Command when Scripting (Unit, pUnit, A, Pie, w/e you want. Just keep it the SAME). I'm taking this in and I'm gonna fix it up so its sexy (Not change anything, just fix it) and I'll Post it when I'm done. Aight? And also, if you come back: What Error were you getting in your World.EXE?

    Alright, I found a couple things:

    Code:
    Rexxar_Thunder clap
    NO function can have a space in their name. It errors the Script up soooo bad... Like the worst thing you can do. Also, you switched from pUnit to Unit a couple times, and you did
    Code:
    Unit:GetRandomPlayer(6))
    which MAY cause some errors. And also, with Unit:CastSpell, its just the Spell in the ()'s, you can't target anybody with CastSpell.

    FIXED UP CODE:
    Code:
    function Rexxar_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "You threaten my people, you will die in the name of Mok'Nathal.")
    Unit:RegisterEvent("Rexxar_Enrage", 8000, 11)
    Unit:RegisterEvent("Rexxar_Thunder_clap", 4000, 0)
    Unit:RegisterEvent("Rexxar_War_stomp", 6000, 0)
    end
     
    function Rexxar_Enrage(Unit, Event) 
    Unit:CastSpell(39249) 
    end
     
    function Rexxar_Thunder_clap(Unit, Event) 
    Unit:CastSpell(23931) 
    end
     
    function Rexxar_War_stomp(Unit, Event) 
    Unit:CastSpell(15593) 
    end
     
    function Rexxar_OnLeaveCombat(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "") 
    end
     
    function Rexxar_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "Hahaha, you may have defeated me, but my people will destroy you!") 
    end
     
    function Rexxar_OnKilledTarget(Unit, Event) 
    Unit:SendChatMessage(11, 0, "This is to easy...") 
    end
     
    RegisterUnitEvent(21984, 1, "Rexxar_OnCombat")
    RegisterUnitEvent(21984, 2, "Rexxar_OnLeaveCombat")
    RegisterUnitEvent(21984, 3, "Rexxar_OnKilledTarget")
    RegisterUnitEvent(21984, 4, "Rexxar_OnDied")
    Last edited by Blackboy0; 08-15-2008 at 01:29 PM.

  7. #7
    Skype's Avatar Member
    Reputation
    133
    Join Date
    Dec 2007
    Posts
    116
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Unit:RegisterEvent("Rexxar_War stomp", 6000, 0)"


    For that thing, FinnZor Acctually, think of the 0 as an infinity sign. The Register Event will continue on and on. if it's 1, it will only do it once, if it's 0, it will do that one every 6000 miliseconds, Until it's removed.


  8. #8
    nickeg's Avatar Member
    Reputation
    15
    Join Date
    Jan 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    THanks alot blackboy0 ... i will test if this one hopefully works +rep m8 for the help

  9. #9
    Blackboy0's Avatar Member
    Reputation
    70
    Join Date
    Nov 2007
    Posts
    377
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem mate. If there's anymore bugs when you test it, please Post the Script and the error you get in the World.EXE

  10. #10
    FinnZor's Avatar Member
    Reputation
    50
    Join Date
    May 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah thanks skype i honosly didnt know that ^^

  11. #11
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,647
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The 0 at the end of RegisterUnitEvent does not mean for how many times it does it. I have no idea what it does, but leaving it at 0 works.

    Btw, you should post the error. But I see you got it fixed already


  12. #12
    FinnZor's Avatar Member
    Reputation
    50
    Join Date
    May 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Blackboy0 , everytime i make an lua i always use pUnit for like the spell .. For exampel :
    function Rexxar_Enrage(pUnit, Event)
    pUnit:CastSpell(39249, pUnit:GetRandomPlayer(0))
    end
    and Unit for when i register the event for like OnCombat , On Leave Combat .. And So on, Exampel :

    function Rexxar_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "You threaten my people, you will die in the name of Mok'Nathal.")
    Unit:RegisterEvent("Rexxar_Enrage", 8000, 11)
    Unit:RegisterEvent("Rexxar_Thunder clap", 4000, 0)
    Unit:RegisterEvent("Rexxar_War stomp", 6000, 0)
    end
    function Rexxar_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(11, 0, "")
    end
    So i dont really think that is the problem

  13. #13
    FinnZor's Avatar Member
    Reputation
    50
    Join Date
    May 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nickeg .. Try with an other trunk .. Becuse this script loads good in my trunk as i use .. Here try this : http://www.mmowned.com/forums/emulat...databases.html Thats the one i use..

    And i did some small changes with the lua :


    function Rexxar_Enrage(pUnit, Event)
    pUnit:CastSpell(39249, pUnit:GetRandomPlayer(0))
    end

    function Rexxar_Thunderclap(pUnit, Event)
    pUnit:CastSpell(23931, pUnit:GetClosestPlayer())
    end

    function Rexxar_Warstomp(pUnit, Event)
    pUnit:CastSpell(15593, pUnit:GetRandomPlayer(0))
    end

    function Rexxar_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "You threaten my people, you will die in the name of Mok'Nathal.")
    Unit:RegisterEvent("Rexxar_Enrage", 8000, 11)
    Unit:RegisterEvent("Rexxar_Thunderclap", 4000, 0)
    Unit:RegisterEvent("Rexxar_Warstomp", 6000, 0)
    end

    function Rexxar_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end

    function Rexxar_OnDied(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(11, 0, "Hahaha, you may have defeated me, but my people will destroy you!")
    end

    function Rexxar_OnKilledTarget(Unit, Event)
    Unit:SendChatMessage(11, 0, "This is to easy...")
    end

    RegisterUnitEvent(21984, 1, "Rexxar_OnCombat")
    RegisterUnitEvent(21984, 2, "Rexxar_OnLeaveCombat")
    RegisterUnitEvent(21984, 3, "Rexxar_OnKilledTarget")
    RegisterUnitEvent(21984, 4, "Rexxar_OnDied")
    Last edited by FinnZor; 08-16-2008 at 08:00 AM.

  14. #14
    nickeg's Avatar Member
    Reputation
    15
    Join Date
    Jan 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    THe script worked after blackboy0 change ... as i think the problem was that i added space in the spell name Thunder clap but it should be Thunder_clap instead.
    Thanks to all of you again :wave:

Similar Threads

  1. Problem with Lua scripts!
    By wour55 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 09-12-2010, 04:10 PM
  2. Problem with lua script :/ please help!
    By robinelitenn in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 10-24-2009, 05:10 PM
  3. Problem with LUA scripted Mobs
    By foamysquirl in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 07-24-2009, 02:45 PM
  4. LUA Boss Script Help
    By neurothymia in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-05-2008, 02:57 PM
  5. Lua Boss Script Problems!!
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 14
    Last Post: 01-22-2008, 08:59 PM
All times are GMT -5. The time now is 02:33 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