SRL Archive - Help and Support

help with auto turn off script and color finding


ub3r |<1||3r*1337*

2006-04-09 10:24:43

i need help getting the script to shut it self off and how to find colors and click on them. i dont get the xs,ys,xe,ye thing.

XxKanexX

2006-04-09 10:34:52

Terminatescript will stop the script immiedatly.


begin
repeat
Terminatescript;
until(false);
end.
;) (The point in that script was that it didn't repeat doing nothing. It stopped. :p)

ub3r |<1||3r*1337*

2006-04-09 10:36:40

ok thanks, can i get help with auto color finding? i'm making a port sarim mager (as it says in my sig) and there are a whole BUNCH of colors the ppl need to get. i dont think they would like it…

XxKanexX

2006-04-09 10:44:21

You'd need to learn xs, ys, xe, ye.

Then you could do things like:

if (FindColorTolerance(x, y, Color, xs, ys, xe, ye, 9)) then
AutoColor:= Getcolor(x, y);

ub3r |<1||3r*1337*

2006-04-09 11:25:48

ok, i found out that i need to know how to use 'else' and 'and' in a script, where should i put them? and how does xs,ys,xe,ye form a box? is the box like this?(ignore the smileys)


________
lxs :rolleyes: ysl
l:rolleyes::rolleyes::rolleyes: l
l:rolleyes::rolleyes::rolleyes: l
lxe :rolleyes: yel
- - - - - - l


EDIT: and i just read ur tut on bitmaps, how can i use them in a script? like for walking or something

ReFLeX

2006-04-09 11:47:27

xs,ys,———-|
|—————|
|—————|
|———–xe,ye

ub3r |<1||3r*1337*

2006-04-09 12:00:53

oh… i get it! i finally get it! ok, now… how do you use bitmaps? they are just numbers and letters in a script to me…

ReFLeX

2006-04-09 12:26:06

bitmaps are pictures, and to use them in scar, they have to be in the letter and number form. To change a picture into a string, go to Script > Picture to String. Load your pic or paste it and then click ok. To use it, make somehtinig like this.


program bmp;

var bmp : string;
x, y : integer;
begin;

bmp:= BitmapFromString(9, 9, 'z78DA7333763371757543264D882047' +
'7511A1CBD2C5D2C5D11017895F177976E1D20500AD647846');

FindBitmap(bmp, x, y);
clickmouse(x, y, true);
end.
this will find the bmp and click on it. Also read kane's tut http://www.villavu.com/forums/showthread.php?t=703

ub3r |<1||3r*1337*

2006-04-09 12:32:43

i know that, how do you use it though?
and what is the function for sending the arrow keys? like the left arrow key

c0de

2006-04-09 13:08:53

FindBitmap(BitmapName,x,y)

FindBitmap is boolean (returns true or false)
x,y are used to store coordinates where scar found bitmap


SendArrowSilent(a)

a can be 1-4 ? or 0-3 not sure try experimenting with those

ub3r |<1||3r*1337*

2006-04-09 13:36:15

ok, i got everything there… guess what? i finished my script! i just need to fix some errors… there is an invaild number of params here,
Begin
repeat
findcolortolerance(x,y,9819,626,112,138,7)
clickmouse(x,y,True){<------------------invaild number of parameters in line {64:1}}
wait(8000)
clickmouse(681,91,True)
wait(8000)
findcolortolerance(x,y,blackknight,88,118,316,325,5)
clickmouse(x,y,True)
repeat
if findcolortolerance(x,y,blackknight,88,118,316,325,5)then
wait(4000)
until(findcolortolerance(x,y,blackknight,88,118,316,325,5)False)
until(wait(200000)
end;
and there isnt one here…. hmmm
Begin
findcolortolerance(x,y,jewlerysymbol,617,112,656,153,3)
x:=x+18
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,minigame,664,137,693,144,8)
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,fishingsymbol,615,98,656,144,8)
y:=y+25
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,foodshopsymbol,638,112,674,143,4)
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,doorsymbol,621,120,648,151,7)
clickmouse(x,y,True)
end;

how can there be an invaild param error!

WhiteShadow

2006-04-09 14:38:46

procedure Blah;
begin
if(FindColorTolerance(x, y, jewlerysymbol, 617, 112, 656, 153, 3))then
begin
x:=x+18
clickmouse(x,y,True)
wait(14000)
if(findcolortolerance(x,y,minigame,664,137,693,144,8))then
begin
clickmouse(x,y,True)
wait(14000)
if(findcolortolerance(x,y,fishingsymbol,615,98,656,144,8))then
begin
y:=y+25
clickmouse(x,y,True)
wait(14000)
if(findcolortolerance(x,y,foodshopsymbol,638,112,674,143,4))then
begin
clickmouse(x,y,True)
wait(14000)
if(findcolortolerance(x,y,doorsymbol,621,120,648,151,7))then
begin
clickmouse(x,y,True)
end;
end;
end;
end;
end;
end;

here is a revised version that compiles

Suggestions
1. Use SRL and use it's randoms mousemoves etc. Because like this is very detectable and can get someone easily banned.(I didn't help you do that..)
2. With Functions please use if()then statements
3. Use standards
4. You don't need x:=x+18 just try Ex.

ClickMouse(x+18, y, true);

Anyways nice seeing people make progress. ;)

XxKanexX

2006-04-09 18:06:05

Whiteshadow those ends arn't in the right places :p

WhiteShadow

2006-04-09 18:31:14

From: XxKanexX
Whiteshadow those ends arn't in the right places :p


Oops, wrong angles. I get mixed up alot since Driger taught me a while back that you start from the top begin coming down. Then other people said start from the bottom ends up. -.-

phantombmx

2006-04-10 01:11:57

guess i need to make a tut for standards (my version) because most people say my standards are awesome.. :rolleyes:

XxKanexX

2006-04-10 02:13:01

From: phantombmx
guess i need to make a tut for standards (my version) because most people say my standards are awesome.. :rolleyes:

All standards are pretty much the same. Theres no awsome version.

Just having everything legible is great. ;)

Jagex_Fagex

2006-04-10 08:04:02

that params error you got, is actually in the line above ;) check it out, don't have enough time to work it out just now, but i counted the params for a fincoltol thing in the second script, and it was 8, the number of params in the first fincoltol in first script is 7…

~Jagex_Fagex (a.k.a 3xtr3m3z Macroing)

Krazy_Meerkat

2006-04-10 08:27:41

Yes the error will sometimes be on the line above :/
As for this part
findcolortolerance(x,y,9819,626,[B]112[/B],138,[B]7[/B])
xs and ys are the starting co-ords, the procedure will start from the top-left corner and go right and down. But you have started the Y position at 112, swap it with 7.
Very funny, I had a similar error like this today and I couldn't figure out what was wrong.. *Slaps self on forehead* It was so obvious