[Lua] Help menu

User Tag List

Thread: [Lua] Help

Results 1 to 6 of 6
  1. #1
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Help

    I'm trying to get an NPC cast a buff on it's self, i'm very new to LUA, not sure how everything works.
    so here's the script.

    Code:
    local NPC_ID = 21750
    
    function OrcWarlock_OnCombat(pUnit, Event)
            pUnit:SendChatMessage(14, 0, "Summoning Warriors of the Horde...")
            pUnit:RegisterEvent(OrcWarlock_DA, 1000, 1) -- Gul'dan Channel
            
    end
    
    function OrcWarlock_DA(pUnit, Event)
            pUnit:CastSpell(35996)
    end
    Not sure what's wrong with it, if anyone can help me correct it i'll + 4 rep :] Thanks.

    EDIT:

    Added new script, loads but doesn't work in game.
    Last edited by Pedregon; 03-15-2010 at 09:08 PM.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



    [Lua] Help
  2. #2
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why is there space after the comma that follows the spell you cast. And you can't have spaces in teh names of functions I believe. What errors do you get on start up?

  3. #3
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    scripts/Orc Warlock.lua:7: '<' expected near 'Warlock_Gul'
    Last edited by Pedregon; 03-15-2010 at 08:17 PM.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  4. #4
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The new script needs the function to be registered.

  5. #5
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please correctly tag your threads in the future or you will be infracted.

  6. #6
    Meiya Stormsinger's Avatar Contributor

    Reputation
    163
    Join Date
    Mar 2009
    Posts
    196
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SummonVisual = 35996

    function SummonDude_OnSpawn(Unit, event)
    Unit:RegisterEvent("FirstBuff",1000,1)
    Unit:RegisterEvent("Buff_Self",60000,0)
    end

    function FirstBuff(Unit, event)
    Unit:CastSpell(SummonVisual)
    end

    function Buff_Self(Unit, event)
    Unit:CastSpell(SummonVisual)
    end

    RegisterUnitEvent(17922,18,"SummonDude_OnSpawn")

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 08:13 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