[Help] LUA Script menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    [Help] LUA Script

    Hi all who are here :wave:

    I want to thank you for spending your precious time helping little old me

    Anyway basicly my LUA script is not working and i seriosly don't know why =P

    Error in console:scripts\zombie king.lua:60: 'end' expected <to close 'function' at line 26> near '<eof>'

    The script it's self:
    Code:
    function zombie_CheckA(Unit)
     if Unit:GetHealthPct() < 92 then
                     Unit:FullCastSpellOnTarget(37852, Unit:GetMainTank())
     end
    end
    function zombie_CheckB(Unit)
     if Unit:GetHealthPct() < 65 then
                     Unit:FullCastSpell(40647)
                     Unit:CastSpell(36455)
     end
    end
    function zombie_CheckC(Unit)
     if Unit:GetHealthPct() < 55 then
                     Unit:FullCastSpellOnTarget(45664, Unit:GetMainTank())
                     Unit:FullCastSpell(40100)
    end
    function zombie_CheckD(Unit)
     if Unit:GetHealthPct() < 45 then
                     Unit:FullCastSpell(42696)
                     Unit:CastSpell(29491)
    end
    function zombie_CheckE(Unit)
                 if Unit:GetHealthPct() < 10 then
                    Unit:CastSpell(40846)
                    Unit:SendChatMessage(15, 0, "Your good. But your not killing me i'm afraid.")
                    Unit:SendBroadcastMessage("The best person in the game is now Wiping the people trying to kill him.")
                    Unit:RegisterEvent("zombie_CheckF",1000, 0)
    end
    function zombie_CheckF(Unit)
                     Unit:FullCastSpellOnTarget(31984, Unit:GetClosestPlayer())
    end                
    function zombie_OnCombat(Unit, Event)
     Unit:RegisterEvent("zombie_CheckA",0, 0)
     Unit:RegisterEvent("zombie_CheckB",0, 0)
     Unit:RegisterEvent("zombie_CheckC",0, 0)
     Unit:RegisterEvent("zombie_CheckD",0, 0)
                  Unit:RegisterEvent("zombie_CheckE",0, 0)
    end
    function zombie_OnLeaveCombat(Unit)
     Unit:RemoveEvents()
    end
    function zombie_KilledTarget(Unit)
    end
    function zombie_OnDied(Unit)
            Unit:RemoveEvents()
    end
    RegisterUnitEvent(1111111, 1, "zombie_OnCombat")
    RegisterUnitEvent(1111111, 2, "zombie_OnLeaveCombat")
    RegisterUnitEvent(1111111, 3, "zombie_OnKilledTarget")
    RegisterUnitEvent(1111111, 4, "zombie_OnDied")
    + Rep to whoever can help me with this!

    [Help] LUA Script
  2. #2
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do you use the LUA Script Generator ?

  3. #3
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    No i did this from scratch by hand

  4. #4
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool, well if its only the line 26 its must ony be
    Unit:SendBroadcastMessage("The best person in the game is now Wiping the people trying to kill him.")
    and i dont see any near '<eof> :S

  5. #5
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    i deleted that whole line but i'm getting exactly the same error =/
    what could be causing it =s
    Last edited by stoneharry; 04-27-2008 at 04:00 PM.

  6. #6
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm, maybe the

    end
    end you got ?

  7. #7
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Yeah it probably should be just 1 end XD i never got that, lol... i'll put them all to one end hang on

    Edit: Now it's : scripts\zombie king.lua:57: 'end' expected <to close 'function' at line 24> near '<eof>'

  8. #8
    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)
    <eof> is end of file.
    You forgot to close the function here:
    Code:
    function zombie_CheckC(Unit)
     if Unit:GetHealthPct() < 55 then
                     Unit:FullCastSpellOnTarget(45664, Unit:GetMainTank())
                     Unit:FullCastSpell(40100)
    end

  9. #9
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay i got it

  10. #10
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function zombie_CheckA(Unit)
     if Unit:GetHealthPct() < 92 then
                     Unit:FullCastSpellOnTarget(37852, Unit:GetMainTank())
     
    end
    end
    function zombie_CheckB(Unit)
     if Unit:GetHealthPct() < 65 then
                     Unit:FullCastSpell(40647)
                     Unit:CastSpell(36455)
     end
    end
    function zombie_CheckC(Unit)
     if Unit:GetHealthPct() < 55 then
                     Unit:FullCastSpellOnTarget(45664, Unit:GetMainTank())
                     Unit:FullCastSpell(40100)
    end
    end
    
    function zombie_CheckD(Unit)
     if Unit:GetHealthPct() < 45 then
                     Unit:FullCastSpell(42696)
                     Unit:CastSpell(29491)
    end
    
    function zombie_CheckE(Unit)
                 if Unit:GetHealthPct() < 10 then
                    Unit:CastSpell(40846)
                    Unit:SendChatMessage(15, 0, "Your good. But your not killing me i'm afraid.")
                    Unit:SendBroadcastMessage("The best person in the game is now Wiping the people trying to kill him.")
                    Unit:RegisterEvent("zombie_CheckF",1000, 0)
    end
    end
    
    function zombie_CheckF(Unit)
                     Unit:FullCastSpellOnTarget(31984, Unit:GetClosestPlayer())
    end
    end                
    function zombie_OnCombat(Unit, Event)
     Unit:RegisterEvent("zombie_CheckA",0, 0)
     Unit:RegisterEvent("zombie_CheckB",0, 0)
     Unit:RegisterEvent("zombie_CheckC",0, 0)
     Unit:RegisterEvent("zombie_CheckD",0, 0)
                  Unit:RegisterEvent("zombie_CheckE",0, 0)
    end
    function zombie_OnLeaveCombat(Unit)
     Unit:RemoveEvents()
    end
    function zombie_KilledTarget(Unit)
    end
    function zombie_OnDied(Unit)
            Unit:RemoveEvents()
    end
    RegisterUnitEvent(1111111, 1, "zombie_OnCombat")
    RegisterUnitEvent(1111111, 2, "zombie_OnLeaveCombat")
    RegisterUnitEvent(1111111, 3, "zombie_OnKilledTarget")
    RegisterUnitEvent(1111111, 4, "zombie_OnDied")
    try that one too

  11. #11
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -.- lol

  12. #12
    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)
    Originally Posted by Owned Emu View Post
    Code:
    function zombie_CheckA(Unit)
     if Unit:GetHealthPct() < 92 then
                     Unit:FullCastSpellOnTarget(37852, Unit:GetMainTank())
     
    end
    end
    function zombie_CheckB(Unit)
     if Unit:GetHealthPct() < 65 then
                     Unit:FullCastSpell(40647)
                     Unit:CastSpell(36455)
     end
    end
    function zombie_CheckC(Unit)
     if Unit:GetHealthPct() < 55 then
                     Unit:FullCastSpellOnTarget(45664, Unit:GetMainTank())
                     Unit:FullCastSpell(40100)
    end
    end
    
    function zombie_CheckD(Unit)
     if Unit:GetHealthPct() < 45 then
                     Unit:FullCastSpell(42696)
                     Unit:CastSpell(29491)
    end
    
    function zombie_CheckE(Unit)
                 if Unit:GetHealthPct() < 10 then
                    Unit:CastSpell(40846)
                    Unit:SendChatMessage(15, 0, "Your good. But your not killing me i'm afraid.")
                    Unit:SendBroadcastMessage("The best person in the game is now Wiping the people trying to kill him.")
                    Unit:RegisterEvent("zombie_CheckF",1000, 0)
    end
    end
    
    function zombie_CheckF(Unit)
                     Unit:FullCastSpellOnTarget(31984, Unit:GetClosestPlayer())
    end
    end                
    function zombie_OnCombat(Unit, Event)
     Unit:RegisterEvent("zombie_CheckA",0, 0)
     Unit:RegisterEvent("zombie_CheckB",0, 0)
     Unit:RegisterEvent("zombie_CheckC",0, 0)
     Unit:RegisterEvent("zombie_CheckD",0, 0)
                  Unit:RegisterEvent("zombie_CheckE",0, 0)
    end
    function zombie_OnLeaveCombat(Unit)
     Unit:RemoveEvents()
    end
    function zombie_KilledTarget(Unit)
    end
    function zombie_OnDied(Unit)
            Unit:RemoveEvents()
    end
    RegisterUnitEvent(1111111, 1, "zombie_OnCombat")
    RegisterUnitEvent(1111111, 2, "zombie_OnLeaveCombat")
    RegisterUnitEvent(1111111, 3, "zombie_OnKilledTarget")
    RegisterUnitEvent(1111111, 4, "zombie_OnDied")
    try that one too
    Come on.
    Code:
    function zombie_CheckD(Unit)
     if Unit:GetHealthPct() < 45 then
                     Unit:FullCastSpell(42696)
                     Unit:CastSpell(29491)
    end

  13. #13
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    w00t ty that works Thanks very much for helping, i'll rep both of you but one a day so one of you will have to wait a day =p

  14. #14
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheSpidey View Post
    Come on.
    Code:
    function zombie_CheckD(Unit)
     if Unit:GetHealthPct() < 45 then
                     Unit:FullCastSpell(42696)
                     Unit:CastSpell(29491)
    end
    xD hehe :P

  15. #15
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    w00t ty that works Thanks very much for helping, i'll rep both of you but one a day so one of you will have to wait a day =p
    No Problem We are here to help

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] LUA script check it please
    By Strupantwn in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 06-09-2008, 12:52 PM
  2. Help lua scripts
    By juaking2 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-23-2008, 07:39 PM
  3. /Help/Lua Script i think
    By luddo9 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-25-2008, 01:50 PM
  4. [Help] Lua Script Not Working
    By Muruk in forum World of Warcraft Emulator Servers
    Replies: 26
    Last Post: 03-16-2008, 02:13 PM
  5. [Help] LUA Script + GO info
    By Hellgawd in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-12-2008, 05:06 AM
All times are GMT -5. The time now is 03:51 AM. 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