The following warnings occurred:
Warning [2] Undefined variable $search_thread - Line: 60 - File: showthread.php(1617) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1617) : eval()'d code 60 errorHandler->error_callback
/showthread.php 1617 eval
Warning [2] Undefined variable $forumjump - Line: 89 - File: showthread.php(1617) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1617) : eval()'d code 89 errorHandler->error_callback
/showthread.php 1617 eval




WoWlua - a guide to scripting in game
#1
I am no expert on scripting I just pretend to be. I have found some great tools to help me along the way to make RP enhancing code. The best one of all by far is an Addon called Wowlua.
http://wow.curse.com/downloads/wow-addon...owlua.aspx
This has syntax highlighting, some debugging and it is all done in game. I find it much more useful than actual trying out code in GHI its self. That little screen and the non highlighting is not really meant for debugging code.

Here is a quick guide on how it works.

After you download it and install it like any other Addon, log in and try it out

First, you open the screen with a slash command
[Image: Wowluaslash.png]

Once open, this is the screen you will see, I took the liberty to photoshop a guide to all its buttons and parts.
[Image: WowluaOverview.jpg]

Now the most important button is the RUN button it allows you to run a script. Like if you have GHI and you put the code in for a GHI buff
Code:
ApplyGHIBuff("Yell","I am yelling","Interface\\Icons\\Ability_Warrior_RallyingCry",1,"HELPFUL","PHYSICAL",0,0);
and you hit the run button it will pop the little GHI buff on you.

Here is an example of how it works

Say you want to test this bit of code
Code:
local r = UnitRace("player");

if r == "Tauren"
then
   print("Your race is "..r.."!")
  
elseif r~= "Tauren"
then
   print("Your race is "..r..", Boo!")
end
*~= mean not equal to*

You would open up WowLua and on a new page copy and paste the code in (Ctrl-C + Ctrl-V)
and it would look something like this
[Image: WowluaRun.png]

As you can see once you hit run it prints in the output screen what you have told it to print.

But if you make a mistake it will show an error and what line the the error is on like so.
[Image: WowluaError.png]

Some times when the code gets long and complicated the error is not exactly where it says it is, but it is a good idea to look around that area.

So there you go WoWLua.
If you want to learn more about actually coding I would check out http://www.wowprograming.com
But I am thinking about making a basic guide for simple coding soon.
Reply




Users browsing this thread: 1 Guest(s)