Results 1 to 9 of 9

Thread: Script skips procedures

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Adding failsafes, muiltiple colors to a variable?

    I made a semi-working auto fighter and I was wondering how to assign muiltiple numbers to one variable? Example: In my script i have
    Code:
    loot=14079706;
    But i want loot to be more then that, like

    Code:
    loot=14079706,1385128,8169399,1796428;
    How would i go about doing that?
    Last edited by rj; 11-23-2012 at 06:41 PM.

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    If..then
    Begin
    ..
    End

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Shay View Post
    If..then
    Begin
    ..
    End
    ???

  4. #4
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    He means use this format for if then statements^^^

    Also, please learn the correct syntax and structure for Pascal. Do not declare a procedure inside a procedure (Procedure CheckCombat). Please take a look at the basics tuts on the forums.
    I beg...
    ~Rez

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    New problem, the script runs, clicks the npc and loops but sometimes it does not right click the loot, and it does not click the bitmap at all!
    Simba Code:
    program fite;
    Var
      X, Y, charm: Integer;
    Const
    // fill out
    NPC=1122383;
    loot=11908542;
    tolerence=15;
    time=7; // in seconds
    rwait=1000;
    tleft= 41;
    tright = 44;
    bleft=426;
    bright=280;
    // hitbar
    hpx1=242;
    hpy1=159;
    hpx2=296;
    hpy2=165;
    hpcol=50036;


    Procedure carmmap;
    Begin
      charm :=  BitmapFromString(31, 12, 'meJyTUdeWIQU5TPgPRyRpJNJkBj' +
            'CgrvnIJkNEkNnUMpwMvVN3HIMj/IZjDXOscQFxCcRMiDdxmY/scrQ' +
            'wxx8XcMPR2HiCBZmLi40ZJnAvUNdwBiSAJ9iJNxwevGiOx59mMJMl' +
            'VnHMdIvf8WjKiBGnEQIAUtQGXA==');

    End;
    Procedure Freecharm;
    Begin
      FreeBitMap(charm);
    End;
     procedure pickup;
    Begin
    charm :=  BitmapFromString(31, 12, 'meJyTUdeWIQU5TPgPRyRpJNJkBj' +
            'CgrvnIJkNEkNnUMpwMvVN3HIMj/IZjDXOscQFxCcRMiDdxmY/scrQ' +
            'wxx8XcMPR2HiCBZmLi40ZJnAvUNdwBiSAJ9iJNxwevGiOx59mMJMl' +
            'VnHMdIvf8WjKiBGnEQIAUtQGXA==');
      FindColorTolerance(X,Y,11185078,225,132,323,220,15)
      movemouse(x, y);
           Wait(120 + Random(80));
           ClickMouse(x, y, Mouse_right)
           wait(1000);
      If FindBitMapToleranceIn(charm, X, Y,248, 197, 270, 214, 65) Then
      Begin
        WriteLn('LOOTCHARM');
        movemouse(X, Y);
        ClickMouse(X, Y, Mouse_left)
        wait(3000);
      End Else
        WriteLn('Debug: We Could Not Find The charm');
    End;
    procedure checkcombat;
           begin
           Wait((time*1000) + Random(rwait));
           pickup;
           end;
    procedure clicknpc;
    var
      X, Y, charm: Integer;
    begin     // kill npc
             FindColorTolerance(X,Y,NPC,tleft,tright,bleft,bright,tolerence)
          movemouse(x, y);
          Wait(120 + Random(80));
           ClickMouse(x, y, Mouse_Left)
           checkcombat;
           End;
    begin
      repeat
      clicknpc;
      Freecharm;
      until (False);
      end.
    Last edited by rj; 11-23-2012 at 06:16 PM.

  6. #6
    Join Date
    Nov 2012
    Posts
    141
    Mentioned
    0 Post(s)
    Quoted
    43 Post(s)

    Default

    Code:
    ClickMouse(X, Y, Mouse_Left)
    You forgot the semicolon at the end of that line.

  7. #7
    Join Date
    Jan 2012
    Location
    127.0.0.1
    Posts
    702
    Mentioned
    11 Post(s)
    Quoted
    76 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    New problem, the script runs, clicks the npc and loops but sometimes it does not right click the loot, and it does not click the bitmap at all!
    Simba Code:
    program fite;
    Var
      X, Y, charm: Integer;
    Const
    // fill out
    NPC=1122383;
    loot=11908542;
    tolerence=15;
    time=7; // in seconds
    rwait=1000;
    tleft= 41;
    tright = 44;
    bleft=426;
    bright=280;
    // hitbar
    hpx1=242;
    hpy1=159;
    hpx2=296;
    hpy2=165;
    hpcol=50036;


    Procedure carmmap;
    Begin
      charm :=  BitmapFromString(31, 12, 'meJyTUdeWIQU5TPgPRyRpJNJkBj' +
            'CgrvnIJkNEkNnUMpwMvVN3HIMj/IZjDXOscQFxCcRMiDdxmY/scrQ' +
            'wxx8XcMPR2HiCBZmLi40ZJnAvUNdwBiSAJ9iJNxwevGiOx59mMJMl' +
            'VnHMdIvf8WjKiBGnEQIAUtQGXA==');

    End;
    Procedure Freecharm;
    Begin
      FreeBitMap(charm);
    End;
     procedure pickup;
    Begin
    charm :=  BitmapFromString(31, 12, 'meJyTUdeWIQU5TPgPRyRpJNJkBj' +
            'CgrvnIJkNEkNnUMpwMvVN3HIMj/IZjDXOscQFxCcRMiDdxmY/scrQ' +
            'wxx8XcMPR2HiCBZmLi40ZJnAvUNdwBiSAJ9iJNxwevGiOx59mMJMl' +
            'VnHMdIvf8WjKiBGnEQIAUtQGXA==');
      FindColorTolerance(X,Y,11185078,225,132,323,220,15)
      movemouse(x, y);
           Wait(120 + Random(80));
           ClickMouse(x, y, Mouse_right)
           wait(1000);
      If FindBitMapToleranceIn(charm, X, Y,248, 197, 270, 214, 65) Then
      Begin
        WriteLn('LOOTCHARM');
        movemouse(X, Y);
        ClickMouse(X, Y, Mouse_left)
        wait(3000);
      End Else
        WriteLn('Debug: We Could Not Find The charm');
    End;
    procedure checkcombat;
           begin
           Wait((time*1000) + Random(rwait));
           pickup;
           end;
    procedure clicknpc;
    var
      X, Y, charm: Integer;
    begin     // kill npc
             FindColorTolerance(X,Y,NPC,tleft,tright,bleft,bright,tolerence)
          movemouse(x, y);
          Wait(120 + Random(80));
           ClickMouse(x, y, Mouse_Left)
           checkcombat;
           End;
    begin
      repeat
      clicknpc;
      Freecharm;
      until (False);
      end.
    is the bitmap always found?
    also put a delay after you move your mouse and before it clicks
    Quote Originally Posted by Neodymium View Post
    Code:
    ClickMouse(X, Y, Mouse_Left)
    You forgot the semicolon at the end of that line.
    he said it works some times

  8. #8
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    I wonder if he ever got this resolved...
    Im guessing it just didn't find that specific charm? Thus it looks like it 'sometimes' clicked?
    ~Rez

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  9. #9
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    how to assign muiltiple numbers to one variable? Example: In my script i have
    See arrays. Off-site tutorials which may be of additional assistance may be this one and this one.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

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
  •