[Request] Need help! I get Strange things in LUA -_- menu

Shout-Out

User Tag List

Results 1 to 1 of 1
  1. #1
    sheepking's Avatar Banned
    Reputation
    52
    Join Date
    Nov 2007
    Posts
    690
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request] Need help! I get Strange things in LUA -_-

    Hey there, i wrote scripts for Kael'Thas Sunstrider (Magisters Terrace) and Selin Fireheart (Magisters Terrace, too)

    If I only got the Kael'Thas script in my Scripts folder and the Selin-Script outside, Selin does not work (of course) and kael does what he has to do. So far so good.

    BUT: If I have both in my Scriptsfolder, Selin works (of course) and Kael'thas is using Selin's scripts! (Casting Drain Life, Fel Explosion and so on)

    Here are my scripts. Please help me! I don't know how it may continue

    Kael'Thas:

    Code:
    --[[Created and Developed by ~sheepking.
    --please do NOT delete this Credits. Thank you.]]
    
    function OnDied (pUnit, Event)
        pUnit:RemoveEvents()
    end
    
    x1 = 140.6
    y1 = 194.5
    z1 = -16
    o1 = 5.1
    
    x2 = 169.7
    y2 = 169.1
    z2 = -16
    o2 = 2
    
    function phoenix_spawn (pUnit, Event)
    if math.random() < 0.5 then
        pUnit:RegisterEvent("phoenix_spawn1", 1000, 1)
    else
        pUnit:RegisterEvent("phoenix_spawn2", 1000, 1)
    end
    end
    
    function phoenix_spawn2 (pUnit, Event)
        pUnit:SpawnCreature(21362, x2, y2, z2, o2, 14, 0)
        pUnit:SendChatMessage(14, 0, "Vengeance burns!")
    end
    
    function phoenix_spawn1 (pUnit, Event)
        pUnit:SpawnCreature(21362, x1, y1, z1, o1, 14, 0)
        pUnit:SendChatMessage(14, 0, "Vengeance burns!")
    end
    
    function OnEnterCombat (pUnit, Event)
        pUnit:RegisterEvent("pyroblast", 60000, 1)
        pUnit:RegisterEvent("phoenix_spawn", 35000, 0)
        pUnit:RegisterEvent("fireball", 8000, 0)
        pUnit:RegisterEvent("flamestrike", 18000, 0)
        pUnit:RegisterEvent("phase2", 1000, 0)
    end
    
    function pyroblast (pUnit, Event)
        pUnit:FullCastSpellOnTarget(36819, pUnit:GetRandomPlayer(0))
        pUnit:CastSpell(46165)
    end
    
    function flamestrike (pUnit, Event)
        pUnit:FullCastSpellOnTarget(46162, pUnit:GetRandomPlayer(0)) 
        pUnit:SendChatMessage(12, 0, "Felomin ashal!")
    end
    
    function fireball (pUnit, Event)
        pUnit:FullCastSpellOnTarget(44189, pUnit:GetRandomPlayer(0))
    end
    
    function phase2 (pUnit, Event)
        if pUnit:GetHealthPct() < 50 then 
        pUnit:RemoveEvents() 
        pUnit:FullCastSpell(44224)
        pUnit:SendChatMessage(12, 0, "I'll turn your world...upside...down")
        pUnit:RegisterEvent("feedback", 30000, 1)
        pUnit:RegisterEvent("phase2", 40000, 1)
    end 
    end
    
    function feedback (pUnit, Event)
        pUnit:CastSpell(44233)
    end
    
    RegisterUnitEvent(24664, 1, "OnEnterCombat")
    RegisterUnitEvent(24664, 4, "OnDied")
    Selin Fireheart:

    Code:
    --[[Created and Developed by ~sheepking.
    --please do NOT delete this Credits. Thank you.]]
    
    function OnEnterCombat (pUnit, Event)
        pUnit:RegisterEvent("FelExplosionLookup", 1000, 0)
        pUnit:RegisterEvent("drainlife", 20000, 0)
        pUnit:RegisterEvent("entry", 1000, 1)
    end
    
    function OnDied (pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("exit1", 1000, 1)
        pUnit:RegisterEvent("exit2", 1000, 1)
    end
    
    function RootCrystal (pUnit, Event)
        pUnit:Root()
    end
    
    function entry (pUnit, Event)
        pUnit:GetGameObjectNearestCoords(585, 271.5, 0.8, 9)
        pUnit:ActivateGameObject(1)
    end
    
    function exit1 (pUnit, Event)
        pUnit:GetGameObjectNearestCoords(585, 247, -0.25, 1.88)
        pUnit:DeactivateGameObject(0)
    end
    
    function exit2 (pUnit, Event)
        pUnit:GetGameObjectNearestCoords(585, 271.5, 0.8, 9)
        pUnit:DeactivateGameObject(0)
    end
    
    function drainlife (pUnit, Event)
        pUnit:FullCastSpellOnTarget(44294, pUnit:GetMainTank())
    end
    
    function FelExplosionLookup (pUnit, Event)
        if pUnit:GetHealthPct() < 50 then
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("Registers", 1000, 1)
    end
    end
    
    function Registers (pUnit, Event)
        pUnit:RegisterEvent("crystal", 1000, 1)
    end
    
    function FelExplosionCast (pUnit, Event)
        pUnit:CastSpell(44314)
    end
    
    --crystalrandom = math.random(1, 5)
    
    function crystal (pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystaltwo", 30000, 0)
    --    if crystalrandom == 1 then
        if crystal1 == 1 then
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystaltwo", 1000, 1)
        else
        pUnit:GetUnitBySqlId(146657)
        if pUnit:IsAlive() == true then
        pUnit:RegisterEvent("FelExplosionCast", 4000, 7)
        pUnit:FullCastSpellOnTarget(46466, pUnit:GetUnitBySqlId(146657))
        crystal1 = 1
    end
    end
    end
    
    function crystaltwo (pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystalthree", 30000, 0)
    --    if crystalrandom == 2 then
        if crystal2 == 1 then
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystalthree", 1000, 1)
        else
        pUnit:GetUnitBySqlId(145490)
        if pUnit:IsAlive() == true then
        pUnit:RegisterEvent("FelExplosionCast", 4000, 7)
        pUnit:FullCastSpellOnTarget(46466, pUnit:GetUnitBySqlId(145490))
        crystal2 = 1
    end
    end
    end
    
    function crystalthree (pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystalfour", 30000, 0)
    --    if crystalrandom == 3 then
        if crystal3 == 1 then
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystalfour", 1000, 1)
        else
        pUnit:GetUnitBySqlId(207222)
        if pUnit:IsAlive() == true then
        pUnit:RegisterEvent("FelExplosionCast", 4000, 7)
        pUnit:FullCastSpellOnTarget(46466, pUnit:GetUnitBySqlId(207222))
        crystal3 = 1
    end
    end
    end
    
    function crystalfour (pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystalfive", 30000, 0)
    --    if crystalrandom == 4 then
        if crystal4 == 1 then
        pUnit:RemoveEvents()
        pUnit:RegisterEvent("crystalfive", 1000, 1)
        else
        pUnit:GetUnitBySqlId(146188)
        if pUnit:IsAlive() == true then
        pUnit:RegisterEvent("FelExplosionCast", 4000, 7)
        pUnit:FullCastSpellOnTarget(46466, pUnit:GetUnitBySqlId(146188))
        crystal4 = 1
    end
    end
    end
    
    function crystalfive (pUnit, Event)
        pUnit:RemoveEvents()
    --    if crystalrandom == 5 then
        if crystal5 == 1 then
        pUnit:RemoveEvents()
        else
        pUnit:GetUnitBySqlId(145837)
        if pUnit:IsAlive() == true then
        pUnit:RegisterEvent("FelExplosionCast", 4000, 7)
        pUnit:FullCastSpellOnTarget(46466, pUnit:GetUnitBySqlId(145837))
        crystal5 = 1
    end
    end
    end
    
    RegisterUnitEvent(24723, 4, "OnDied")
    RegisterUnitEvent(24723, 1, "OnEnterCombat")
    RegisterUnitEvent(24722, 6, "RootCrystal")
    Please help! You'll gain some+Rep of course

    [Request] Need help! I get Strange things in LUA -_-

Similar Threads

  1. [Request] Needs Help Getting windows XP activated.
    By BrightChild in forum Community Chat
    Replies: 5
    Last Post: 11-19-2009, 03:56 PM
  2. need help to get my addons working
    By fiskerfisk in forum World of Warcraft General
    Replies: 13
    Last Post: 11-19-2007, 07:21 AM
  3. I need help, cant get the right IDs on my server
    By xn00bpwn3rx in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 09-08-2007, 06:02 PM
  4. Requests...need help plx
    By ^crÄzz in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 06-14-2007, 08:34 PM
All times are GMT -5. The time now is 11:00 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