Live Help
Membership
You are a guest!

Register Today!

Log In
Reset Password
Game Network
Community Forum

MMO GAME LIST
World of Warcraft
Age of Conan
Anarchy Online
Archlord
Cabal Online
City of Heroes
City of Villains
Dark Age of Camelot
Darkfall Online
Diablo 2
Dungeons and Dragons
Dofus
Eve Online
Everquest 2
Final Fantasy XI
Guild Wars
Hero Online
Knight Online
Lineage 2
Lord of the Rings Online
Maple Story
Ragnarok Online
Runescape 2
Second Life
SilkRoad Online
Star Wars Galaxies
Tibia
Warhammer Online

FPS GAME LIST
Call of Duty
Combat Arms
Counter Strike
Halo

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Beginners Guide to Scripting, Hands on Guide to SCAR
post Feb 11 2009, 05:13 PM
Post #1

n8t3d0gg



SCAR Coder
****

Group: Members
Posts: 82
Joined: 29-February 08
Member No.: 576,597






Table of Contents

• Overview
• Syntax
• Basics
• Variables
• Constants
• Loops
• Procedures
• If, Then, Else


I will not bother with an introductory. If you get stuck or confused, just leave a post for me.

Alright, let's get to scripting!


Syntax


When you open up Scar, it will most likely prompt you to download includes. Just press yes and wait for it to download them. After this is ready, you will notice two text boxes. The larger one on top is where we write the script. The bottom one is used with special functions. (We will go over them very shortly.)

Look in the top text box. You will see this:

CODE
program New;
begin
end.


This is the default text that appears every time you open Scar. I'll explain it briefly.

"New" is the name of your script. The line "program New" is not even necessary. It just tells the user the name of the script. If you want to rename it, there are a few rules:

1. You must leave a space after "program" followed by the name.
2. The name must be a single word. It may not have any spaces.
3. The line must end with ; (; ends most lines)

If you don't want to bother with the name for now, just delete line 1.

Now we see:

CODE
begin
end.


This is called the main loop. The main loop is just a fancy word for a simple definition. The main loop is where you tell Scar what to do. If you put anything outside of "begin" "end.", it will show up as an error.

There are a few rules for the main loop:

1. Every begin must have an end. (You will understand this later)
2. The last end always has a dot after it.

If you get an error, refer to these rules for clear-up.

Enough with all the talking; let's start scripting.


Basics


Your First Script

1. Make a blank line between "begin" and "end."
2. Type in: "MoveMouse(125,100);" (without quotes)

Your script should now look something like this:

CODE
program IAmAScripter;
begin
  MoveMouse(125,100);
end.


3. Press play and let go of your mouse.

You should have seen your mouse move by itself. If you received an error, compare your script to my example.

"MoveMouse" is called a function. It tells Scar what to do. "125,100" are coordinates. Also you notice the ";" at the end of the line. This tells Scar to stop right there and not read the rest of the line. Placing ";" at the end of lines isn't necessary, but is recommended.

4. Try to change the coordinates using the Color Picker and press play.

WARNING!
Do NOT place a coordinate that is greater than your screen resolution. If your resolution is 800,600 and you tell Scar to "MoveMouse(1000,1000);", it will continually keep searching for the coordinates that don't exist and your mouse will go crazy. You will most likely need to restart your computer then.


5. Copy the example over your old script: (Save the old one for reference if you want)

CODE
program IAmAScripter;
begin
  MoveMouse(100,100);
  Wait(1000);
  ClickMouse(100,100,true);
end.


Here are two new functions. The first is "Wait". As you may guess, that function waits. "1000" is the number of milliseconds to wait.

REMEMBER!
1000 milliseconds = 1 second


The next function is "ClickMouse". Once again, you don't have to be a genius to figure out that that function clicks the mouse. The coordinates tell Scar where to click. "true" at the end tells Scar to click the left mouse button.

REMEMBER!
true = left mouse button
false = right mouse button


6. Play around with the coordinates and wait time. (Don't forget the "WARNING" and "REMEMBER")
7. Copy the following over your old script: (Or add on)

CODE
program IAmAScripter;
begin
  MoveMouseSmooth(200,200);
  Wait(100);
  HoldMouse(200,200,true);
  Wait(10);
  ReleaseMouse(200,200,true);
end.


First off you will see "MoveMouseSmooth". This function is similar to "MoveMouse", but it moves the mouse slower.

"HoldMouse" and "ReleaseMouse" work together most times. "HoldMouse" holds the mouse down at the coordinates said. It will not release the mouse until you tell it too. That is where "ReleaseMouse" comes into play. "ReleaseMouse" must have the same coordinates and the same mouse button (true/false) as "HoldMouse" to release the hold.

These two functions have two uses. The first is that you can drag and highlight multiple objects. The second reason is that it clicks the mouse in a less detectable fashion than "MoveMouse". Thus, it reduces the chances of getting caught by macro detection software.

8. Play around with the coordinates, wait times, and the mouse button to click. (true/false in "ClickMouse")
9. Copy the following example over your old script: (or add on)

CODE
program IAmAScripter;
begin
  ClearDebug;
  WriteLn('"Hello World!" gets annoying. ');
  WriteLn('Hello World! ');
end.


First there is "ClearDebug;". This function clears the lower text box of Scar. (Debug Box)



"WriteLn" is a new kind of function. "WriteLn" is a function that produces text. After you run the example, look on the bottom text box in Scar. You will see the text you typed between "''" appear there. Each "WriteLn" creates a separate line in the Scar debug box. (Lower Text Box)

REMEMBER!
Text functions always have '' to indicate where the text starts and ends. You will see the text appear pink. The text (words) that appear pink is the text that will be typed.


10. Play around with this a little.
11. Copy the following example over your old script: (or add on)

CODE
program IAmAScripter;
begin
  SendKeys('Now this is more like it!'+chr(13));
  Wait(100);
  SendKeys('I can now spam my friends through msn.');
  Wait(100);
  SendKeys(chr(13));
end.


WARNING!
Click in a blank text area before starting the script. It will type wherever the cursor is. (ctrl+alt+r to run without pressing mouse)


The new function is "SendKeys". This function compares closely with the "WriteLn", but has a much more dramatic effect.

"SendKeys" actually types the text you tell it to type in the location where the cursor (black blinking marker) is. You will also notice something different between "SendKeys" and "WriteLn". This is "chr(13)". "chr(13)" tells Scar to press enter.

I showed you two ways to add it in. The first is to include it in the same line as the text you want it to type. To do this, you must add a + after the closing (') of the text about to be typed and then place "chr(13)".

The second way is to just add it on a separate line. To do this, don't include "''" in the function. Just type chr(13) between ( ).

WARNING!
ALWAYS include "Wait" functions in your script. (Especially between typing functions like SendKeys) This will prevent heavy lag and risky malfunctions.


12. Play around with this a little. (Spam out your friends Tongue)
13. Try to create a script with as minimum of "looking back" as possible. Practice until you believe that you understand the functions and how to use them without many problems.

Remember, that this isn't school. You CAN have fun while learning. By experimenting, you will learn common errors and prevent them in the future. My closing for your first script is to say, "Remember the WARNING's and REMEMBER's that I placed to avoid implications."


Variables


Our next view point will be variables and constants. I would highly advise you to at least look over that section in my other guide. I will only explain it briefly, and will drown you with examples.

Variables and constants store data. This is the same as saying that they represent certain numbers or characters. Variables can be changed during the script, while constants will always be the same. You will see this through some of my examples.

First we declare the variable. (Tell Scar that we are using the name as Integer, String, or Boolean).

1. Copy down my example.

CODE
program Vars;

var
i, sum: Integer;
Hello: String;

begin
  //In the next example
  {I will explain how to use it}
end.


2. Study the example.

In this example, there are 2 types of variables: integers (whole positive and negative numbers) and strings (any characters; AKA: what you use as text for SendKeys. We will touch booleans (true and false) later.

In my example I used i and sum as integers and Hello as a string. You can name your variables anything you want. You can also declare more than one of the same variables (if they're of the same kind: integers, strings, etc.) on the same line; just separate them with a comma.


EXTRA!

I used // and { } for commenting. In code, those will appear green. There are two ways to use comments. One way is to put // in front of what you want to comment. This will make the rest of the line a comment. The other way is to use { }. Whatever is between { } will be a comment. Comments are used to leave yourself notes or directions for the user of your script.

3. Copy the following example.

CODE
program Vars;

var
i, sum: Integer;
Time: Integer;

begin
  i:= 1;
  sum:= i+1;
  WriteLn('The sum is ' + IntToStr(sum));
  Time:= 100;
  Wait(Time);
end.


4. Study the model.

You should already know how to tell Scar which variables to use. (i: Integer;) Now you can see how to tell Scar what the integer is. In this example I made code see i as 1 (i:= 1;). Then, I told ScarS that sum is equal to whatever i is equal to, plus one (sum:= i+1;).

Then, I told Scar to print out, in the debug box, what the integer sum is. To do this, I used a new function called IntToStr. IntToStr can be added to WriteLn, SendKeys and other typing functions. You must put the integer (in this case "sum") between ( ) after IntToStr to indicate which integer to use.

After this, I told Scar what the integer Time was. Time:= 100;. Now look at the next part. You see how I replaced the amount to wait (Like Wait(100) ) with the integer Time. Because I told Scar that Time is 100, Scar sees Time as 100 anywhere I put it. You can do this with many other commands. MoveMouse or ClickMouse are just a few that you can use that with.

5. Play around with variables for a bit. You will discover that you can use Scar as a virtual calculator.

REMEMBER!
+ = add
- = minus
* = multiply
/ = divide


EXTRA!

Randomizing your script is essential to macro on Dofus. To randomize something, you would type +random(n) after a number you want to randomize. n would be the amount to randomize. Here's an example.

CODE
program Randoms;

var
i: Integer;

begin
  i:= 3+random(5);
  WriteLn(IntToStr(i));
  Wait(200+random(100));
  MoveMouse(2+random(4), 6-random(4);
end.


I first told Scar that i is going to be an integer. Then I said that i is 3 and a random of 0-4 added onto it. Then we told Scar to write what i is in the Debug Box. Next, we told Scar to Wait 200 milliseconds and a random of 0-99 milliseconds added on to that. Finally, we told Scar to move to the coordinates of 2 and random of 0-3 added for x, and 6 and random of 0-3 subtracted for y.

6. Try to randomize some of your scripts.

Now let's see how to use strings.

As we said before, strings are characters (text).

7. Copy the following example.

CODE
program Vars;

var
Hello: String;

begin
  Hello:= 'How is everyone doing?';
  WriteLn(Hello);
  Hello:= 'Hi';
  WriteLn(Hello);
end.


8. Study the model.

As you can tell, strings are pretty much used the same as integers, except they are used with typing functions (WriteLn). I first declared Hello as a String. (Hello: String;). I then said that Hello:= 'How is everyone doing?';. Now wherever I put Hello, Scar will see it as 'How is everyone doing?'. I told Scar to print whatever Hello is inside the Debug Box. Next, I renamed Hello and made it something else. This can be done with integers also.

Remember how I said that variables are special because you can change them inside the script? Well, this is it. All you do is tell Scar that Hello represents something else from now on.

9. Play around with the concept of Variables. Try incorporating it in your old scripts, or making a new one to test how much you have learned.


Constants


Once you master Variables, Constants should be a piece of cake.

As you have learned in your lesson with variables, Scar uses names to represents things like text or numbers. You also learned that variables can be changed throughout the script.

This is where constants are different. You can only tell Scar what a constant represents once, at the beginning of your script. This is very good to give the user of your script options like wait times, text to type, and color numbers to search for (we will learn colors later).

This is how we declare constants (Tell what they represent)

1. Copy the following example.

CODE
program Constants;

const
WaitTime = 100;//Time To wait
WhatToType = 'Hello, I am cool.';//What to type

begin
  Wait(WaitTime);
  WriteLn(WhatToType);
end.


2. Study the script for a while.

We declare constants after the program Name and before begin. Unlike variables, we tell Scar what constants represent right away (WaitTime = 100;). Then, we use them the same way that we use variables.

I this example I made Scar wait whatever WaitTime stood for. Then, I made it type whatever WhatToType stood for inside the debug box.

You see! Once you understand variables, constants come natural!

3. Incorporate Variables and Constants into your older scripts or make a new one to see how much you have learned.

REMEMBER!

Variables can be changed throughout the whole script.
Constants can only be declared once. You may not change it within the script.



Loops


By now you must be wondering, "But how do they make the script run forever?"

I will teach you how to "loop" your script in this section. This will allow your script to run forever or as many times as you will it.

Let's look at an example.

1. Copy the following example.

CODE
program Loops;

begin
   repeat //Place repeat before what you want to repeat
   WriteLn('I want to wait forever!');
   Wait(100);
   until(false); //Place where you want repeat to stop
end.


2. Study the model a little and try to run it on your own, personal Scar client.

Here you see your first loop. There are many different kinds of loops. This is the first and simplest loop we will look at.

To start this loop, we place repeat before what we want the script to repeat. After we finish writing the commands we want Scar to repeat, we put an until.

Until has options. The option we used this time was until(false);. This tells Scar to go on forever. The only way this script will stop is if you press stop.

Remember how I said that you put repeat before what you wanted the script to repeat? I'll show you an example to further that a little further.

3. Add this onto the old example or just copy paste over the old one.

CODE
program Loops;

begin
   ClearDebug; //Scar will only do this once
   repeat //Place repeat before what you want to repeat
   WriteLn('I want to wait forever!');
   Wait(100);
   until(false); //Place where you want repeat to stop
   WriteLn('I guess this will never be written, since the above loop goes forever :/');
end.



4. Study what I have added and notice the differences between the earlier scripts.

5. Run the script and discover how it is different from the last one.

In this example, I told Scar to ClearDebug (Clear Debug box) before starting the loop (repeat). Then I told Scar to WriteLn and Wait. I told Scar to never stop repeating what is between repeat and until by telling it until(false);.

As you can see, you do not have to have repeat at the beginning of your script. Just set it wherever you want it to repeat from.

You're probably pretty edgy on seeing that last WriteLn being shown now, eh? Wink Don't worry, with this next part, your loop doesn't have to go forever.

You must remember how to use variables for this next part. This part should be pretty simple.

6. Copy down the following example.

CODE
program CountingLoops;

var
i: Integer;

begin
  ClearDebug;
  i:= 0;
  repeat
  i:= i + 1;
  WriteLn('This is loop number ' + IntToStr(i));
  Wait(100);
  until(i = 2);
  WriteLn('Thought you'd never see me, huh?');
end.
[code]

7.   Study the example a little.

As I warned you, we use integers for loops that go an amount of times. For this example, I chose an integer named i. I first told Scar to ClearDebug. I then said that i is 0. Next, I said that the loop will begin here.

Now you see the i:= i + 1; after repeat? Since i is 0, we have just added one to 0, thus making i 1. (Since i=0, 0+1=1)

The reason I told Scar that i is whatever number i represented before plus one, is to count the amount of loops the script has gone through (How many times it has gone from repeat to until). Then, I told Scar to do a bunch of stuff (WriteLn and Wait).

The next part is what makes this script work the amount of times you want it to. Remember that in our last script we used until(false); to tell Scar to never stop the loop. Well, this time we gave Scar another condition. We told Scar to repeat the loop until i is 2.

You see! That is how our earlier integer, i, ties into this. Since, it constantly adds one to itself with every loop it goes through, Scar will stop the loop when i becomes 1.

Finally, we can see the WriteLn we could not see before. I guess the little bugger learned a way to show up, now. Tongue

[b]REMEMBER!

=  - Equal to
<  - Greater than
>  - Less than
<= - Greater than or equal to
>= - Less than or equal to
<> - Not equal to[/b]

Use those with to tell Scar when to stop loops (until(i > 4).

8.   Play around with the repeat loop for a little while. When you're ready, continue to the next part.

I won't explain the next part too much. I told you earlier that there are different kinds of loops. I will show you a few of these through examples. Try to study the examples a little before going away disappointed smile.

[code]
program OtherLoops;

var
i: Integer;

begin
  i:= 0;
  while(i < 6) do
  i:= i + 1;
  WriteLn('Hullo number ' + IntToStr(i));
end.


Simply put, it goes like this. I made i 0. I told Scar while i is less than 6, make i equal itself plus one and WriteLn.

CODE
program OtherLoops;

var
i: Integer;

begin
  for i: = 0 to 5 do
  i:= i + 1;
  WriteLn('Loop number ' + IntToStr(i));
end.


This loop works like this. i is 0. While i is going from 0 to 5, do the following. Then I made i equal itself plus one and made Scar WriteLn.

I hope the last two loop types were not too confusing. If you are confused, keep studying the examples. By making scripts that use different kinds of loops, you will learn how to use them.


EXTRA!

Sub-Begin and Sub-End;

This is something that you should learn before we go to the next step.

In general, there is the main loop. This is the begin end. However, there can be many tiny sections inside the main loop. You might need to separate them to make your life easier while editing scripts. This will also help you later when we learn if then else procedures.

CODE
program SubBeginAndEnd;

var
i: Integer;

begin
  ClearDebug;
  i:= 0;
  repeat
  begin
    i:= i + 1;
    WriteLn('Hi!');
    Wait(100+random(10));
  end;
  until(i = 5);
  WriteLn('That is how we use sub-begin and end.');
end.


9. Study this a little.

You see how I created a small sub-section in the main loop to make my script look neater, and to make that section easier to locate later if I wish to edit my script.

You can do this anywhere in the main loop, but remember that every begin must have an end. If you have 3 begins and 2 ends, you will get an error. Also remember that every end, except for the last one, will have ; following it.


Procedures


Procedures become simpler once you see some examples, but just know this: Procedures are used to reduce the amount you have to type out.

Procedures have their own loop. Remember that Scar will only do what you tell it in the main loop (last begin and end). Procedures have to be called on (Write the procedures name) in the main loop. If you're confused, look at the following example.

1. Copy this example.

CODE
program Procedures;

procedure Write; //procedure name (like program name)
begin
  WriteLn('I love pizza');//what to do in procedure
  Wait(100);
end;

begin
  Write; //use the procedure in main loop
end.


2. Study this example.

In this example I made a procedure named Write. You have to name procedures the same way you name the program. Next, I told Scar that the procedure will first WriteLn and then Wait.

Notice how I made the procedure have its own begin and end.

Next, I had to include the procedure name in the main loop to tell Scar to do what the procedure does.

3. Make your own script using a procedure.
4. Copy the following example.

CODE
program Procedures;

var
i: Integer;

procedure Move;
begin
  repeat
  begin
    i:= i+1;
    Wait(100);
    MoveMouse(200, 200);
  end;
  until(i = 2);
end;

procedure Combine;
var x: Integer;
begin
  ClearDebug;
  for x := 0 to 3 do
  x:= x + 1;
  Wait(100);
  WriteLn('Greetings All');
  Move;
end;

begin
  Combine;
end.


5. Study the example a bit.

In this example, I used multiple procedures. If you study the first procedure you will see how a procedure is a bit like its own loop. It can have more begin and ends and can have repeating loops. The first procedure Starts a repeat. I told Scar to Wait then MoveMouse. It will do this three times.

Next you see the procedure Combine. Study it a bit and you will see something strange.

In this procedure I included a variable inside the procedure. Yup, you can do this. However, since I made the variable only for the procedure, other procedures won't see it. This means that if you included x:= 0 in the main loop or another procedure, Scar would tell you that it doesn't know a variable named x.

In this script I used a for loop to tell Scar what to do three times. I told it to Wait, WriteLn, and then do whatever Move stands for doing.

Finally, I included the procedure Combine in the main loop to tell Scar to do whatever Combine does.

6. Experiment with this a bit. See what you can come up with.


If, Then, Else


Tired of reading? Well, we're almost at the end here. The last thing we will study is the If, Then, Else statement. This is one of the most important concepts for macroeing.

Scar uses colors to macro. What it does is this: If FindColor Then MoveMouse(to color). This is what you are about to learn how to do.

1. Copy down this example.

CODE
program IfThenElse;

var
x, y: Integer;

procedure ClickColor;
begin
  if FindColor(x, y, 123124124, 0, 0, 100, 200) then
  begin
    MoveMouseSmooth(x, y);
    Wait(100+random(200));
    ClickMouse(x, y, true);
  end else
  begin
     WriteLn('Color Not Found. :/ Sorry');
  end;
end;

begin
  Wait(1000);
  ClearDebug;
  ClickColor;
end.


2. Study this example a bit.

You should already know how to make a procedure. The procedure ClickColor does this. It tells Scar: If you FindColor, then MoveMouseSmooth, Wait, and ClickMouse; if you don't find color (end else) then WriteLn.

Let me explain the FindColor function a little.

x, y are used to fill where the color is found. For instance, if the color is found at 2, 50, then x will be 2 and y will be 50. The next long number (123124..) is the color number. To get this, use the color picker (ctrl+alt+p) to click on the color you want. It will display the color number in the debug box. 0, 0 are the starting cords at which Scar will start looking for the color. 100, 200 are the ending cords. Scar looks for cords left to right. In this example it would start at the coordinate 0, 0 and search 1, 0 2, 0 3, 0 until x became 100. Then it would go to the next line 1, 1 2, 1 3, 1.

If, Then, Else statements don't necessarily have to be used for finding colors. Let's look at one that doesn't look for colors.

3. Copy down the following example.

CODE
program IfThenElse;

var
i: Integer;

begin
  i:= random(4);//will be random 0 to 3
  if (i = 0) then
  begin
    WriteLn('i is 0');
  end else
  if (i = 1) then
  begin
    WriteLn('i is 1');
  end else
  if (i = 2) then
  begin
    WriteLn('i is 2');
  end else
  begin
    WriteLn('i is 3');
  end;
end.


4. Study the model.

Here you see how we use if, then, else statements for every-day stuff. I told Scar that i is a random of 0 to 3. Then, I told Scar if i is 0 WriteLn that i is 0; if i is 1 then WriteLn that i is 1; if i is 2 then...

This can also be used with constants. For instance, say you give your user an option.

5. Copy the following example.

CODE
program IfThenElse;

const
AmountOfLoops = 3;//How many loops you want do?
SayStuff = true;//true=say stuff; false=don't say stuff

var
i: Integer;

begin
  repeat
  i:= i + 1;
  if (AmountOfLoops >= 10) then
  begin
    WriteLn('Too many loops. Will not comply.');
    Exit;
  end else
  if (SayStuff = true) then
  begin
    WriteLn('Saying stuff.');
  end;
  until( i = AmountOfLoops );
end.


6. Study the model.

Don't get codeed here. I will explain it step by step. First we made two constants. These are options for the user of the script. The first is how many times the person wants the script to run.

SayStuff is your first glance at a boolean. Remember how a boolean is true or false. That is how you use a boolean. It is the same thing if you want to use it with variables. Just declare it as Name: Boolean; and use it in script as Name:= true;.

Next we started the script with a repeat. We told Scar if AmountOfLoops is greater than or equal to 10 then to WriteLn that there are too many loops and stop the script (Exit;).

Then we said if AmountOfLoops is not greater than or equal to 10 (end else) then if SayStuff is true (user wants us to say stuff) then WriteLn. You will see here that I did not use end else here. This is because I don't want the script to do anything if SayStuff = false. In Scar, this is implied if you don't use end else.

Finally we told Scar to run the script as many times as AmountOfLoops says (i = AmountOfLoops).

7. Play around with if, then, else statements and practice the find color procedures on your own. When you have mastered this the possibilities are endless on what you can program your computer to do.

Thats all for now. Happy Scripting!
Go to the top of the page
 
+Quote Post
post Feb 11 2009, 05:13 PM
Post #

Elite Membership


To get the most out of MmorpGuides.com, please view the following information.












Already a Member?

With an Elite Membership you can. . .

  • Reach the highest levels in no time
  • Have one of the most powerful characters in your game
  • Become a valuable member of your clan or guild
  • Become part of a caring and helpful community of gamers

Elite Members enjoy. . .

  • 1,660+ Cheats - tons of working, high quality cheats
  • 1,550+ Guides - We have one of the most comprehensive collections of guides on the net
  • 539+ Bots and macros - Level up quickly, even while you sleep!
  • A chance to win free prizes such as an amazing Playstation 3! And free gold and powerleveling!

No risk, only huge benefits!

  • Your investment can pay for itself in days!
  • Earn gold that you can trade for real money
  • Sell your high level items and characters for a profit!
  • Get tons of expensive guides and cheats in one spot for one small price

Money Back Guarantee!

Not 100% satisfied? We have a 24 hour, money-back guarantee! Contact us for a prompt and courteous refund!

Upgrade to an Elite Membership now!

Not A Member?

Join today and get access to all these great features!

  • Access to newly submitted cheats and guides
  • Download newly submitted bots and macros
  • Chat about your favorite game
  • Submit working content for a FREE Elite Membership!
  • And lots more!
Register Today!
Go to the top of the page
 
Quote Post
post May 10 2009, 06:57 AM
Post #2

margreg



SCAR Coder
Group Icon

Group: Elite Members
Posts: 183
Joined: 26-April 09
Member No.: 893,649






it is not always handy to work with repeat - until commands.
does goto command exists in SCAR ?
Go to the top of the page
 
+Quote Post
post May 11 2009, 06:26 PM
Post #3

n8t3d0gg



SCAR Coder
****

Group: Members
Posts: 82
Joined: 29-February 08
Member No.: 576,597






QUOTE(margreg @ May 10 2009, 06:57 AM) *
it is not always handy to work with repeat - until commands.
does goto command exists in SCAR ?


There is no "goto" command. What are you trying to do? Maybe I can help.
Go to the top of the page
 
+Quote Post
post May 12 2009, 04:44 AM
Post #4

margreg



SCAR Coder
Group Icon

Group: Elite Members
Posts: 183
Joined: 26-April 09
Member No.: 893,649






QUOTE(n8t3d0gg @ May 11 2009, 06:26 PM) *
There is no "goto" command. What are you trying to do? Maybe I can help.



if you wanna jump to a specific part of the script you use until - repeat chain, but then you need to add a condition for this as using until syntacsis, I wanna jump in a specific part of my script without any conditions, just jump thats it.
Go to the top of the page
 
+Quote Post
post May 12 2009, 11:45 AM
Post #5

n8t3d0gg



SCAR Coder
****

Group: Members
Posts: 82
Joined: 29-February 08
Member No.: 576,597






QUOTE(margreg @ May 12 2009, 04:44 AM) *
if you wanna jump to a specific part of the script you use until - repeat chain, but then you need to add a condition for this as using until syntacsis, I wanna jump in a specific part of my script without any conditions, just jump thats it.


Procedures in general preform this action.
CODE
begin
  repeat
    farm; {Naming this procedure, SCAR jumps to it and preforms its list of actions in your script.}
    if(not(wheat))then
      repeat
        search; {Naming this procedure, SCAR jumps to it and preforms its list of actions in your script.}
      until(wheat)
  until(false)
end.
Go to the top of the page
 
+Quote Post
post May 12 2009, 12:49 PM
Post #6

margreg



SCAR Coder
Group Icon

Group: Elite Members
Posts: 183
Joined: 26-April 09
Member No.: 893,649






QUOTE(n8t3d0gg @ May 12 2009, 11:45 AM) *
Procedures in general preform this action.
CODE
begin
  repeat
    farm; {Naming this procedure, SCAR jumps to it and preforms its list of actions in your script.}
    if(not(wheat))then
      repeat
        search; {Naming this procedure, SCAR jumps to it and preforms its list of actions in your script.}
      until(wheat)
  until(false)
end.


yes, but when naming procedure u jump to it and then u return to your previous location in script, when goto u jump to a specific part of the script and u proceed from there, for example if u want to jump forward in your script , using until - repeat u always jump back in script . using procedure u just execute it and then u return to your previous location in script, jumping forward is a problem.
Go to the top of the page
 
+Quote Post
post May 17 2009, 03:11 AM
Post #7

Learner



In Training
**

Group: Members
Posts: 5
Joined: 17-May 09
Member No.: 908,316






hi im new to this ive read through this can you send me a Template for farming bot and i try to find the colours my self?

i have used IMaxMacro for bots on maplestory but colours is a new thing to me
i learnt imaxmacro just by having a template and i tweaked it to work 99.99% 24/7 lvling bot

If you can could you tell me how to make a fighting bot for in incarnam?? send me a template ?

And can you use more than 1 bot as a time by having dofus open and 2 Scar's? so i could find the sword on a enu and pass and use osa to summon gobbal then pass?
Go to the top of the page
 
+Quote Post
post May 17 2009, 05:36 AM
Post #8

margreg



SCAR Coder
Group Icon

Group: Elite Members
Posts: 183
Joined: 26-April 09
Member No.: 893,649






QUOTE(Learner @ May 17 2009, 03:11 AM) *
hi im new to this ive read through this can you send me a Template for farming bot and i try to find the colours my self?

i have used IMaxMacro for bots on maplestory but colours is a new thing to me
i learnt imaxmacro just by having a template and i tweaked it to work 99.99% 24/7 lvling bot

If you can could you tell me how to make a fighting bot for in incarnam?? send me a template ?

And can you use more than 1 bot as a time by having dofus open and 2 Scar's? so i could find the sword on a enu and pass and use osa to summon gobbal then pass?


look at another post of mine

http://www.mmorpguides.com/forum/Fighting-bot-t20290.html

here you can see a fighting bot in incarnum, just configure it for using gobbal spell instead of tofu and it works find, you should add more monsters to this script cause it only kills one type of monster.
if you want it to randomly move throu locations you will have to add some moving procedure to it.
Go to the top of the page
 
+Quote Post
post Oct 17 2009, 01:14 AM
Post #9

piesman2424



In Training
**

Group: Members
Posts: 6
Joined: 27-February 09
Member No.: 849,664






can you give me a link to download this scar and please give me a script to log 8 accounts and kill the enemy with all str saddias or if possable one str saddia with bramble or manifold and a group of enus.

i fail at writing scripts. i have been trying for a few weeks with autoit v3 but i cant seem to get anywhere after i open dofus and sign in.
please help me thank you!


i would like it to
1. Open and log in to dofus on 8 accounts (or start working after i have signed onto dofus with them and i formed them into a group.)
2. get into a battle with some monsters lets say around astrub killing tofu gobbs larva and flowers of any sort depending on what the bot can kill.. with one account then...
3. to make all the accounts join and turn off the spectator mode.
4. kill all target monsters
5. exit out of the winning screen.
6. search and kill all remaining monsters on the map
7. go to a different map possably in a circular pattern so it doesnt reach a dead end and quit out on me or go in a linear pattern that goes back and forth untill a mob has been found.
8. loop the program so i can kill monsters for as long as i need.. i plan on letting it run for 6 hours at a time so i can unload the items the account have obtained and to set their stats.


(i would have looked at the other script for the incarnum but i am not an elite member.)
thank you for your help!
Go to the top of the page
 
+Quote Post
post Oct 17 2009, 04:11 AM
Post #10

lilwitte



SCAR Coder
Group Icon

Group: Elite Members
Posts: 318
Joined: 22-June 09
From: Deep in my Coding Cave. But don't feel bad! After all, it's on the darkside, and we have cookies!
Member No.: 934,937






QUOTE(piesman2424 @ Oct 16 2009, 08:14 PM) *
can you give me a link to download this scar and please give me a script to log 8 accounts and kill the enemy with all str saddias or if possable one str saddia with bramble or manifold and a group of enus.

i fail at writing scripts. i have been trying for a few weeks with autoit v3 but i cant seem to get anywhere after i open dofus and sign in.
please help me thank you!
i would like it to
1. Open and log in to dofus on 8 accounts (or start working after i have signed onto dofus with them and i formed them into a group.)
2. get into a battle with some monsters lets say around astrub killing tofu gobbs larva and flowers of any sort depending on what the bot can kill.. with one account then...
3. to make all the accounts join and turn off the spectator mode.
4. kill all target monsters
5. exit out of the winning screen.
6. search and kill all remaining monsters on the map
7. go to a different map possably in a circular pattern so it doesnt reach a dead end and quit out on me or go in a linear pattern that goes back and forth untill a mob has been found.
8. loop the program so i can kill monsters for as long as i need.. i plan on letting it run for 6 hours at a time so i can unload the items the account have obtained and to set their stats.
(i would have looked at the other script for the incarnum but i am not an elite member.)
thank you for your help!

Sorry to be the bearer of bad news (twice in 10 minutes, I'm on a streak!) but SCAR doesn't really support doing multiple windows, or anything like that easily, it'd make your script about 10x longer and you couldn't believe how complex that would be just to set up what i read... though the concept is very simple in comparison to say what the kama companies do and use... This is still waay over our heads in SCAR


--------------------
SCAR Coder

DofusBaseV1
[||||||||||]

Want to make progress bars like me?
CODE
use this base one as an example!
[[color="#00FF00"]|[/color][color="#FF0000"]|||||||||[/color]]
Go to the top of the page
 
+Quote Post
post Nov 26 2009, 07:27 AM
Post #11

cheatza



Newbie
*

Group: Members
Posts: 4
Joined: 26-November 09
Member No.: 1,052,831






dude great guide, read it and helped alot! shocked.gif shocked.gif shocked.gif shocked.gif shocked.gif out of 5!
Go to the top of the page
 
+Quote Post
post Jan 14 2010, 02:46 PM
Post #12

prikolica



Newbie
*

Group: Members
Posts: 1
Joined: 11-January 10
Member No.: 1,087,766






QUOTE(margreg @ May 17 2009, 06:36 AM) *
look at another post of mine

http://www.mmorpguides.com/forum/Fighting-bot-t20290.html

here you can see a fighting bot in incarnum, just configure it for using gobbal spell instead of tofu and it works find, you should add more monsters to this script cause it only kills one type of monster.
if you want it to randomly move throu locations you will have to add some moving procedure to it.



hello,realy nice guide and may i say the best on this site ( or any other site for that matter)
I've programmed in pascal for a year and this is same stuff xD
since im not elite member i dont have an acces to the link u posted
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 


> Board Footer
Time is now: 15th March 2010 - 09:48 PM