revised version how does this lua look menu

User Tag List

Results 1 to 3 of 3
  1. #1
    towaly's Avatar Corporal
    Reputation
    1
    Join Date
    Aug 2010
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    revised version how does this lua look

    Newley edited still my first lua how does it look

    function The_Lich_King_OnEnterCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 7, "Who dares oppose The Lich King!") pUnit:RegisterEvent("The_Lich_King_HeartStrike", 3000, 0)
    PUnit:RegisterEvent("The_Lich_king_MoonFire", 2250,0)
    end

    Function The_Lich_King_HeartStrike(pUnit, Event)
    pUnit:FullCastSpell(55262, pUnit:GetRandomPlayer(0))
    end

    Function The_Lich_King_MoonFire(pUnit, Event)
    PUnit:FullCastSpell(48463, pUnit:GetRandomPlayer(0))
    End

    function The_Lich_King_Death(pUnit, Event) pUnit:RemoveEvents() pUnit:SendChatMessage(14, 0, "Someone must sit upon the throne.")
    end

    RegisterUnitEvent(99909, 1, "The_Lich_King_OnEnterCombat") RegisterUnitEvent(99909, 4, "The_Lich_King_Death")

    revised version how does this lua look
  2. #2
    marcelo_20xx's Avatar Active Member
    Reputation
    25
    Join Date
    Sep 2008
    Posts
    165
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You dont need to start a new thread for every script you made, just update your previous post.

  3. #3
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function The_Lich_King_OnEnterCombat(pUnit, Event) 
    pUnit:SendChatMessage(14, 7, "Who dares oppose The Lich King!") -- new line for event, also are you sure you want to use language 7? That's not something everyone can read...
    pUnit:RegisterEvent("The_Lich_King_HeartStrike", 3000, 0)
    PUnit:RegisterEvent("The_Lich_king_MoonFire", 2250,0)
    end 
    
    Function The_Lich_King_HeartStrike(pUnit, Event) -- This should be done for the other function as well, it's to stop it returning an error if it doesn't find a player for some reason (which happens a lot)
    local plr = pUnit:GetRandomPlayer(0) -- plr is a random player
    if plr ~= nil then -- if our player is a person and not nothing 
    pUnit:FullCastSpell(55262, plr) -- cast it on the player
    end -- end the iff
    end
    
    Function The_Lich_King_MoonFire(pUnit, Event) -- same as above
    PUnit:FullCastSpell(48463, pUnit:GetRandomPlayer(0))
    end -- end is not a capital E, I changed it to e
    
    function The_Lich_King_Death(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(14, 0, "Someone must sit upon the throne.") 
    end 
    
    RegisterUnitEvent(99909, 1, "The_Lich_King_OnEnterCombat") 
    RegisterUnitEvent(99909, 4, "The_Lich_King_Death")
    Fixed errors and commented.

Similar Threads

  1. [Trading] How does this Work
    By jswow in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 10-24-2012, 08:18 AM
  2. [QUESTION]Does this MeshTile look correct?
    By -Ryuk- in forum WoW Memory Editing
    Replies: 0
    Last Post: 04-09-2012, 03:08 PM
  3. How does this boss fight sound...
    By Presto12 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 02-24-2010, 03:03 PM
  4. How does this server outline sound
    By Presto12 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 02-21-2010, 02:29 PM
  5. How does this PL company lvl so fast?
    By IcePunk in forum World of Warcraft General
    Replies: 23
    Last Post: 03-25-2009, 04:41 PM
All times are GMT -5. The time now is 10:48 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