LUA Script menu

User Tag List

Thread: LUA Script

Results 1 to 5 of 5
  1. #1
    Entr0py's Avatar Member
    Reputation
    35
    Join Date
    May 2007
    Posts
    396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA Script

    Hello good people of mmowned, im hear to ask a question.
    Im going to release a scripted boss fight and i was planning on doing it about 5 seconds ago but when i tested my script, it would load there was an unexpected symbol or somthing.

    Could some1 please tell me what is wrong with this script? +Rep to helpuh


    Code:
    function Quetzalcoatl_Spell (pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "Burn!")
    	pUnit:CastSpell (34133)
    end  
    
    function Quetzalcoatl_Spell2(pUnit, Event) 
    	pUnit:SendChatMessage(12, 0, "Let the fires of death cleanse your soul...")
    	pUnit:FullCastSpellOnTarget(40255, pUnit:GetRandomPlayer(0)) 
    end
    
    function Quetzalcoatl_Spell3(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "Shadows consume...") 
    	pUnit:FullCastSpellOnTarget(30510, pUnit:GetRandomPlayer(0)) 
    end
    
    function Quetzalcoatl_Spell4(pUnit, Event) 
    	pUnit:SendChatMessage(12, 0, "The poison...")
    	pUnit:CastSpell(45855, ) 
    end
    
    function Quetzalcoatl_Spell5(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "Don't be afraid...") 
    	pUnit:FullCastSpellOnTarget(6215, pUnit:GetRandomPlayer(0)) 
    end
    
    function Quetzalcoatl_Spell6(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "I must... Feed...")
    	pUnit:CastSpell(40904, ) 
    end
    
    function Quetzalcoatl_Spell7(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "We all harbor some evil in us...") 
    	pUnit:FullCastSpellOnTarget(41914, pUnit:GetRandomPlayer(0)) 
    end
    
    function Quetzalcoatl_Spell8(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "You know nothing of true pain!") 
    	pUnit:FullCastSpellOnTarget(40932, pUnit:GetRandomPlayer(0)) 
    end
    
    function Quetzalcoatl_Spell9(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "Back away!") 
    	pUnit:CastSpell(41142, ) 
    end
    
    function Quetzalcoatl_Spell10(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "Dont get to close!")
    	pUnit:CastSpell(29973, ) 
    end
    
    function Quetzalcoatl_Spell10(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "You are mine now.") 
    	pUnit:FullCastSpellOnTarget(28410, pUnit:GetRandomPlayer(7)) 
    end
    
    function Quetzalcoatl_Spell11(pUnit, Event)
    	pUnit:SendChatMessage(12, 0, "Suffer!")
    	pUnit:FullCastSpellOnTarget(28410, pUnit:GetRandomPlayer(7)) 
    end
    
    function Quetzalcoatl_Spell12(pUnit, Event) 
    	pUnit:SendChatMessage(12, 0, "I will freeze the blood in your veins!")
    	pUnit:CastSpell(45032, ) 
    end
    
    function Quetzalcoatl_Phase1(Unit, event)
        if Unit:GetHealthPct() < 99 then
            Unit:RemoveEvents()
            Unit:SendChatMessage(11, 0, "So it begins!")
            Unit:RegisterEvent("Quetzalcoatl_Spell",14000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell2",21000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell3",2500, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell4",30000, 0)
    	Unit:RegisterEvent("Quetzalcoatl_Spell5",30000, 0)
    	Unit:RegisterEvent("Quetzalcoatl_Spell6",30000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Phase2",1000, 0)
       end
    end
    
    function Quetzalcoatl_Phase2(Unit, event)
        if Unit:GetHealthPct() < 50 then
            Unit:RemoveEvents()
            Unit:CastSpell(5486)
            Unit:SendChatMessage(11, 0, "Don't make this hard on yourselves!")
            Unit:RegisterEvent("Quetzalcoatl_Spell",14000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell2",21000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell3",2500, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell4",30000, 0)
    	Unit:RegisterEvent("Quetzalcoatl_Spell5",30000, 0)
    	Unit:RegisterEvent("Quetzalcoatl_Spell6",30000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell6",35000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell7",14000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell8",8000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell9",21000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell10",21000, 0)
    	Unit:RegisterEvent("Quetzalcoatl_Spell11",21000, 0)
            Unit:RegisterEvent("Quetzalcoatl_Spell12",21000, 0)
        end
    end
    
    function Quetzalcoatl_OnCombat(Unit, Event) 
    	Unit:SendChatMessage(12, 0, "I will teach you true fear...")
    end
    
    function Quetzalcoatl_OnLeaveCombat(Unit, Event) 
    	Unit:RemoveEvents() 
    	Unit:SendChatMessage(12, 0, "Did you really think you could win?") 
    end
    
    function Quetzalcoatl_OnDied(Unit, Event) 
    	Unit:RemoveEvents() 
    	Unit:SendChatMessage(12, 0, "No... This cannot be!  I... Am... A god...!") 
    end
    
    function Quetzalcoatl_OnKilledTarget(Unit, Event) 
    	Unit:SendChatMessage(12, 0, "Such insolence...") 
    end
    
    RegisterUnitEvent(69123, 1, "Quetzalcoatl_OnCombat")
    RegisterUnitEvent(69123, 2, "Quetzalcoatl_OnLeaveCombat")
    RegisterUnitEvent(69123, 3, "Quetzalcoatl_OnKilledTarget")
    RegisterUnitEvent(69123, 4, "Quetzalcoatl_OnDied")
    Please take notice this is my first lua script and its probobly not that good.

    Remember to + Rep people who help you!

    LUA Script
  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)
    I don't think that you registered the two phases you have.

    Bapes

  3. #3
    Mr.Jebus Christ's Avatar Banned
    Reputation
    117
    Join Date
    Mar 2007
    Posts
    351
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah u only registered one of your phases like bapes said

  4. #4
    Entr0py's Avatar Member
    Reputation
    35
    Join Date
    May 2007
    Posts
    396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alright ill try it in a bit be back in a while

    Remember to + Rep people who help you!

  5. #5
    Knife's Avatar Member
    Reputation
    44
    Join Date
    Dec 2007
    Posts
    254
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is here :
    Code:
    pUnit:CastSpell(45855, )
    That must be
    Code:
    pUnit:CastSpell(45855)
    One more problem i found is here :
    Code:
        pUnit:FullCastSpellOnTarget(41914, pUnit:GetRandomPlayer(0))
    You must have :
    Code:
        pUnit:FullCastSpellOnTarget(41914,pUnit:GetRandomPlayer(0))
    Other problems, if you start using pUnit, then use pUnit everywhere, not pUnit only at spells and Unit at phases. And take care if you use CastSpell, it will instant cast the spell so no casttime.
    Last edited by Knife; 05-08-2008 at 12:44 AM.
    Use the "Search" Button, its not hard
    +RepEveryone who helps and contributes


Similar Threads

  1. [Guide] Lua Scripting Guide is here [Updating]
    By Illidan1 in forum WoW EMU Guides & Tutorials
    Replies: 93
    Last Post: 11-04-2008, 06:56 PM
  2. [GUIDE] How to activate LUA scripts
    By ~SaiLyn~ in forum WoW EMU Guides & Tutorials
    Replies: 3
    Last Post: 12-25-2007, 11:52 AM
  3. Lua Scripts!
    By danis in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 12-15-2007, 03:16 PM
  4. How To LUA Script
    By Skuxta in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 12-13-2007, 04:24 AM
  5. New LUA Scripts
    By 777devil777 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 11-26-2007, 05:58 PM
All times are GMT -5. The time now is 05:58 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