lua problem menu

User Tag List

Thread: lua problem

Results 1 to 15 of 15
  1. #1
    thpthpthp's Avatar Contributor
    Reputation
    101
    Join Date
    Feb 2007
    Posts
    496
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    lua problem

    Edit: working now! thanks to everyone that helped me! =D
    Last edited by thpthpthp; 08-26-2008 at 05:51 PM.

    lua problem
  2. #2
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dont use
    '
    that should work*
    [/COLOR]

  3. #3
    thpthpthp's Avatar Contributor
    Reputation
    101
    Join Date
    Feb 2007
    Posts
    496
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks though when i took out the ' in Dragon's Breath now i get this error
    Code:
    03:45 Nn LuaEngine: Diablo.lua...
    failed. <could not load>
              scriptsDiablo.lua:13: '<' expected near 'breath'
    and i took out all the ' in the script
    got any ideas?

    PS: +2rep anyways

  4. #4
    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)
    Diablo_DragonsBreath

    Try not using Spaces in commands..

  5. #5
    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)
    Code:
    function Diablo_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "Not even death can save you from me!")
    Unit:RegisterEvent("Diablo_DragonsBreath", 12, 99)
    Unit:RegisterEvent("Diablo_FlameWave", 9000, 99)
    Unit:RegisterEvent("Diablo_Blastwave", 7000, 99)
    Unit:RegisterEvent("Diablo_CrystalPrison", 18000, 99)
    Unit:RegisterEvent("Diablo_ColdTouch", 17000, 99)
    Unit:RegisterEvent("Diablo_ConeofFire", 9000, 99)
    Unit:RegisterEvent("Diablo_RainofFire", 10000, 99)
    Unit:RegisterEvent("Diablo_StingerCharge", 17000, 99)
    end
    function Diablo_DragonsBreath(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(37289, pUnit:GetClosestPlayer()) 
    end
    function Diablo_ConeofFire(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(36876, pUnit:GetMainTank()) 
    end
    function Diablo_BlastWave(pUnit, Event) 
    pUnit:CastSpell(38536)
    end
    function Diablo_CrystalPrison(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(40846, pUnit:GetRandomPlayer(7)) 
    end
    function Diablo_ColdTouch(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(39230, pUnit:GetRandomPlayer(6)) 
    end
    function Diablo_RainofFire(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(42023, pUnit:GetRandomPlayer(5)) 
    end
    function Diablo_StingerCharge(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(26082, pUnit:GetRandomPlayer(4)) 
    end
     
    function diablo_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "arrrrahhg") 
    end
    
    function diable_LeaveCombat(Unit, event)
    Unit:RemoveEvents()
    end
     
    RegisterUnitEvent(55555, 1, "Diablo_OnCombat")
    RegisterUnitEvent(55555, 2, "_OnLeaveCombat")
    RegisterUnitEvent(55555, 4, "Diablo_OnDied")

    Now I've modified it.
    Keep up the work man!

    ~~ Babbaa

  6. #6
    thpthpthp's Avatar Contributor
    Reputation
    101
    Join Date
    Feb 2007
    Posts
    496
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a ton you two +rep you both =)

    edit: i used the modified version and now I'm getting another error in arcemu-world.exe

    Code:
     "19:09 N LuaEngine: Diablo.lua...
    failed. <could not load>
             scriptsDiablo.lua:2: '<name>' expected neat 'function' "
    this script just doesn't want to work -_-
    Last edited by thpthpthp; 08-23-2008 at 11:27 PM.

  7. #7
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RegisterUnitEvent(55555, 2, "_OnLeaveCombat")
    as a start, it should be Diable_OnLeaveCombat
    [/COLOR]

  8. #8
    Myzt's Avatar Member
    Reputation
    10
    Join Date
    Jun 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have mixed pUnit and Unit all over the script, I would edit all "Unit" to "pUnit" , that will work.

    Also if you want the RegisterEvent command to continue forever, you could put 0 instead of 99. Unless you don't want it to go on for 99 times only

    Hope it helped.
    - Myzt

  9. #9
    thpthpthp's Avatar Contributor
    Reputation
    101
    Join Date
    Feb 2007
    Posts
    496
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tryed what you both said but its still is giveing me

    "19:09 N LuaEngine: Diablo.lua...
    failed. <could not load>
    scriptsDiablo.lua:2: '<name>' expected neat 'function' "

    is there just a problem with my server?

  10. #10
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    answered you in the request tread.. hope that will make it work
    [/COLOR]

  11. #11
    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)
    Heres the version of the script im using.. Sorry i changed a few spells quickly earlier today cause he was doing 7k with one of them LOl
    Code:
    function Diablo_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "Not even death can save you from me!")
    Unit:RegisterEvent("Diablo_DragonsBreath", 12, 99)
    Unit:RegisterEvent("Diablo_FlameWave", 9000, 99)
    Unit:RegisterEvent("Diablo_Blastwave", 7000, 99)
    Unit:RegisterEvent("Diablo_CrystalPrison", 18000, 99)
    Unit:RegisterEvent("Diablo_ColdTouch", 17000, 99)
    Unit:RegisterEvent("Diablo_ConeofFire", 9000, 99)
    Unit:RegisterEvent("Diablo_RainofFire", 10000, 99)
    Unit:RegisterEvent("Diablo_StingerCharge", 17000, 99)
    end
    function Diablo_DragonsBreath(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(37289, pUnit:GetClosestPlayer()) 
    end
    function Diablo_ConeofFire(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(10854, pUnit:GetMainTank()) 
    end
    function Diablo_BlastWave(pUnit, Event) 
    pUnit:CastSpell(42023)
    end
    function Diablo_CrystalPrison(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(40846, pUnit:GetRandomPlayer(7)) 
    end
    function Diablo_ColdTouch(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(39230, pUnit:GetRandomPlayer(6)) 
    end
    function Diablo_RainofFire(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(42023, pUnit:GetRandomPlayer(5)) 
    end
    function Diablo_StingerCharge(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(26082, pUnit:GetRandomPlayer(4)) 
    end
     
    function diablo_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "Fear me.....") 
    end
    
    function diablo_onLeaveCombat(Unit, event)
    Unit:RemoveEvents()
    end
     
    RegisterUnitEvent(95122, 1, "Diablo_OnCombat")
    RegisterUnitEvent(95122, 2, "diablo_OnLeaveCombat")
    RegisterUnitEvent(95122, 4, "diablo_OnDied")
    For me it loads up and works just fine..

  12. #12
    thpthpthp's Avatar Contributor
    Reputation
    101
    Join Date
    Feb 2007
    Posts
    496
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kreegoth View Post
    Heres the version of the script im using.. Sorry i changed a few spells quickly earlier today cause he was doing 7k with one of them LOl
    Code:
    function Diablo_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "Not even death can save you from me!")
    Unit:RegisterEvent("Diablo_DragonsBreath", 12, 99)
    Unit:RegisterEvent("Diablo_FlameWave", 9000, 99)
    Unit:RegisterEvent("Diablo_Blastwave", 7000, 99)
    Unit:RegisterEvent("Diablo_CrystalPrison", 18000, 99)
    Unit:RegisterEvent("Diablo_ColdTouch", 17000, 99)
    Unit:RegisterEvent("Diablo_ConeofFire", 9000, 99)
    Unit:RegisterEvent("Diablo_RainofFire", 10000, 99)
    Unit:RegisterEvent("Diablo_StingerCharge", 17000, 99)
    end
    function Diablo_DragonsBreath(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(37289, pUnit:GetClosestPlayer()) 
    end
    function Diablo_ConeofFire(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(10854, pUnit:GetMainTank()) 
    end
    function Diablo_BlastWave(pUnit, Event) 
    pUnit:CastSpell(42023)
    end
    function Diablo_CrystalPrison(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(40846, pUnit:GetRandomPlayer(7)) 
    end
    function Diablo_ColdTouch(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(39230, pUnit:GetRandomPlayer(6)) 
    end
    function Diablo_RainofFire(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(42023, pUnit:GetRandomPlayer(5)) 
    end
    function Diablo_StingerCharge(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(26082, pUnit:GetRandomPlayer(4)) 
    end
     
    function diablo_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "Fear me.....") 
    end
     
    function diablo_onLeaveCombat(Unit, event)
    Unit:RemoveEvents()
    end
     
    RegisterUnitEvent(95122, 1, "Diablo_OnCombat")
    RegisterUnitEvent(95122, 2, "diablo_OnLeaveCombat")
    RegisterUnitEvent(95122, 4, "diablo_OnDied")
    For me it loads up and works just fine..
    well im not geting any errors though he dousent seem to say anything or cast anything =P
    im wondering if its just a problem with my server

  13. #13
    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)
    Maybe your Version doesnt support Lua++? what rev are you using... ALso note that i changed the NPC ID in mine to 95122?

  14. #14
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm.. the script u have got a problem with getmaintank.. only on some servers that work (only a few).. maybe you should chose something else
    [/COLOR]

  15. #15
    thpthpthp's Avatar Contributor
    Reputation
    101
    Join Date
    Feb 2007
    Posts
    496
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    got it working now thanks for the help will rep you when i can (gave out to much already -_-)

Similar Threads

  1. Lua problem
    By Minichili in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 04-14-2008, 09:45 AM
  2. [Help] Lua problem
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-23-2008, 04:34 AM
  3. lua problem
    By *Alexz* in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 02-14-2008, 10:41 PM
  4. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  5. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
All times are GMT -5. The time now is 05:53 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