Results 1 to 5 of 5

Thread: 1st script help: finding a 'fallen' npc

  1. #1
    Join Date
    Jan 2012
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default 1st script help: finding a 'fallen' npc

    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:-

    Code:
    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?

  2. #2
    Join Date
    Nov 2011
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.
    Last edited by weeps; 03-07-2012 at 03:39 PM.

  3. #3
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    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 .

  4. #4
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    2,254
    Mentioned
    21 Post(s)
    Quoted
    238 Post(s)

    Default

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

  5. #5
    Join Date
    Jan 2012
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •