Lua Scripting error menu

User Tag List

Results 1 to 1 of 1
  1. #1
    adrion's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua Scripting error

    I have created a script for a custom npc (40000 ID but he is basicaly a death knight captain with his name changed.Here is the script:

    Code:
    function DeathKnightCommander_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 7, "We will never give up.We are The Scourge!")
    Unit:RegisterEvent("DeathKnightCommander_UnholyPresence", 1000, 1)
    Unit:RegisterEvent("DeathKnightCommander_BloodStrike", 7000, 20)
    Unit:RegisterEvent("DeathKnightCommander_PlagueStrike", 10000, 20)
    Unit:RegisterEvent("DeathKnightCommander_BloodPlague", 10000, 20)
    Unit:RegisterEvent("DeathKnightCommander_Enrage", 1000, 1)
    end
    
    function DeathKnightCommander_UnholyPresence(pUnit, Event)
    pUnit:CastSpell(55222)
    end
    
    function DeathKnightCommander_BloodStrike(Unit, Event)
    Unit:FullCastSpellOnTarget(52377, Unit:GetRandomPlayer())
    end
    
    function DeathKnightCommander_PlagueStrike(Unit, Event)
    Unit:FullCastSpellOnTarget(61600, Unit:GetMainTank())
    end
    
    if Unit:FullCastSpellOnTarget(61600, Unit:GetMainTank()) then
    function DeathKnightCommander_BloodPlague(Unit, Event)
    Unit:FullCastSpellOnTarget(57601, Unit:GetMainTank())
    end
    end
    
    function DeathKnightCommander_Enrage(pUnit, Event)
    if Unit:GetHealthPct() <=10 then
    pUnit:CastSpell(42705)
    end
    end
    
    function DeathKnightCommander_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    
    function DeathKnightCommander_OnKilledTarget(Unit, Event)
    Unit:SendChatMessage(12, 7, "Another win for the Scourge!")
    end
    
    function DeathKnightCommander_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    
    
    RegisterUnitEvent(40000, 1, "DeathKnightCommander_OnCombat")
    RegisterUnitEvent(40000, 2, "DeathKnightCommander_OnLeaveCombat")
    RegisterUnitEvent(40000, 3, "DeathKnightCommander_OnKilledTarget")
    RegisterUnitEvent(40000, 4, "DeathKnightCommander_OnDied")
    so i scripted him that after 7 seconds after he enter combat to do Blood strike.But after 7 seconds he is restarting his hp is going to full and he is going back to spawning location.So basicaly after 7 seconds instead of doing blood strike he is reseting. What did i have done wrong? pls someone help me.

    Lua Scripting error

Similar Threads

  1. Lua script error
    By rygarok in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 02-09-2010, 11:35 AM
  2. LUA script error
    By flameworker in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 04-13-2009, 05:16 AM
  3. LUA script error :(
    By lilbdiablo12 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-29-2008, 07:45 PM
  4. LUA Script Error, Help would be appreciated!
    By pachuco55 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 06-20-2008, 06:03 PM
  5. [Help me] Lua script error? please help.
    By Szharz in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-22-2008, 12:20 PM
All times are GMT -5. The time now is 10:19 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