I'm having trouble with lua and cant same to fix it. menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Bapes's Avatar Banned
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    124
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I'm having trouble with lua and cant same to fix it.

    I made this script but for some reason the boss doesn't do the script.


    Code:
    function Deathknight_Chain_Lightning(pUnit, event, miscpUnit, misc)
    	print "Deathknight_Chain_Lightning"
    	if pUnit:GetHealthPct() < 98 then
    	Unit:FullCastSpell(16033pUnit:GetMainTank())
    
    end
    
    function Deathknight_Caged(pUnit, event, miscpUnit, misc)
    	print "Deathknight_Caged"
    	Unit:CastSpell(40695pUnit:GetMainTank())
    
    end
    
    function Deathknight_Eye_Tentacle(pUnit, event, miscpUnit, misc)
    	print "Deathknight_Eye_Tentacle"
    	if pUnit:GetHealthPct() < 98 then
    	Unit:SpawnCreature(15726, -387.988586, 157.034363, 7.224352, 2.3, 21, 60000);
    
    end
    
    function Deathknight_Eye_Tentacle(pUnit, event, miscpUnit, misc)
    	print "Deathknight_Eye_Tentacle"
    	if pUnit:GetHealthPct() < 98 then
    	Unit:SpawnCreature(15726, -400.207825, 147.842346, 1.495826, 0.157, 21, 60000);
    
    end
    
    function Deathknight_EnterCombat(pUnit, Event)
    pUnit:SendChatMessage(5, 0, "You have defeated my companions!  Now you will die to my fury!")
    pUnit:PlaySoundToSet(11467)
    end
    
    function Deathknight_Holy_Fire(pUnit, event, miscpUnit, misc)
    	print "Deathknight_Holy_Fire"
    	pUnit:FullCastSpell(34109,pUnit:GetRandomPlayer())
    
    end
    
    function Deathknight_Repentance(pUnit, event, miscunit, misc)
    	print "Deathknight_Repentance"
    	pUnit:FullCastSpell(34109,Unit:GetClosestPlayer())
    
    end
    
    function Deathknight_OnCombat(pUnit, event, miscpUnit, misc)
    	pUnit:RegisterEvent("Deathknight_Chain_Lightning",40000, 999)
    	pUnit:RegisterEvent("Deathknight_Eye_Tentacle",80000, 999)
    	pUnit:RegisterEvent("Deathknight_Eye_Tentacle",80000, 999)
    	pUnit:RegisterEvent("Deathknight_Caged",120000, 999)
    	punit:RegisterEvent("Deathknight_Holy_Fire",160000,999)
    	punit:RegisterEvent("Deathknight_Repentance",200000,999)
    
    end
    
    function Deathknight_KilledTarget(pUnit, Event)
    pUnit:SendChatMessage(5, 0, "I told you that you would die to my fury!")
    
    end
    
    RegisterUnitEvent(11519, 1, "Deathknight_EnterCombat")
    RegisterUnitEvent(11519, 1, "Deathknight_KilledTarget")
    RegisterUnitEvent(11519,1,"Deathknight")

    I think the problem is I don't have lua scripting enabled but I don't know how to enable it.:confused:


    If you can help me I will give you +Rep

    Post here or send me a msg on aim: Bapesyo14
    or msn: [email protected]



    Thanks.

    I'm having trouble with lua and cant same to fix it.
  2. #2
    Bapes's Avatar Banned
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    124
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bump so someone can help =D

  3. #3
    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)
    In ascent-world.conf there's a line that enables LUA. Just search for LUA, you'll find it

    And that script has some errors

  4. #4
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use pUnit you use Uniit... i am gonna check this again later... its late i am off to bed ^^

  5. #5
    Bapes's Avatar Banned
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    124
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheSpidey View Post
    In ascent-world.conf there's a line that enables LUA. Just search for LUA, you'll find it

    And that script has some errors
    Can you point out the errors?

  6. #6
    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)
    Aside from the Unit / pUnit mixup,
    You assign 3 functions for one event.
    You have Deathknight_EnterCombat and Deathknight_OnCombat, you call the first but never the latter.

  7. #7
    Bapes's Avatar Banned
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    124
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, ok thank you I'll fix that.

Similar Threads

  1. Having trouble with the race to race conversion.
    By Civil009 in forum WoW ME Questions and Requests
    Replies: 8
    Last Post: 08-08-2008, 01:33 AM
  2. Having Trouble With Making Public
    By Lets See2 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 07-04-2008, 02:14 AM
  3. Replies: 2
    Last Post: 05-07-2008, 01:47 PM
  4. [Question]Having trouble with Database
    By dragonx7 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 02-27-2008, 09:16 PM
  5. [Help] My friend having trouble with his server...
    By Barlas the Death Knight in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 11-09-2007, 10:09 PM
All times are GMT -5. The time now is 02:01 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