LuaSlinger»Lua Script Writing Overview

Lua Script Writing Overview

Lua Script Writing with LuaSlinger Overview

  • Run WoW in windowed mode, and copy (Ctrl-C) and paste (Ctrl-V) into LuaSlinger.
  • Copy and paste code off this page into LuaSlingerImport.lua, launch the game, find your code on the Import tab, and then copy and paste it from there to any other LuaSlinger tab.

Write and execute Scripts

To execute a script, do one of the following:

  • Press the Execute button (good for testing).
  • Type <tt>/ls n</tt> at your chat prompt (where N is 1-40).
  • Put <tt>/ls n</tt> in a macro, and put that macro on your action bar.
  • Enter one or more events in the event name box and have your script executed automatically whenever that event is fired. Note: the script won't begin executing until you close the window.

Put common code in the Library

All code in the Library tab is loaded when the game starts or whenever you click the reload button. Put any functions or global variables in there.

Miscellaneous notes

  • Lua uses two dashes (--) for comments. You'll see comments throughout the code library below. These can be removed if you wish but they are in place to help you read the code more easily, when you copy the code to LuaSlinger in your library feel free to add your own comments to explain things to your liking.