Results 1 to 5 of 5

Thread: Procedure lagging problem

  1. #1
    Join Date
    Dec 2006
    Posts
    173
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Procedure lagging problem

    Well, I am back again. In my upcoming version of Macho Chopper( everything is being tested...), I am adding the ability to burn the logs you chop. Right now I am trying to get my firemaking procedure to work. All it does is click the tinderbox and lags( it used to work before). Anyone have any ideas? Also you can post comments or suggestions on how to make it better.( and constructive critisism )

    Here is the procedure and function:
    SCAR Code:
    var
      X3, Y3 : Integer;
    function FindLightChat : Boolean;
    begin
      If(Not(LoggedIn)) then NextPlayer (False);
      begin
        If(FindDTM(TindB, X3,Y3, 562, 208, 731, 459)) then
        begin
          Writeln(' Found Tinderbox, Everything Looks Good ');
          begin
            if(InChatMulti('ou can', 't ligh', 't a fir'))then
            begin
              HighestAngle;
              wait(10+random(10));
              Writeln(' Could Not light the fire there, moving player ');
              MouseFindFlag(MMCX, MMCY, 15, -15);
              Flag;
            end;
          end;
        end;
      end;
    end;


    Var
      X2, Y2 : Integer;
    procedure LightAndMakeFire;
    begin
      If(Not(LoggedIn)) then Exit;
      If (InventoryCount = 28) or (InvFull) then
      begin
        repeat
          If (FindDTM(TindB, X2,Y2, 562, 208, 731, 459)) then
          begin
            Mouse(X2, Y2, 5, 5, True);
            Wait(100+random(100));
            FindLightChat;
            wait(10);
            If (FindDTM(RLog, X2, Y2, 562, 208, 731, 459)) then
            begin
              Mouse(X2, Y2, 5, 5, True);
              FindLightChat;
              Wait(1000+random(100));
              LightWait;
            end;
          end;
        until (Not(FindDTM(RLog, X2, Y2, 562, 208, 731, 459)))
        Loads:= Loads + 1;
      end;
    end;
    Starting to merchant, if you know of any good clans, PM me please.

  2. #2
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hi agen... I would suggest that you only need to find the tinb dtm once- u can then just contiue using the x2 and y2 variables. then perhaps instead of trying to find a dtm of the log you could do the following:
    SCAR Code:
    for i:= NoOfItems + 1 to 28 do
      begin
        if (tinduse = false) then Mouse(X2, Y2, 2, 2, True);
        MMouseItem(i);
        if (IsUpTextMulti('igh','ght','ogs') then
        begin
          MouseItem(i,true);
          tinduse := false;
        end else tinduse:=true;
      end;
    You would need to list i and NoOfItems as integers and tinduse (representing whether the tinderbox is clicked or not) as a boolean. That dosnt include your findlightchat or lightwait which you would have to slot in

  3. #3
    Join Date
    Dec 2006
    Posts
    173
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the help Joerobo, I will test it and see how it works. Also I have to pm you about something.

    Anyone else have any ideas?!?
    Starting to merchant, if you know of any good clans, PM me please.

  4. #4
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add a wait inside the repeat loop, that should take care of the lag.

    Also, might want to reset x2 and y2 variables after they have been used, if you are going to use them again. But, i like joerobo's idea of storing the coordinates so you dont have to keep on looking for the DTM

  5. #5
    Join Date
    Dec 2006
    Posts
    173
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Infintiy, thanks for posting. So, I just increase the wait time? Wow, thats an easy fix.

    Anyone else have any ideas on how to make the procedure or function better?
    Starting to merchant, if you know of any good clans, PM me please.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Lagging bad!
    By Illkillutill in forum OSR Help
    Replies: 6
    Last Post: 04-15-2008, 01:04 AM
  2. its keeps on lagging
    By cheese444222 in forum OSR Help
    Replies: 2
    Last Post: 10-08-2007, 09:58 PM
  3. Why is this lagging?
    By Dude in forum OSR Help
    Replies: 4
    Last Post: 08-16-2007, 01:33 AM
  4. Procedure Problem
    By Macho Man67 in forum OSR Help
    Replies: 9
    Last Post: 06-25-2007, 02:01 AM
  5. Replies: 4
    Last Post: 05-09-2007, 11:19 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
  •