Basic lua script break down (for new lua users =P) menu

User Tag List

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

    Basic lua script break down (for new lua users =P)

    Code:
    1) function Zereketh_Void_Zone(Unit, event, miscunit, misc)
    	2)Unit:FullCastSpellOnTarget(30533,Unit:GetRandomPlayer())
    	3)Unit:SendChatMessage(11, 0, "The Void Zone will steal your life...")
    4)end
    1) States function
    2) Declares target what is done and who dose it
    3) Sends chat message when done
    4) Ends Function
    Code:
    function 9) Zereketh(unit, event, miscunit, misc)
    	5) unit:RegisterEvent("Zereketh_Void_Zone", 10) 10000,0)
    end
    5) Registers event name must put every function name ex:

    Code:
    unit:RegisterEvent("Zereketh_Void_Zone",10000,0)
    unit:RegisterEvent("Zereketh_castspell",134330,0)
    10) Cooldown for event
    Code:
    6) RegisterUnitEvent(  7) 20886,1," 8) Zereketh")
    6) Registers unit
    7) Units id
    Name of event (see 9)


    P.S.: sorry for numbers skiping around forgot stuff in middle and didn't feel like renumbering


    Full Script
    Code:
     function Zereketh_Void_Zone(Unit, event, miscunit, misc)
    	Unit:FullCastSpellOnTarget(30533,Unit:GetRandomPlayer())
    	Unit:SendChatMessage(11, 0, "The Void Zone will steal your life...")
    end
    
    function Zereketh(unit, event, miscunit, misc)
    	 unit:RegisterEvent("Zereketh_Void_Zone", ) 10000,0)
    end
    
    RegisterUnitEvent( 20886,1," Zereketh")

    Basic lua script break down (for new lua users =P)
  2. #2
    shadowknight513's Avatar Knight
    Reputation
    11
    Join Date
    Apr 2008
    Posts
    197
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Will refer back to this tonight after I compile my own core. Thanks man.+Rep

  3. #3
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This explains more about things than your "script breakdown"..
    LUA_WIKIPEDIA
    Why do I need a signature?

  4. #4
    Matis02's Avatar Contributor CoreCoins Purchaser
    Reputation
    154
    Join Date
    Mar 2007
    Posts
    378
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Link_S lol It explains LUA not LUA for wow

    Nice little tut


  5. #5
    Chrispl57's Avatar Corporal
    Reputation
    12
    Join Date
    Jun 2010
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Link_S View Post
    This explains more about things than your "script breakdown"..
    LUA_WIKIPEDIA
    Yea i know it was just a small simple thing just showing the basics of how it would look and and what stuff means nothing major
    Msn: [email protected]
    My website: https://www.server-top100.com/ (its new =P)

  6. #6
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    If you can learn Lua in general then anything involving Lua in WoW you will be able to do 100x better. Too many bad habbits/poor coding styles within emulation, not to mention were only just starting to get a Ok Lua engine with Hypersniper's awesome LuaHypArc.
    My point is, if you want to learn the basics look at the tutorials all over the internet. If you want to learn something more advanced, or how to do specific game mechanics/types of scripts through WoW emulation then post on here a guide.

Similar Threads

  1. NPC Lua script not working. (For unknown reason)
    By Joakim Karbing in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 03-10-2016, 06:14 PM
  2. Basic Lua Issues
    By jay77 in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 08-09-2009, 04:33 PM
  3. Basic LUA guide =]
    By nickelo in forum WoW EMU Guides & Tutorials
    Replies: 20
    Last Post: 01-11-2009, 10:04 AM
  4. Guide for new wow players ( basics )
    By Suy in forum World of Warcraft Guides
    Replies: 7
    Last Post: 08-03-2008, 12:46 PM
All times are GMT -5. The time now is 05:39 PM. 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