[HELP] LUA Boss Script menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP] LUA Boss Script

    Hello!

    I've just started learning the LUA language about scripting bosses and such, it's really fun.

    Here's a script I made, but it doesn't seem he's casting the spell I wrote. He's not casting it at all. Everythings is loading OK.

    Help would be appriciated!


    function TheNuub_EnterCombat (pUnit, event)
    pUnit:SendChatMessage(14, 0, "")
    end

    function TheNuub_Frostbolt (pUnit, event)
    pUnit:FullCastSpellOnTarget(116)

    end

    function TheNuub_OnKilledTarget (pUnit, Event)
    local Choice=math.random(1, 3)
    if Choice==1 then
    pUnit:SendChatMessage(14, 0, "Oh my... To easy!")
    elseif Choice==2 then
    pUnit:SendChatMessage(14, 0, "How do you like me now, punk?!")
    elseif Choice==3 then
    pUnit:SendChatMessage(14, 0, "Uhhahahaahahah...")
    end
    end

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

    function TheNuub_Die(pUnit, event)
    pUnit:SendChatMessage(14, 0, "I'll... rise...")
    end

    RegisterUnitEvent(9999996, 1, "TheNuub_EnterCombat")
    RegisterUnitEvent(9999996, 2, "TheNuub_LeaveCombat")
    RegisterUnitEvent(9999996, 3, "TheNuub_OnKilledTarget")
    RegisterUnitEvent(9999996, 4, "TheNuub_Die")
    // Babbaa

    [HELP] LUA Boss Script
  2. #2
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,555
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    hmmm... I'm no expert but i think you need to say what type of target e.g
    pUnit:FullCastSpellOnTarget(116, pUnit:GetMainTank())
    or
    local plr = pUnit:GetRandomPlayer(0)
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(116, plr)

  3. #3
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep. CastSpellOnTarget and FullCastSpellOnTarget expect a target as the second parameter

  4. #4
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right, I tried to change, but he still does not cast it.
    Don't I need to register the event?

  5. #5
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,646
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function TheNuub_EnterCombat (pUnit, event)
    pUnit:SendChatMessage(14, 0, "")
    pUnit:RegisterEvent("TheNuub_Frostbolt", 50000, 0)
    end

    function TheNuub_Frostbolt (pUnit, event)
    pUnit:FullCastSpellOnTarget(116)

    end

    function TheNuub_OnKilledTarget (pUnit, Event)
    local Choice=math.random(1, 3)
    if Choice==1 then
    pUnit:SendChatMessage(14, 0, "Oh my... To easy!")
    elseif Choice==2 then
    pUnit:SendChatMessage(14, 0, "How do you like me now, punk?!")
    elseif Choice==3 then
    pUnit:SendChatMessage(14, 0, "Uhhahahaahahah...")
    end
    end

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

    function TheNuub_Die(pUnit, event)
    pUnit:SendChatMessage(14, 0, "I'll... rise...")
    end

    RegisterUnitEvent(9999996, 1, "TheNuub_EnterCombat")
    RegisterUnitEvent(9999996, 2, "TheNuub_LeaveCombat")
    RegisterUnitEvent(9999996, 3, "TheNuub_OnKilledTarget")
    RegisterUnitEvent(9999996, 4, "TheNuub_Die")
    Add the orange. Number is the timer in ms, milliseconds. 50000 is 50 seconds I think. or 5.


  6. #6
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1000ms = 1 second
    50000 = 50 seconds

  7. #7
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh my, it's working! : D
    Big thanks to all you guys who helped! <3

  8. #8
    falkaga's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question...

    Say if you wanted the mob to use a spell after command..
    pUnit:SendChatMessage(14, 0, "Oh my... To easy!")

    What would you do? Im new to Lua and i havnt figured it out yet...

  9. #9
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by falkaga View Post
    Say if you wanted the mob to use a spell after command..
    pUnit:SendChatMessage(14, 0, "Oh my... To easy!")

    What would you do? Im new to Lua and i havnt figured it out yet...
    function Boss_Spell (pUnit, event)
    pUnit:FullCastSpellOnTarget("ID", pUnit:GetRandomPlayer(1))
    pUnit:SendChatMessage(14, 0, "TEXT")

    That's an example, Now the boss would cast a spell and say something when he casts it, Is that what you were looking for?

    / Babbaa

Similar Threads

  1. [Help] Lua boss script
    By Reflection in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 08-01-2008, 12:24 PM
  2. [Help] LUA boss script error.
    By arthars1 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-09-2008, 08:23 PM
  3. [help] LUA boss script
    By arthars1 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 06-08-2008, 07:11 PM
  4. [HELP] Lua boss script not working-solutions?
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 03-21-2008, 08:19 AM
  5. LUA Boss Script Help
    By neurothymia in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-05-2008, 02:57 PM
All times are GMT -5. The time now is 05:55 PM. 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