Log in

View Full Version : First ever Simba script... Need a little help.



Ezio85
02-21-2012, 09:31 AM
I keep on getting the Internal error (20) problem and every time I google it I end up finding someone else's code which is hitting the error and a completely different line of code. Mine comes from a ClickMouse command.


program superheat;
procedure selectsh;
Var
shspell:integer;
x:integer;
y:integer;
xs:integer;
ys:integer;
xe:integer;
ye:integer;
foundbitmap:boolean;
tolerance:integer;
begin
xs := 491;
ys := 619;
xe := 700;
ye := 900;
tolerance := 20;
shspell := LoadBitmap(ScriptPath + 'SHSpell.bmp');
while (foundbitmap=false)
do foundbitmap = FindBitmapToleranceIn(shspell, x, y, xs, ys, xe, ye, tolerance)
ClickMouse(x, y, mouse_Left);
end.

procedure selectmithore;
Var
mithrilore:integer;
x:integer;
y:integer;
xs:integer;
ys:integer;
xe:integer;
ye:integer;
foundbitmap:boolean;
tolerance:integer;
begin
xs := 491;
ys := 619;
xe := 700;
ye := 900;
tolerance := 20;
mithrilore := LoadBitmap(ScriptPath + 'mithore.bmp');
while (foundbitmap=false)
do foundbitmap = FindBitmapToleranceIn(mithrilore, x, y, xs, ys, xe, ye, tolerance)
ClickMouse(x+10,y+10, mouse_Left);
end.

begin
selectsh;
selectmithore;
end

YoHoJo
02-21-2012, 09:33 AM
NEVER use movemouse, movemousesmooth, clickmouse, holdmouse etc on runescape.
They are extremely robotic and will get you banned!

Also, please learn to use standards (popper spacing) in your code! Otherwise it's a nightmare to read it and to help you!

You should read some more beginner tutorials first before using this, you didn't even include SRL or use any SRL functions in it!

Good start, good effort, keep on a learning!

masterBB
02-21-2012, 09:41 AM
program superheat;

procedure selectsh;
Var
shspell:integer;
x:integer;
y:integer;
xs:integer;
ys:integer;
xe:integer;
ye:integer;
foundbitmap:boolean;
tolerance:integer;
begin
xs := 491;
ys := 619;
xe := 700;
ye := 900;
tolerance := 20;
shspell := LoadBitmap(ScriptPath + 'SHSpell.bmp');
while not(foundbitmap) do
foundbitmap := FindBitmapToleranceIn(shspell, x, y, xs, ys, xe, ye, tolerance);
ClickMouse(x, y, mouse_Left);
end;

procedure selectmithore;
Var
mithrilore:integer;
x:integer;
y:integer;
xs:integer;
ys:integer;
xe:integer;
ye:integer;
foundbitmap:boolean;
tolerance:integer;
begin
xs := 491;
ys := 619;
xe := 700;
ye := 900;
tolerance := 20;
mithrilore := LoadBitmap(ScriptPath + 'mithore.bmp');
while (foundbitmap=false) do
foundbitmap := FindBitmapToleranceIn(mithrilore, x, y, xs, ys, xe, ye, tolerance);
ClickMouse(x+10,y+10, mouse_Left);
end;

begin
selectsh;
selectmithore;
end.

fix'd, you used = where you should have used :=, also fixed the ends