SRL Archive - OSR Help

Help with script! (easy)


account99

2012-11-15 10:20:53

I am making a script for a game called Endless Online and i have multiple scripts for it but i decided i want to make my own so ive been learning about scar (im using 3.36 newest) and im making my own scripts. I came to a stop when i was trying to make a little script that will press f2 then releas f2 after about half a second then click on a color that it finds. my error says: Type Mismatch but no idea what to do, somone help (if possible also fix it for proper indenting and such)? :)

This is my script:

Program Mage;
var
x, y, z, monster1: Integer;
begin
monster1:= 1638350;
z:=0;
repeat
if(FindColor(x, y, monster1,324,171,955,651))then
begin
keydown(113);
wait(550)
KeyUp(113);
clickmouse(x, y, true)
wait(850)
end
until(x = 5000000)
end.

account99

2012-11-15 10:26:10

It works in older versions of scar like 3.12 but it isnt working for 3.36, which is what i need it on.

nokkasiili

2012-11-15 11:24:11

Umm this is Simba forums
but the Type Mismatch means you are trying to assing variable a value that doesnt match the type
solution:http://wiki.scar-divi.com/index.php?title=ClickMouse
ClickMouse(500,500,mbRight);

Laimonas171

2012-11-15 11:30:23

From: account99
It works in older versions of scar like 3.12 but it isnt working for 3.36, which is what i need it on.


According to your post count + double post + that you are still using "scar" you are leecher

but anyways. if you want to learn… At least I hope You do.. check all theese
http://www.youtube.com/playlist?list=PLAA8F9AF6A13ABD90 and you will be able to create Powerleveling script for RS and for game you trying to make the script.

mounty

2012-11-15 20:14:43

I'm not the best but i think you were just passing the wrong variable to clickmouse.
Try this:
Program Mage;
{$i srl/srl.simba}

var
x, y, z, monster1: Integer;

begin
monster1:= 1638350;
z:=0;
repeat
if(FindColor(x, y, monster1,MSX1,MSY1,MSX2,MSY2))then
begin
keydown(113);
wait(550)
KeyUp(113);
clickmouse(x, y, Mouse_left);
wait(850);
end;
until(x = 5000000)
end.

Rent

2012-11-16 15:43:21

From: Rent
From: Laimonas171
According to your post count + double post + that you are still using "scar" you are leecher

but anyways. if you want to learn… At least I hope You do.. check all theese
QUOTE]

I don't get how that makes him a leecher… his postcount is most-likely low because as soon as he made his account he has been reading guides/tuts?
well, i'm pretty new here, but i've spent alot of time trying to learn how to script hence my postcount. sometimes things happen and we need a lil help :/


ignore the quotes around mine lol.