SRL Archive - OSR Help

UpText problem - Cannot distinguish between fishing spots. [07]


Fishh

2013-02-26 14:49:42

Hey, I'm having some problems with UpText, I cannot distinguish between the fishing spots 'Cage, Harpoon' and 'Net, Harpoon'.

I can find fishing spots perfectly fine, but I only want to find the 'Cage, Harpoon' fishing spots. When a fishing spot is found my script will proceed to right and and select 'Harpoon', but this is useless if I cannot select the right spot.

My code so far:

program GuildFisher;
{$i SRL/SRL.simba}
{$i P07Include.simba}

function FishingSpotClick: boolean;

var
x, y: integer;

begin

x := MSCX;
y := MSCY;

If P07_FindObjCustom(x, y, ['Cage', 'age', 'Fishing', 'spot'], [14597535, 14597268, 15123625, 14398100, 15058085], 5) then
begin

GetMousePos(x, y);
Wait(100 + random(125));
ClickMouse2(mouse_right);
Wait(50 + random(175));
P07_ChooseOptionMulti(['Harpoon']);

end;
end;

begin

SetupP07Include;

FishingSpotClick;

end.

If I remove the 'Fishing', 'spot' from the UpText, the cursor will move very rapidly between all fishing spots on the screen and then do nothing. With them, it will select the spots and right click them, just not the correct spots.

Could someone tell me if I'm missing something out/doing anything wrong, or is UpText for '07 just not working at the moment?

I haven't added PlayerDeclare yet because I'm just trying to get the spot selection working correctly first.

Thanks very much for any help, I've been reading through tons of tutorials, other scripts for examples and still can't solve it.

Kevin

2013-02-26 15:00:00

From: Fishh
Hey, I'm having some problems with UpText, I cannot distinguish between the fishing spots 'Cage, Harpoon' and 'Net, Harpoon'.

If I remove the 'Fishing', 'spot' from the UpText, the cursor will move very rapidly between all fishing spots on the screen and then do nothing. With them, it will select the spots and right click them, just not the correct spots.

Could someone tell me if I'm missing something out/doing anything wrong, or is UpText for '07 just not working at the moment?

I haven't added PlayerDeclare yet because I'm just trying to get the spot selection working correctly first.

Thanks very much for any help, I've been reading through tons of tutorials, other scripts for examples and still can't solve it.


your issue would be around the command:
If P07_FindObjCustom(x, y, ['Cage', 'age', 'Fishing', 'spot'], [14597535, 14597268, 15123625, 14398100, 15058085], 5) then
The Uptext strings you send it allow for any ONE of them to be true, for it to consider using that spot (also, 'age' is inside 'Cage'). So, any fishing spot will be guaranteed to be considered true. I recommend trying to use something like this:
If P07_FindObjCustom(x, y, ['Cag', 'age', 'ge F'], [14597535, 14597268, 15123625, 14398100, 15058085], 5) then

Fishh

2013-02-26 15:13:40

From: nivek1989
your issue would be around the command:
If P07_FindObjCustom(x, y, ['Cage', 'age', 'Fishing', 'spot'], [14597535, 14597268, 15123625, 14398100, 15058085], 5) then
The Uptext strings you send it allow for any ONE of them to be true, for it to consider using that spot (also, 'age' is inside 'Cage'). So, any fishing spot will be guaranteed to be considered true. I recommend trying to use something like this:
If P07_FindObjCustom(x, y, ['Cag', 'age', 'ge F'], [14597535, 14597268, 15123625, 14398100, 15058085], 5) then


Thank you so much. It's working for just the 'Cage, Harpoon' spots now. The only problem is that it will rapidly move between fishing spots occasionally until it finds the correct spot type, is there any way to slow this down? It seems really un-natural and probably an easy ban.

Cheers!

EDIT: Is there anyway to implement a small wait inbetween every mouse movement to a new spot?

DannyRS

2013-02-26 15:15:55

From: Fishh
Thank you so much. It's working for just the 'Cage, Harpoon' spots now. The only problem is that it will rapidly move between fishing spots occasionally until it finds the correct spot type, is there any way to slow this down? It seems really un-natural and probably an easy ban.

Cheers!


MouseSpeed:=12;

after all setup; stuff

Fishh

2013-02-26 15:19:29

From: DannyRS
MouseSpeed:=12;

after all setup; stuff


Wow, that simple? Lol, thanks. Seems so obvious now. Got a base fisher pretty much working now, thanks for all your help guys. No doubt I'll be asking for more in the future.

Cheers.