Lua Script Problem menu

User Tag List

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

    Lua Script Problem

    Ok, I am still a bit rusty on lua scripting but I used a tutorial to help out with this one and it still doesn't work.

    The error is as follows, usually can fix those but it doesn't want to -
    <eof>' expected near 'end'

    function ElderBloodhoof_Define(Unit, Event)
    ElderBloodhoof = Unit
    end

    function ElderBladesing_Define(Unit, Event)
    ElderBladesing = Unit
    ElderBladesing:RegisterEvent("ElderBladesing_Channel", 10000, 1)
    end

    function ElderBladesing_Channel(Unit, Event)
    Elder Bladesing:FullCastSpellOnTarget(47257, ElderBloodhoof)
    end
    end

    RegisterUnitEvent(15599, 18, "ElderBladesing_Define)
    RegisterUnitEvent(15575, 18, "ElderBloodhoof_Define")

    Thanks in advance

    Lua Script Problem
  2. #2
    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)
    function ElderBladesing_Channel(Unit, Event)
    Elder Bladesing:FullCastSpellOnTarget(47257, ElderBloodhoof)
    end
    end

    You have 2 ends when you only need 1 end.

  3. #3
    Kaikau's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function ElderBloodhoof_Define(Unit, Event)
    ElderBloodhoof = Unit
    end

    function ElderBladesing_Define(Unit, Event)
    ElderBladesing = Unit
    ElderBladesing:RegisterEvent("ElderBladesing_Channel", 10000, 1)
    end

    function ElderBladesing_Channel(Unit, Event)
    Elder Bladesing:FullCastSpellOnTarget(47257, ElderBloodhoof)
    end

    RegisterUnitEvent(15599, 18, "ElderBladesing_Define)
    RegisterUnitEvent(15575, 18, "ElderBloodhoof_Define")

    Tired that, however it still is <eof>' expected near 'end'

  4. #4
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function ElderBloodhoof_Define(Unit, Event)
    ElderBloodhoof = Unit
    end
    
    function ElderBladesing_Define(Unit, Event)
    ElderBladesing = Unit
    ElderBladesing:RegisterEvent("ElderBladesing_Channel", 10000, 1)
    end
    
    function ElderBladesing_Channel(Unit, Event)
    Elder Bladesing:FullCastSpellOnTarget(47257, ElderBloodhoof)
    end
    
    RegisterUnitEvent(15599, 18, "ElderBladesing_Define)
    RegisterUnitEvent(15575, 18, "ElderBloodhoof_Define")
    Try taking the space out of "Elder Bladesing". (Highlighted in red).

  5. #5
    Kaikau's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated:

    Code:
    function ElderBloodhoof_Define(Unit, Event)
    ElderBloodhoof = Unit
    end
    
    function ElderBladesing_Define(Unit, Event)
    ElderBladesing = Unit
    ElderBladesing:RegisterEvent("ElderBladesing_Channel", 10000, 1)
    end
    
    function ElderBladesing_Channel(Unit, Event)
    ElderBladesing:FullCastSpellOnTarget(47257, ElderBloodhoof)
    end
    
    RegisterUnitEvent(15599, 18, "ElderBladesing_Define")
    RegisterUnitEvent(15575, 18, "ElderBloodhoof_Define")
    Still doesn't work, has the same error

  6. #6
    kreegoth's Avatar Contributor
    Reputation
    122
    Join Date
    Jun 2008
    Posts
    810
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this the entire script? or is there more you just didnt post?

    What is the actual point of this script to make one NPC cast a spell on another?

    If so wouldnt it be simpler to say
    Code:
    Local BLADEHOOF = 15575
    Local BLADESING = 15599
    
    function BLADESING_Channel (Unit, Event)
    BLADESING:FullCastSpellOnTarget (47257. BLADEHOOF) //You may try like the getnearestfriend() type command here or something.. Cant remember exactly what its called atm.
    end
    
    (RegisterUnitEvent (BLADESING, 18, "function BLADESING_Channel")
    Or maybe if the mobs are very close to eachother you could use a Getclosestfriendl() type script.

Similar Threads

  1. LUA script problem, teleporter.
    By Romis in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 12-02-2008, 04:32 PM
  2. LUA script problem
    By uberhak3r in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 07-09-2008, 06:32 PM
  3. [Help] Fairly large Lua script problem
    By Muruk in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-16-2008, 09:03 PM
  4. LUA Scripting Problem
    By Knife in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 03-10-2008, 02:00 PM
  5. Lua scripts problem
    By Mr.Ice.Cold in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-02-2008, 11:44 AM
All times are GMT -5. The time now is 01:30 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