[Guide] LUA 2. menu

User Tag List

Results 1 to 4 of 4
  1. #1
    EmuX's Avatar Active Member
    Reputation
    29
    Join Date
    Feb 2008
    Posts
    172
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Guide] LUA 2.

    Before reading this guide please read my first one at:

    http://www.mmowned.com/forums/emulat...tml#post639049



    ||LUA TuT 2||

    1.) After reading my first LUA tutorial you should know the basics. Lets start
    off with a creature to edit, in this guide I used Illidan.

    2.) Now let's start the script:

    function Illidan_Phase1(pUnit, Event)
    pUnit:SendChatMessage(11, 0, "I am entering phase 1.")
    pUnit:CastSpell(SPELL ID)
    end

    Here is what CastSpell() does:

    CastSpell(spellID) : Causes the unit to cast a spell.

    3.) Now that we have finished his first phase, let's make him say somthing when
    he enters combat:

    function Illidan_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(11, 0, "I am entering combat.")
    pUnit:FullCastSpell(SPELL ID)
    end

    Here is what FullCastSpell() does:

    FullCastSpell(spellID) : Casts a spell with casting time.

    4.) Illidan will now enter a phase, and say stuff on combat. Now to finish the script off:

    function Illidan_Phase1(pUnit, Event)
    pUnit:SendChatMessage(11, 0, "I am entering phase 1.")
    pUnit:CastSpell(SPELL ID)
    RegisterEvent("Illidan_OnCombat, 1000, 0")
    end

    function Illidan_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(11, 0, "I am entering combat.")
    pUnit:FullCastSpell(SPELL ID)
    end

    RegisterUnitEvent(ILLIDANS ID, 1, "Illidan_Phase1")
    RegisterUnitEvent(ILLIDANS ID, 2, "Illidan_OnCombat")

    [Guide] LUA 2.
  2. #2
    Krip's Avatar Contributor
    Reputation
    266
    Join Date
    Jan 2008
    Posts
    942
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great guide man, thanks.

    Keep up the work.

  3. #3
    Lich King's Avatar Contributor
    Reputation
    100
    Join Date
    May 2007
    Posts
    911
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice guide, +Rep
    EDIT: Can't, I've given out too much

  4. #4
    runiker's Avatar Contributor
    Reputation
    105
    Join Date
    Nov 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    um if i am right fullcastspell does not work or am i thinking somthing about taget cast spell idk its one of them that dont workk great guide needs color tho

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] LUA Portals
    By Gastricpenguin in forum WoW EMU Guides & Tutorials
    Replies: 83
    Last Post: 08-27-2008, 11:17 PM
  3. [Guide]Lua Scripts
    By Jgro1413 in forum WoW EMU Guides & Tutorials
    Replies: 3
    Last Post: 06-21-2008, 09:53 PM
  4. [Guide] LUA.
    By EmuX in forum WoW EMU Guides & Tutorials
    Replies: 4
    Last Post: 03-05-2008, 10:08 PM
  5. [Guide][LUA] Make a mob speak/use spell on a %!
    By Meltoor in forum WoW EMU Guides & Tutorials
    Replies: 14
    Last Post: 02-29-2008, 10:41 PM
All times are GMT -5. The time now is 04:31 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