SRL Archive - OSR Help

1st script help: finding a 'fallen' npc


imscaredtolosemymain

2012-03-07 09:56:49

So working on my first ish script (after my working jadinko tracker one:) )

It is a thieving one, which rhymes with donkey kmife lighters (spelt so it doesnt come up in forum search yet).

Most of the logical steps are working, so jail solved, walking, banking etc.

Can someone suggest, without necessarily giving me the code, how to perform the second and third steps of
1)punch
2)pickpucket (Mis-Spelling on purpose)
3)pickpucket

punch is easy, with either finddtm or FindColorSpiralTolerance finding the donkey and knocking it out.

the problem i have is then finding the location of the fallen donkey and clicking on it again fast enough. The finddtm/colour dont seem fast enough, so i was hoping to use the x, y co-ords from the finddtm to just click in the same place:-

if pos('thump', GetBlackChatMessage) <> 0 then
begin
Wait(RandomRange(50, 75));
Mouse(x, y, 2, 2, mouse_Right); // LOOT 1
Wait(RandomRange(20, 40));
ChooseOption('pocket');
Writeln('Looted x1');
Wait(RandomRange(50, 75));
Mouse(x, y+RandomRange(1, 5), 2, 2, mouse_Right); // LOOT 2
Wait(RandomRange(20, 40));
ChooseOption('pocket');
Writeln('Looted x2');
Wait(RandomRange(200, 300));
End;


This only works ok if the donkey was standing beside my character when punched - if i have to runto it, then the x,ys are thrown off.

can anyone suggest an alternative method?

weeps

2012-03-07 10:25:16

I show split them up to two diffrent functions. I would also massclick when you have pounched the money down. Gl with your script!

This probly didnt answear the questionbut might be useful.

Getdropped

2012-03-08 08:07:12

What I would do is it you need it to click the same thing two times fast then just put in two mouse(); click functions after it finds the object you are lookng for.
EDIT:
and if you use left click it will be faster just have it look for the uptext of the object. Hope I helped ;) .

cause

2012-03-08 15:50:53

When you punch the donkey, do you move? Because you could just do an uptext check then click without even moving the mouse.

imscaredtolosemymain

2012-03-12 05:44:33

OK, i have made this work very well by limiting the search box and using findcolor - after i have punched, i will run beside the (m)onkey and then search a defined box 3x3 around the centre point.

trying to get the check for stun to work now, and have tried two methods - findblackchatmessage and looking to see if the xp has changed - neither method seems 100%.

Without these checks i seem to be limited to about 80k exp/h - i hope to double this with a bit of a play :) looking to have it done for bxpw friday.