SRL Archive - OSR Help

Having troubles!


dubbelfisk

2012-11-30 20:28:34

Started "scripting" today, im trying to understand, but im not just there yet.

Im making a simple Ironminer script for a old RSPS, what i want is to be able to watch a movie half screen when it's filling my inventory with Iron. I'll walk back to bank manually, cause i can do that without losing my focus on the movie.

So, this is my "script".

Program Ironminer;

//{$DEFINE SMART}
{$include SRL\SRL.simba}
{$i SRL\SRL\Misc\paintsmart.simba}

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function Mining:Boolean;

Var x, y: Integer;

Begin
// FindObjTPA(var x, y: integer; color, tol, cts, ObjWidth, ObjHeight, minCount :Integer; UpText: tstringarray): Boolean;
x:=MSCX;
y:=MSCY;
If FindObjTPA (x, y, 2240332, 20, 1, 20, 20, 200, ['Mine']) Then
Begin
Statsguise ('New window');
GetMousePos (x, y)
Begin
Mouse (x, y, 5, 5, False);
ClickMouse (x, y, 1)
End;
End;
End;

Begin
SetupSRL;
//Repeat
Mining;
//Until(false);
End.

Ian

2012-11-30 20:34:19

I don't think the ['Mine'] uptext can be found unless it is actual runescape, not sure though

dubbelfisk

2012-11-30 20:45:01

From: BMWxi
I don't think the ['Mine'] uptext can be found unless it is actual runescape, not sure though


It is Runescape, just a older version and i can clearly see a text in the upper left corner saying "Mine" when im holding my cursor over a iron rock.

I might understand what you're trying to say, since it's a newer version of Simba/Scar (RS overall) it's not compatible with the old textures?

Rezozo

2012-11-30 20:48:06

Wasn't there a huge issue b4 about the font change? I doubt it would be the same font that it reads now. Or I could just be making the entire thing up :P
~Rez

Ian

2012-11-30 20:50:07

From: dubbelfisk
It is Runescape, just a older version and i can clearly see a text in the upper left corner saying "Mine" when im holding my cursor over a iron rock.

I might understand what you're trying to say, since it's a newer version of Simba/Scar (RS overall) it's not compatible with the old textures?


Yeah, I think the font is different in old rs, so simba can't detect it because it detects font using the current runescape fonts. I'd make a dtm for the font, or if you are confident about your colors just use FindColorTolerance.

dubbelfisk

2012-11-30 20:54:09

From: BMWxi
Yeah, I think the font is different in old rs, so simba can't detect it because it detects font using the current runescape fonts. I'd make a dtm for the font, or if you are confident about your colors just use FindColorTolerance.


Im not quite sure the color is going to work by itself, since there is a bunch of annoying scorpions with the same colors, but i'll give it a try.

P1ng

2012-11-30 20:56:09

If you are not using the most current RS then the uptext will be an issue. As the game has changed they have also updated the fonts and thus the WaitUpText and IsUptext functions will not return the correct result on older versions. Try making a DTM of the UpText and using that