samerdl
2013-04-04 08:24:28
I need guidance where to go on from here, please.
What it does right now: Using SPS for OSR; Goes from point A to Gate entrance right clicks in mouse coordinates to find the option to open gate then go to point C (does around 7 clicks because SPS for OSR is not accurate).
What i want it to do (if possible): Go from Point A find the Gate by color/bitemap/dtm and click it without doing the stop to find the open door option and continue with the path.
The Gate - added more pictures on my post below

So i tried the following:
- ACA - can't really find a best color, the gate has no door handle and the background area (everything in the landscape) has the same colors as it.
- DTM'S - tried variation of tolerance and dtm's, in the editor it shows up perfectly matching the spots, but in game it just doesn't work.
- Bitemaps - tried all sort of edges unique shapes on it (closed door areas), didn't work in game either.
maybe its something wrong with the code?
I know am missing something, just need someone to guide me where to look, i am looking for something worth investing effort into it, i really don't wanna learn more advanced stuff that don't actually help.. Or maybe this is all just hopeless.
Second question - is there a way to make the mouse move slowly\steady from one point to another till it finds an uptext option instead of just right clicking all over the place? How do you WindMouse?
if anyone could help me, i would be more than thankful!.
But please forgive my spelling mistakes, i didn't sleep properly today and had my exam in the morning in one city then had to drive for class to another.
What it does right now: Using SPS for OSR; Goes from point A to Gate entrance right clicks in mouse coordinates to find the option to open gate then go to point C (does around 7 clicks because SPS for OSR is not accurate).
What i want it to do (if possible): Go from Point A find the Gate by color/bitemap/dtm and click it without doing the stop to find the open door option and continue with the path.
The Gate - added more pictures on my post below

So i tried the following:
- ACA - can't really find a best color, the gate has no door handle and the background area (everything in the landscape) has the same colors as it.
- DTM'S - tried variation of tolerance and dtm's, in the editor it shows up perfectly matching the spots, but in game it just doesn't work.
- Bitemaps - tried all sort of edges unique shapes on it (closed door areas), didn't work in game either.
maybe its something wrong with the code?
program findgate;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
procedure findthegate;
var
wall, x, y: integer;
begin
wall := BitmapFromString(19, 18, 'meJy10dsKgkAUheE3ColEDMG7CA' +
'p8hYggs2GQDqh1JR2euw2LFsOMTWUE/5X4sXXvKEmiZ+M0LZtG0lX' +
'FTpcr2+72K6UGwVCKuqA6HJkJN2UpAY7i2LQ/wslsTli3rTTNMkle' +
'+HwiIFprDQVo2n5wkeeATHZIJSuVOqF7i/PtzgCDMETuD746IlZKi' +
'IkY+g/IXX37qZZ6C7lSF/JTJQ+0VgqIccui8JzDA3l0V/FJb2j+l3' +
'ULE3Kl7kQhD9K8d3A=');
If FindBitMapToleranceIn(wall, X, Y, MSX1, MSY1, MSX2, MSY2, 15) then
begin
WriteLn('success');
end
Else
begin
Writeln('failure');
freebitmap(wall);
end;
end;
procedure findgate;
var
aFound: extended;
x,y, wall: integer;
begin
DTMFromString('mWAAAAHicY2FgYIhmZGAIAuIIIPYB4jKgWCkQ9wBxIxDb2JgzVFYWMDQ2VoBpdMCIhkEAAL02CEM=');
if FindDTM (Wall, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
writeln ('success');
MouseBox(x, y, 0, 0, 0);
FreeDTM(wall);
end
else
begin
writeln (' failure');
end;
end;
begin
setupsrl;
findthegate;
findgate;
end.
I know am missing something, just need someone to guide me where to look, i am looking for something worth investing effort into it, i really don't wanna learn more advanced stuff that don't actually help.. Or maybe this is all just hopeless.
Second question - is there a way to make the mouse move slowly\steady from one point to another till it finds an uptext option instead of just right clicking all over the place? How do you WindMouse?
if anyone could help me, i would be more than thankful!.
But please forgive my spelling mistakes, i didn't sleep properly today and had my exam in the morning in one city then had to drive for class to another.





