Results 1 to 6 of 6

Thread: Is this written right??

  1. #1
    Join Date
    Nov 2006
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Is this written right??

    I'm making an Al Kharid Bar Smelter. The scripts works nearly flawless, except for my SmeltBars procedure. For SmeltBars, it should:

    1) Find the Bronze Bar Bitmap that comes up in the chat screen when the furnace is clicked on.

    2) If the Bronze Bar Bitmap is found, then it should find the number that corresponds to Players[CurrentPlayer].integers[0].

    3) Whatever Players[CurrentPlayer].integers[0] is, then it should make that type of bar by right clicking on the bitmap the corresponds to Players[CurrentPlayer].integers[0]'s number, clicking Smelt X, then typing in the number of bars that should be smelted.


    Get me? Well I explained it my best, so hopefully you do Anyways, it's like the Bitmap for number 1 above is not being found. I remember testing my BMPs a few days ago and they all worked, but for some reason now they aren't working. Did I screw something up? Did I write something improperly? Well please help, and the procedure is below:


    SCAR Code:
    procedure SmeltBars;
    begin
      if (not (LoggedIn)) then Exit;
      repeat
        Wait(100 + random(100));
      until
        FindBitmapToleranceIn(Bronze, x, y, MCX1, MCY1, MCX2, MCY2, 40);
      case Players[CurrentPlayer].integers[0] of
        0:
          begin
            if (FindBitmapToleranceIn(Bronze, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('ronze', 'onze', 'nze')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('14');
                TotalSmelted := TotalSmelted + 14;
              end;
            end;
          end;
        1:
          begin
            if (FindBitmapToleranceIn(Blurite, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('lurite', 'urite', 'rite')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('28');
                TotalSmelted := TotalSmelted + 28;
              end;
            end;
          end;
        2:
          begin
            if (FindBitmapToleranceIn(Iron, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('ron', 'Iron', 'on')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('28');
                TotalSmelted := TotalSmelted + 28;
              end;
            end;
          end;
        3:
          begin
            if (FindBitmapToleranceIn(Silver, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('ilver', 'lver', 'ver')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('28');
                TotalSmelted := TotalSmelted + 28;
              end;
            end;
          end;
        4:
          begin
            if (FindBitmapToleranceIn(Steel, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('teel', 'eel', 'el')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('9');
                TotalSmelted := TotalSmelted + 9;
              end;
            end;
          end;
        5:
          begin
            if (FindBitmapToleranceIn(Gold, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('old', 'Gold', 'ld')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('28');
                TotalSmelted := TotalSmelted + 28;
              end;
            end;
          end;
        6:
          begin
            if (FindBitmapToleranceIn(Mith, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('ithril', 'thril', 'hril')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('5');
                TotalSmelted := TotalSmelted + 5;
              end;
            end;
          end;
        7:
          begin
            if (FindBitmapToleranceIn(Addy, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('damant', 'amant', 'mant')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('4');
                TotalSmelted := TotalSmelted + 4;
              end;
            end;
          end;
        8:
          begin
            if (FindBitmapToleranceIn(Rune, x, y, MCX1, MCY1, MCX2, MCY2, 40)) then
            begin
              MMouse(x, y, 5, 5);
              Wait(1000 + random(1000));
              if (IsUpTextMulti('une', 'Rune', 'ne')) then
              begin
                Mouse(x, y, 3, 3, false);
                Wait(2000 + random(1000));
                ChooseOption('X');
                repeat
                Wait(100 + random(100));
                until FindBitmapToleranceIn(Enter, x, y, MCX1, MCY1, MCX2, MCY2, 20);
                TypeSend('3');
                TotalSmelted := TotalSmelted + 3;
              end;
            end;
          end;
      end;
    end;


    Thanks for your time

    - Da Der Der
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

  2. #2
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't see anything wrong with it at all...

    It will wait until it finds the bronze bitmap, then it will smelt the bar according to whatever the user has assigned to Players[CurrentPlayer].integers[0].

    All looks good... Checks for bar bitmap, Moves mouse to it, checks uptext, Right clicks, chooses x, waits until enter number is found, type sends 14.

    All I can suggest is either your bitmaps aren't very good, or Players[CurrentPlayer].integers[0] is assigned to something like, 8? =P

  3. #3
    Join Date
    Nov 2006
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    8 is a solution I think you meant 9? Anyways, that's what I thought too. I don't know why they aren't working, because 2 days ago (I think), I made these BMPs and they all worked, I remember testing them. Well I was going to re-test them today, and they didn't work. I made new ones today, which were a little smaller, and they still didn't work. Could it have something to do with the tolerance perhaps?

    - Da Der Der
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

  4. #4
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, ohh ya, 8 is a solution. Silly me. But you got the idea.

    I doubt it's the tolerance, that's nice and high...

    Maybe it's because the smelt bars procedure doesn't seem to be loading any bitmaps at all? I can't see the script So I don't know if you've loaded the bitmaps in a procedure before this, but, is it as simple as that? You forgot to load them? xD

  5. #5
    Join Date
    Nov 2006
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    NO COMMENT!!! Hehe thanks
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

  6. #6
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Rofl. Good luck with the script

    Don't forget to free them aswell xD

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. LoginPlayer Re-written
    By Naum in forum Research & Development Lounge
    Replies: 15
    Last Post: 07-14-2008, 07:26 PM
  2. Its Been a While Since a New Mining Script Has Been Written...
    By mnagi85 in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 12-01-2007, 09:51 AM

Posting Permissions

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