Lua Script Help needed menu

User Tag List

Results 1 to 4 of 4
  1. #1
    denniskramer's Avatar Member
    Reputation
    6
    Join Date
    Dec 2007
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua Script Help needed

    Ok i have just start learning LUA and made my first script.
    Almost everything works except the Phase2 part, did i do something wrong?

    script:
    Code:
     
     
    local BlackWarKodo = 14333
    local BlightedElk = 26616
     
    function Dennis_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Bijf van me af!")
    pUnit:RegisterEvent("Dennis_SummonAdds", math.random(40000, 42000), 0)
    pUnit:RegisterEvent("Dennis_PoisonNova", math.random(15000, 17000), 0)
    pUnit:RegisterEvent("Dennis_PowerfulBite", math.random(22000, 24000), 0)
    pUnit:RegisterEvent("Dennis_VenomBolt", math.random(29000, 34000), 0)
    end
     
    function Dennis_OnLeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
     
    function Dennis_OnKillTarget(pUnit, Event)
    local Text = math.random(1, 4)
    if Text == 1 then
    pUnit:SendChatMessage(14, 0, "Auw, ik ben door mijn enkel gegaan...")
    elseif Text == 2 then
    pUnit:SendChatMessage(14, 0, "Ben je al bang?")
    elseif Text == 3 then
    pUnit:SendChatMessage(14, 0, "Whahaha sukkel!")
    end
    end
     
    function Dennis_OnDeath(pUnit, Event)
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(14, 0, "Kutje, je was toch sterker als ik had gedacht.")
    end
     
    RegisterUnitEvent(555502, 1, "Dennis_OnCombat")
    RegisterUnitEvent(555502, 2, "Dennis_OnLeaveCombat")
    RegisterUnitEvent(555502, 3, "Dennis_OnKillTarget")
    RegisterUnitEvent(555502, 4, "Dennis_OnDeath")
     
    function Dennis_PhaseTwo(pUnit, Event)
    if pUnit:GetHealthPct() <= 30 then
    pUnit:RegisterEvent("Dennis_SummonAdds", math.random(40000, 42000), 0)
    pUnit:RegisterEvent("Dennis_PoisonNova", math.random(15000, 17000), 0)
    pUnit:RegisterEvent("Dennis_PowerfulBite", math.random(22000, 24000), 0)
    pUnit:RegisterEvent("Dennis_VenomBolt", math.random(29000, 34000), 0)
    end
    end
     
    function Dennis_SummonAdds(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Schatjes! Kom me ff helpen, ik kan het niet alleen.")
    local x,y,z,o = pUnit:GetX(),pUnit:GetY(),pUnit:GetZ(),pUnit:GetO()
    pUnit:SpawnCreature(BlackWarKodo, x, y, z, o, 14, 0)
    pUnit:SpawnCreature(BlackWarKodo, x, y, z, o, 14, 0)
    pUnit:SpawnCreature(BlightedElk, x, y, z, o, 14, 0)
    pUnit:SpawnCreature(BlightedElk, x, y, z, o, 14, 0)
    end
     
    function Dennis_PoisonNova(pUnit, Event)
    pUnit:FullCastSpell(53425)
    end
     
    function Dennis_PowerfulBite(pUnit, Event)
    pUnit:FullCastSpellOnTarget(28883, pUnit:GetMainTank())
    end
     
    function Dennis_VenomBolt(pUnit, Event)
    pUnit:FullCastSpellOnTarget(45018, pUnit:GetMainTank())
    end
    Last edited by denniskramer; 11-28-2008 at 12:48 PM.

    Lua Script Help needed
  2. #2
    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)
    whats your error?

  3. #3
    denniskramer's Avatar Member
    Reputation
    6
    Join Date
    Dec 2007
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Edude View Post
    whats your error?
    Got no error, thats the strange thing, if i had a error i could fix it, but now i dont know wy he dont do phase 2.

  4. #4
    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)
    Code:
    if pUnit:GetHealthPct() < 30 then
    try that

Similar Threads

  1. Lua Script Help and tips needed
    By digger514 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-05-2009, 08:41 AM
  2. LUA Script Help Thread
    By mager1794 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 07-04-2008, 12:46 AM
  3. LuA Scripting Help
    By Jlp in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 06-27-2008, 03:33 AM
  4. Lua script help and general questions from beginner
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-23-2008, 04:38 AM
  5. Need LUA Scripting Help ?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-04-2008, 12:36 PM
All times are GMT -5. The time now is 05:27 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