Another lua problem :P menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Another lua problem :P

    Hey guys Im here again with another LUA problem:

    Code:
    function Shadowclaw_OnCombat(Unit, Event) 
    Unit:SendChatMessage(11, 0, "I shall kill you!")
    Unit:RegisterEvent("Shadowclaw_FireBlow", 50000, 0)
    Unit:RegisterEvent("Shadowclaw_MortalStrike", 30000, 0)
    Unit:RegisterEvent("Shadowclaw_TailSlash", 20000, 0)
    Unit:RegisterEvent("Shadowclaw_Pound", 45000, 0)
    Unit:RegisterEvent("Shadowclaw_Stun", 25000, 0)
    Unit:RegisterEvent("Shadowclaw_Armageddon", 120000, 1)
    Unit:RegisterEvent("Shadowclaw_EvilForm",1000,0)
    Unit:RegisterEvent("Shadowclaw_LastForm",1000,0)
    end
    
    function Shadowclaw_FireBlow(pUnit, Event) 
    pUnit:CastSpell(43140, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_MortalStrike(pUnit, Event) 
    pUnit:CastSpell(39595, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_TailSlash(pUnit, Event) 
    pUnit:CastSpell(38737, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_Pound(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(34162, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_Stun(pUnit, Event) 
    pUnit:CastSpell(42435, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_Armageddon(pUnit, Event) 
    pUnit:CastSpell(45915, pUnit:GetRandomPlayer(4)) 
    end
    
    function Shadowclaw_Bomb(pUnit, Event) 
    pUnit:CastSpell(40332, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_HellBurn(pUnit, Event) 
    pUnit:CastSpell(46218, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_ForceShield(pUnit, Event) 
    pUnit:CastSpell(20620, ) 
    end
    
    function Shadowclaw_ShadowPain(pUnit, Event) 
    pUnit:CastSpell(40871, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_EvilForm(pUnit, Event) 
    if pUnit:GetHealthPct() < 50 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:SetModel(15366)
    pUnit:RegisterEvent("Shadowclaw_Hell_Burn", 25000, 0)
    Unit:RegisterEvent("Shadowclaw_Last_Form",1000,0)
    end 
    end
    
    function Shadowclaw_LastForm(pUnit, Event) 
    if pUnit:GetHealthPct() < 10 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:SetModel(15366)
    pUnit:RegisterEvent("Shadowclaw_Force_Shield", 1, 1)
    end 
    end
    
    function Shadowclaw_OnLeaveCombat(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "Is there someone strong enough to defeat me??") 
    end
    
    function Shadowclaw_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "It cant be! I am ..... dead") 
    end
    
    function Shadowclaw_OnKilledTarget(Unit, Event) 
    Unit:SendChatMessage(11, 0, "Good trip to HELL!") 
    end
    
    RegisterUnitEvent(56675, 1, "Shadowclaw_OnCombat")
    RegisterUnitEvent(56675, 2, "Shadowclaw_OnLeaveCombat")
    RegisterUnitEvent(56675, 3, "Shadowclaw_OnKilledTarget")
    RegisterUnitEvent(56675, 4, "Shadowclaw_OnDied")

    Whats wrong with this one? Hope I get help and thanks for your time :P

    Another lua problem :P
  2. #2
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function Shadowclaw_OnCombat(Unit, Event) 
    Unit:SendChatMessage(11, 0, "I shall kill you!")
    Unit:RegisterEvent("Shadowclaw_FireBlow", 50000, 0)
    Unit:RegisterEvent("Shadowclaw_MortalStrike", 30000, 0)
    Unit:RegisterEvent("Shadowclaw_TailSlash", 20000, 0)
    Unit:RegisterEvent("Shadowclaw_Pound", 45000, 0)
    Unit:RegisterEvent("Shadowclaw_Stun", 25000, 0)
    Unit:RegisterEvent("Shadowclaw_Armageddon", 120000, 1)
    Unit:RegisterEvent("Shadowclaw_EvilForm",1000,0)
    Unit:RegisterEvent("Shadowclaw_LastForm",1000,0)
    end
    
    function Shadowclaw_FireBlow(pUnit, Event) 
    pUnit:CastSpell(43140, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_MortalStrike(pUnit, Event) 
    pUnit:CastSpell(39595, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_TailSlash(pUnit, Event) 
    pUnit:CastSpell(38737, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_Pound(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(34162, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_Stun(pUnit, Event) 
    pUnit:CastSpell(42435, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_Armageddon(pUnit, Event) 
    pUnit:CastSpell(45915, pUnit:GetRandomPlayer(4)) 
    end
    
    function Shadowclaw_Bomb(pUnit, Event) 
    pUnit:CastSpell(40332, pUnit:GetRandomPlayer(0)) 
    end
    
    function Shadowclaw_HellBurn(pUnit, Event) 
    pUnit:CastSpell(46218, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_ForceShield(pUnit, Event) 
    pUnit:CastSpell(20620) 
    end
    
    function Shadowclaw_ShadowPain(pUnit, Event) 
    pUnit:CastSpell(40871, pUnit:GetMainTank()) 
    end
    
    function Shadowclaw_EvilForm(pUnit, Event) 
    if pUnit:GetHealthPct() < 50 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:SetModel(15366)
    pUnit:RegisterEvent("Shadowclaw_Hell_Burn", 25000, 0)
    pUnit:RegisterEvent("Shadowclaw_Last_Form",1000,0)
    end 
    end
    
    function Shadowclaw_LastForm(pUnit, Event) 
    if pUnit:GetHealthPct() < 10 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:SetModel(15366)
    pUnit:RegisterEvent("Shadowclaw_Force_Shield", 1, 1)
    end 
    end
    
    function Shadowclaw_OnLeaveCombat(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "Is there someone strong enough to defeat me??") 
    end
    
    function Shadowclaw_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(11, 0, "It cant be! I am ..... dead") 
    end
    
    function Shadowclaw_OnKilledTarget(Unit, Event) 
    Unit:SendChatMessage(11, 0, "Good trip to HELL!") 
    end
    
    RegisterUnitEvent(56675, 1, "Shadowclaw_OnCombat")
    RegisterUnitEvent(56675, 2, "Shadowclaw_OnLeaveCombat")
    RegisterUnitEvent(56675, 3, "Shadowclaw_OnKilledTarget")
    RegisterUnitEvent(56675, 4, "Shadowclaw_OnDied")
    That should work now. Removed a ", " as I belive it wasn't needed, you also wrote Unit on one place there it was pUnit

    Test the script out first before you answer =P

  3. #3
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes worked, thanks a lot!

    Btw. where was the comma?

  4. #4
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where he was going to cast the shield spell on himself.

  5. #5
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Btw some spells dont work
    Code:
    function Shadowclaw_LastForm(pUnit, Event) 
    if pUnit:GetHealthPct() < 10 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:SetModel(15366)
    pUnit:RegisterEvent("Shadowclaw_Force_Shield", 1, 1)
    end 
    end
    Code:
    function Shadowclaw_HellBurn(pUnit, Event) 
    pUnit:CastSpell(46218, pUnit:GetMainTank()) 
    end
    These dont work, and he doesnt say anything :P Hope I get help

Similar Threads

  1. another noob problem
    By mike69798 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 02-23-2008, 02:54 AM
  2. lua problem
    By *Alexz* in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 02-14-2008, 10:41 PM
  3. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  4. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
  5. uggg another tech problem
    By Lorokaz in forum Community Chat
    Replies: 3
    Last Post: 01-17-2007, 05:13 PM
All times are GMT -5. The time now is 01:26 AM. 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