Noob LUA script, need some help. menu

Shout-Out

User Tag List

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

    Noob LUA script, need some help.

    Code:
    function Kil'Jaeden_OnCombat(unit)
    unit:SendChatMessage(12, 0, "All my plans have lead to this.")
    unit:PlaySoundToSet (12495)
    end
    
    function Kil'Jaeden_OnLeaveCombat(unit)
    RemoveEvents()
    end
    
    function Kil'Jaeden_OnKilledTarget(unit)
    unit:SendChatMessage(12, 0, "Another step towards chaos!")
    unit:PlaySoundToSet (12501)
    end
    
    function Kil'Jaeden_OnDied(unit)
    unit:SendChatMessage(12, 0, "Uggh.. the powers of the Sunwell turned against me... What have you done? What have you done?!")
    unit:PlaySoundToSet (12510)
    RemoveEvents()
    end
    
    
    RegisterUnitEvent(25315, 1, "Kil'Jaeden_OnCombat")
    RegisterUnitEvent(25315, 2, "Kil'Jaeden_OnLeaveCombat")
    RegisterUnitEvent(25315, 3, "Kil'Jaeden_OnKilledTarget")
    RegisterUnitEvent(25315, 4, "Kil'Jaeden_OnDied")
    I get errors when I try to run this, can anyone fix it for me and tell me what was wrong? Thanks.

    Noob LUA script, need some help.
  2. #2
    doublehex's Avatar Member
    Reputation
    34
    Join Date
    Mar 2007
    Posts
    385
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you say what the errors are?


  3. #3
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function Kil'Jaeden_OnLeaveCombat(unit)
    RemoveEvents()
    end

    This is where your error is at. U need unit:RemoveEvents()

    Also on your whole script at the end of every Function you just put (unit) You need to put (unit, Event) When you do this. It should work

    DA Gift From Mr. Blain

  4. #4
    pancakebuddy's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Juicyz View Post
    function Kil'Jaeden_OnLeaveCombat(unit)
    RemoveEvents()
    end

    This is where your error is at. U need unit:RemoveEvents()

    Also on your whole script at the end of every Function you just put (unit) You need to put (unit, Event) When you do this. It should work
    I did all that, and still get an error.

    Here is the new one.

    Code:
    function Kil'Jaeden_OnCombat(unit, Event)
    unit:SendChatMessage(12, 0, "All my plans have lead to this.")
    unit:PlaySoundToSet (12495)
    end
    
    function Kil'Jaeden_OnLeaveCombat(unit, Event)
    unit:RemoveEvents()
    end
    
    function Kil'Jaeden_OnKilledTarget(unit, Event)
    unit:SendChatMessage(12, 0, "Another step towards chaos!")
    unit:PlaySoundToSet (12501)
    end
    
    function Kil'Jaeden_OnDied(unit, Event)
    unit:SendChatMessage(12, 0, "Uggh.. the powers of the Sunwell turned against me... What have you done? What have you done?!")
    unit:PlaySoundToSet (12510)
    unit:RemoveEvents()
    end
    
    
    RegisterUnitEvent(25315, 1, "Kil'Jaeden_OnCombat")
    RegisterUnitEvent(25315, 2, "Kil'Jaeden_OnLeaveCombat")
    RegisterUnitEvent(25315, 3, "Kil'Jaeden_OnKilledTarget")
    RegisterUnitEvent(25315, 4, "Kil'Jaeden_OnDied")

    The error says:

    21:36 N LuaEngine: Kil'Jaeden.lua...
    failed. (could not load)
    scripts\Kil'Jaeden.lua:1: unfinished string near ''Jaeden_OnCombat(unit,
    Event)'

  5. #5
    Mr.Ice.Cold's Avatar Active Member
    Reputation
    26
    Join Date
    Apr 2007
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try taking out the ' in kil'jaeden and where ever else you put it.

    try this...

    function KilJaeden_OnCombat(unit, Event)
    unit:SendChatMessage(12, 0, "All my plans have lead to this.")
    unit:PlaySoundToSet (12495)
    end

    function KilJaeden_OnLeaveCombat(unit, Event)
    unit:RemoveEvents()
    end

    function KilJaeden_OnKilledTarget(unit, Event)
    unit:SendChatMessage(12, 0, "Another step towards chaos!")
    unit:PlaySoundToSet (12501)
    end

    function KilJaeden_OnDied(unit, Event)
    unit:SendChatMessage(12, 0, "Uggh.. the powers of the Sunwell turned against me... What have you done? What have you done?!")
    unit:PlaySoundToSet (12510)
    unit:RemoveEvents()
    end


    RegisterUnitEvent(25315, 1, "KilJaeden_OnCombat")
    RegisterUnitEvent(25315, 2, "KilJaeden_OnLeaveCombat")
    RegisterUnitEvent(25315, 3, "KilJaeden_OnKilledTarget")
    RegisterUnitEvent(25315, 4, "KilJaeden_OnDied")

  6. #6
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep it looks like the problems were with the 's in his name^^ try taking them out

    <3 MysterioussouL for the sig

Similar Threads

  1. Need some help with unlocked LUA scripting (UnitBuff)
    By ownedpandas in forum WoW UI, Macros and Talent Specs
    Replies: 0
    Last Post: 10-13-2016, 10:55 AM
  2. [Lua Script] A EXP Differential script, Need some help.
    By sgtmas2006 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 07-26-2010, 06:04 PM
  3. [Lua Script] Need some help with my lua script
    By riizu in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 07-13-2010, 01:40 AM
  4. Need some help with LUA script
    By SupernovaHH in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 07-22-2009, 07:25 AM
  5. [Request] I need some help with lua script (boss on death)
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-03-2008, 03:47 PM
All times are GMT -5. The time now is 08:19 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