Lua problem :( menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Warriar's Avatar Active Member
    Reputation
    31
    Join Date
    May 2009
    Posts
    149
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua problem :(

    Well erm I was making a lua and When I put it in the scripts folder It just doesn't load, I go ingame and spawn the npc and it just sits there attacking, Anyone know why? Heres the LUA

    Code:
    function Xenon_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Power, My Men are Addicted to it, It took us months to rebuild this corrupt nation, But I have done it, Haven't I? I will not let you cleanse these lost souls, They are mine! And I vow to take over Azeroth with them!")
    pUnit:RemoveEvents()
    pUnit:RegisterEvent("xPhase_1", 100, 0)
    end
    
    function Xenon_OnDied(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "My legacy .. Will run on .. For this is just the begginning of the end! My people will rise, I assure you that!")
    pUnit:RemoveEvents()
    end
    
    function Xenon_OnLeaveCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Worthless .. All of you!")
    pUnit:RemoveEvents()
    end
    
    function xPhase_1(pUnit, Event)
    if pUnit:GetHealthPct() <= 95 then
    pUnit:SendChatMessage(14, 0, "I'll deal with you maggots myself!")
    pUnit:RemoveEvents()
    pUnit:RegisterEvent("quanstrike", 100, 1) 
    pUnit:RegisterEvent("quanstrike", 10000, 0) 
    pUnit:RegisterEvent("cosmicsmash", 15000, 0) 
    pUnit:RegisterEvent("stormbolt", 11000, 0) 
    pUnit:RegisterEvent("groundtremor", 16000, 0) 
    pUnit:RegisterEvent("unstableenergy", 20000, 0) 
    pUnit:RegisterEvent("lighteninglash", 15000, 0) 
    pUnit:RegisterEvent("scorch", 16000, 0) 
    pUnit:RegisterEvent("xphase_2, 100, 0)
    end
    end
    
    function xphase_2(pUnit, Event)
    if pUnit:GetHealthPct() <= 40 then
    pUnit:SendChatMessage(14, 0, "Come my Minions!, Show these maggots what I can do!")
    pUnit:RegisterEvent("quanstrike", 10000, 0)
    pUnit:RegisterEvent("xphase_3", 100 ,0)
    x = pUnit:GetX()
    y = pUnit:GetY()
    z = pUnit:GetZ()
    o = pUnit:GetO()
    pUnit:SpawnCreature(77746, x, y+2, z, o, 14, 12000000000)
    pUnit:SpawnCreature(77746, x, y+2, z, o, 14, 12000000000)
    pUnit:SpawnCreature(77746, x, y+2, z, o, 14, 12000000000)
    end
    end
    
    function xphase_3(pUnit, Event)
    if pUnit:GetHealthPct() <= 20 then
    pUnit:SendChatMessage(14, 0, "The Power Surges Within!")
    pUnit:RemoveEvents()
    pUnit:RegisterEvent("enrage", 100, 1)
    pUnit:RegisterEvent("quanstrike", 100, 1) 
    pUnit:RegisterEvent("quanstrike", 10000, 0)
    pUnit:RegisterEvent("scorch", 24000, 0)
    pUnit:RegisterEvent("xphase_4", 100, 0)
    end
    end
    
    function xphase_4(pUnit, Event)
    if pUnit:GetHealthPct() <= 4 then
    pUnit:SendChatMessage(14, 0, "I cannot die! I am immortal!, Wait ... What is this? What is happening!")
    pUnit:RemoveEvents()
    pUnit:RegisterEvent("immortal", 100, 1)
    pUnit:SpawnCreature(77748, x, y+2, z, o, 14, 35000)
    pUnit:SpawnCreature(77772, x, y+2, z, o, 14, 35000)
    end
    end
    
    function quanstrike(pUnit, Event)
    pUnit:FullCastSpellOnTarget(64592, pUnit:GetMainTank())
    end
    
    function cosmicsmash(pUnit, Event)
    pUnit:CastSpell(62311)
    end
    
    function stormbolt(pUnit, Event)
    pUnit:CastSpell(64649, pUnit:GetRandomPlayer(0))
    end
    
    function groundtremor(pUnit, Event)
    pUnit:CastSpell(62437)
    end
    
    function unstableenergy(pUnit, Event)
    pUnit:FullCastSpellOnTarget(62451, pUnit:GetRandomPlayer(0))
    end
    
    function lighteninglash(pUnit, Event)
    pUnit:FullCastSpellOnTarget(62648, pUnit:GetRandomPlayer(0))
    end
    
    function scorch(pUnit, Event)
    pUnit:CastSpell(62546)
    end
    
    function enrage(pUnit, Event)
    pUnit:CastSpell(41447)
    end
    
    function immortal(pUnit, Event)
    pUnit:CastSpell(13874)
    end
    
    RegisterUnitEvent(77753, 1, "Xenon_OnCombat")
    RegisterUnitEvent(77753, 2, "Xenon_OnLeaveCombat")
    RegisterUnitEvent(77753, 4, "Xenon_OnDied")

    Lua problem :(

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 07:20 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