Dadeer
12-18-2006, 07:54 PM
Part 1
Well if your reading this tutorial you might be really desprite because well it is beign done by a completely and totaly and utterly worthless noob but it might teach you something :D
First things first
Lets make a simple script
Open scar and it should look liek this
Program New;
Begin
End.
So far so good?
excellent
now ima throw something new out there
const
So now it should be
Program new;
const
Begin
end.
Now you may be thing WDF const can save you time and can be used for colors setting amount of players and other things but you wont learn them all here(im to noobish)
So lets say we are gonna make an autominer and you put isaxeequiped
you would put
Program New;
Const
isaxeequiped = true
Begin
end.
Then if the player useing your script had there axe equiped they would put true otherwise they would put false simple enough?
That would also be use friendly because if you didnt have that they would need to fix parts of your script up so it doesnt drop there axe or doesnt drop some of the ore like this
Program new;
const
isaxeequiped = true
Procedure dropore;
Begin
If(isaxeequiped = true) then
Dropto(1,28)
If(isaxeequiped = false) then
Dropto(2,28)
End;
end.
Thats an example butno wyour probly like uhhh if then dropto OMG ARE YOU TRYING TO KILL ME the awnser is yes probably
To use dropto(x,x) you must include srl like this
Program new;
{.include SRL/SRL.scar}
Procedure dropore;
and everything else from above
thanks to srl you dont have to do the very complicated things all you need to do is dropto(2,28) because the commands are already in there :D
Lets make a Nice little autominerscript
and this time lets use 2 procedures so open up scar and it looks like
Program New;
Begin
End.
Now lets add in the const's we will need so we will need
ispickaxeequiped = true/false
orecolor = 2898528<---color of the ore we are mineing
so it looks like this now
Program Autominer
Const
axeequiped = false;
orecolor = 2898528;
Begin
End.
Okay now lets add a procedure the mineing process
we will need a command to find the ore select teh option and mine untel the inv is full so
We need to dot his
Program autominer;
{.include SRL/SRL.scar}
Const
axeequiped = false;
orecolor = 2898528;
Procedure findandmine;
Begin
Repeat
If (FindColorSpiralTolerance(x, y, orecolor, MSX1, MSY1, MSX2, MSY2) then
Begin
Mmouse(x,y,1,1)
If IsUpText('ine') Then
Clickmouse(x,y,false)
Wait(100)
chooseoption(x,y, 'ine');
end;
Until(invfull)
End;
Procedure dropore;
Begin
If (invfull = true) then
Begin
If (axeequiped = true) then
Dropto(1,28)
If (axeequiped = false) then
Dropto(2,28)
end;
end;
Begin
setupsrl;
Repeat
findandmine;
dropore;
until(false)
end.
Begin
setupsrl;
repeat
findandmine;
until(false)
end.
And there is your first working actualy script i hope you know understand the basics of srl and scar
Well if your reading this tutorial you might be really desprite because well it is beign done by a completely and totaly and utterly worthless noob but it might teach you something :D
First things first
Lets make a simple script
Open scar and it should look liek this
Program New;
Begin
End.
So far so good?
excellent
now ima throw something new out there
const
So now it should be
Program new;
const
Begin
end.
Now you may be thing WDF const can save you time and can be used for colors setting amount of players and other things but you wont learn them all here(im to noobish)
So lets say we are gonna make an autominer and you put isaxeequiped
you would put
Program New;
Const
isaxeequiped = true
Begin
end.
Then if the player useing your script had there axe equiped they would put true otherwise they would put false simple enough?
That would also be use friendly because if you didnt have that they would need to fix parts of your script up so it doesnt drop there axe or doesnt drop some of the ore like this
Program new;
const
isaxeequiped = true
Procedure dropore;
Begin
If(isaxeequiped = true) then
Dropto(1,28)
If(isaxeequiped = false) then
Dropto(2,28)
End;
end.
Thats an example butno wyour probly like uhhh if then dropto OMG ARE YOU TRYING TO KILL ME the awnser is yes probably
To use dropto(x,x) you must include srl like this
Program new;
{.include SRL/SRL.scar}
Procedure dropore;
and everything else from above
thanks to srl you dont have to do the very complicated things all you need to do is dropto(2,28) because the commands are already in there :D
Lets make a Nice little autominerscript
and this time lets use 2 procedures so open up scar and it looks like
Program New;
Begin
End.
Now lets add in the const's we will need so we will need
ispickaxeequiped = true/false
orecolor = 2898528<---color of the ore we are mineing
so it looks like this now
Program Autominer
Const
axeequiped = false;
orecolor = 2898528;
Begin
End.
Okay now lets add a procedure the mineing process
we will need a command to find the ore select teh option and mine untel the inv is full so
We need to dot his
Program autominer;
{.include SRL/SRL.scar}
Const
axeequiped = false;
orecolor = 2898528;
Procedure findandmine;
Begin
Repeat
If (FindColorSpiralTolerance(x, y, orecolor, MSX1, MSY1, MSX2, MSY2) then
Begin
Mmouse(x,y,1,1)
If IsUpText('ine') Then
Clickmouse(x,y,false)
Wait(100)
chooseoption(x,y, 'ine');
end;
Until(invfull)
End;
Procedure dropore;
Begin
If (invfull = true) then
Begin
If (axeequiped = true) then
Dropto(1,28)
If (axeequiped = false) then
Dropto(2,28)
end;
end;
Begin
setupsrl;
Repeat
findandmine;
dropore;
until(false)
end.
Begin
setupsrl;
repeat
findandmine;
until(false)
end.
And there is your first working actualy script i hope you know understand the basics of srl and scar