[HELP] LUA problem menu

Shout-Out

User Tag List

Results 1 to 4 of 4
  1. #1
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP] LUA problem

    Code:
    function Boss_Spell1(unit)
    unit:CastSpell(16785)
    unit:SendChatMessage(12, 0, "Feel the Flames!")
    end
    
    function Boss_Spell2(unit)
    unit:CastSpell(41596)
    unit:SendChatMessage(12, 0, "Curse you . . .")
    end
    
    function Boss_Spell3(unit)
    local plr = unit:GetClosestPlayer()
    if (plr ~= nil) then
    unit:CastSpellOnTarget(37675, plr)
    end
    end
    
    function Boss_SunderArmor(unit)
    local plr = unit:GetClosestPlayer()
    if (plr ~= nil) then
    unit:FullCastSpellOnTarget(30901, plr)
    end
    end
    
    function Boss_OnEnterCombat(unit)
    unit:SendChatMessage(12, 0, "You will Never see the Legend!")
    unit:RegisterEvent("Boss_Spell1",23000, 0)
    unit:RegisterEvent("Boss_SunderArmor",10000, 0)
    unit:RegisterEvent("Boss_Spell2",50000, 0)
    unit:RegisterEvent("Boss_Spell3",120000, 0)
    end
    
    function Boss_OnLeaveCombat(unit)
    unit:RemoveEvents()
    end
    
    function Boss_KilledTarget(unit)
    unit:SendChatMessage(12, 0, "No Fags can beat the Generals!")
    unit:RemoveEvents()
    end
    
    function Boss_OnDied(unit)
    unit:SendChatMessage(12, 0, "Uhh . . . Legend . . . Never . . . Defeat . . .")
    unit:RemoveEvents()
    end
    
    
    
    RegisterUnitEvent(1410001, 1, "Boss_OnEnterCombat")
    RegisterUnitEvent(1410001, 2, "Boss_OnLeaveCombat")
    RegisterUnitEvent(1410001, 3, "Boss_OnKilledTarget")
    RegisterUnitEvent(1410001, 4, "Boss_onDied")
    Everytime he casts 41596 (Flame Buffet) he casts it on himself. Any idea?

    [HELP] LUA problem
  2. #2
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this, you don't have to have closest player. You can change that if you want.


    Code:
    function Boss_Spell2(unit)
    local plr = unit:GetClosestPlayer()
    if (plr ~= nil) then
    unit:CastSpellOnTarget(41596, unit:GetClosestPlayer())
    unit:SendChatMessage(12, 0, "Curse you . . .")
    end
    end

  3. #3
    pachuco55's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shouldn't the line read "function Boss_Spell1(unit, Event)" ?

    I don't know if that's the error here, but that's how I see every lua script formatted.

    Could also be that every pointer in the code is "unit" ... might have to set the pointer to "player." I know we do that in gossip functions at least.

  4. #4
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alright both don't work

Similar Threads

  1. [Help]DLL or LUA problem i have no idea
    By bfwlegend in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 01-31-2009, 01:58 AM
  2. [Help] Lua Problem
    By Thug4Life in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 01-01-2009, 01:19 PM
  3. [ArcEmu Help] LUA Weird Problem
    By KaMakaZe in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 10-04-2008, 02:17 PM
  4. [Help Plzzzz] LUA Problem with KJ Script
    By Arthas117 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 08-16-2008, 05:25 PM
  5. [Help] Lua problem
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-23-2008, 04:34 AM
All times are GMT -5. The time now is 01:09 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