I put a lot of effort into making this guide, so feedback and comments are more than welcome.
_____
I remember when I first started to learn about scripting with simba, and the amount of effort I put in looking through guides and already made scripts to finally learn the basics. However, I don't want that for others, so I'm making this EXTREMELY basic guide to get you started on script making.
What we'll be covering:
I. New Program
II. Mouse movements
III. Finishing the program
So without further ado, let's begin.
I. - New Program
Every time you open up Simba, and add a new tab (If it's not already open), it usually starts up with 3 basic lines:
What these lines mean:program new;
begin
end.
"program new;" = This will be the name of the script you're making. So if I were to make a AIO Agility script, I could maybe name it, I could maybe make my text like this: "program AIOAgility;".
"begin" = This will be used for when we have our procedures finished, I'll talk more about them in the next chapter.
"end." = This also will be used for when we're done with our procedures.
II. - Mouse movements
This is the most basic and, in my opinion, one of the most fundamental parts of scripting. Instead of trying to explain how you'd make mouse movements, I'll just show you a VERY simple piece of code using mouse movents:
Regular code:
Code with explanation:program InventoryFinder;
{$i srl/srl.simba}
procedure Findinventory;
begin
Movemouse(643, 183);
Wait(200);
Clickmouse(643, 183, mouse_Left);
Wait(200);
end;
begin
Findinventory;
end.
III. - Finish the programprogram InventoryFinder; //Since this script's function will be soley to find the Inventory, I've named it "Inventory Finder".
{$i srl/srl.simba} //You should ALWAYS add this piece of code after "program new;". I won't go into detail, but in summary, this code allows you to do certain things.
procedure Findinventory; //This is our first procedure. Just like the name states (procedure), this is something we want our script to do. I named it Findinventory, because that's what it's going to do.
begin //After every procedure, we must state for it to begin.
Movemouse(643, 183); //This is our first mouse movement. We're going to make it more to these coordinates: 643, 183.
Wait(200); //It's not necessary to add a wait time, but it's advised. Here I added a 0.2 second wait time, but if I wanted to add 1 second, I'd put in Wait(1000);.
Clickmouse(643, 183, mouse_Left); //This is the coordinates we want our mouse to click, and what type of click (Left/Right click). Here I made it do a left click.
Wait(200); //Another wait time.
end; //Finally, the end of our procedure. Don't forget that to end a procedure, you have to add a semi-colen (, instead of a fullstop (.).
begin//This is the section in which we state which procedures the script should do, and in what order.
Findinventory; //Since I only have 1 procedure, I only made it do "Findinventory"
end. //This is the final line of our script, don't forget you have to finish it off with a fullstop (.), instead of a semi-colen (; ).
Now that we're done with the coding part, all that's left to do is find the client screen we want our script to work on, and run that bad boy!
To find the screen, all we need to do is: (Note: You can do this before you start making the script, too)
Now all that's left to do is click "Run".
_____
Have a question? Feel free to ask me anything.