Results 1 to 5 of 5

Thread: Bitmaps making my script lag

  1. #1
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default Bitmaps making my script lag

    I have tried to figure out what's wrong with my script. It doesn't lag all the time, but still... Propably the problem has something to do with freebitmaps.

  2. #2
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Move LoadBitmaps from inside the repeat loop to outside of it. You only need to call it once, and you currently have it called once every loop.

  3. #3
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You mean like this? I tried like this but lagged more than ever.
    SCAR Code:
    MarkTime(timemark);
    LoadBitmaps;
    repeat
     Chop;
     repeat
      Burn;
       if IsBlackText('ou can', 8) then avoidfire;
     until(not(FindBitmaptolerancein(log, x, y, MIX1, MIY1, MIX2, MIY2, 30)));
     Raport;
     if (TimeFromMark(timemark) mod 1000*60*breakafterminutes = 0) then Haveabreak;
     
     if(LogsBurned[CurrentPlayer] mod 15 = 0) and (LogsBurned[CurrentPlayer] <> 0)then
      begin
     
       if not LoggedIn then
         begin
          NextPlayer(false);
          writeln('oops! something has gone wrong! next player!');
         end;
         
       if LoggedIn then
        begin
          if (Players[CurrentPlayer].integers[1] = LogsBurned[CurrentPlayer])
           then
            begin
             writeln('This player has done his job, next player...');
             NextPlayer(false);
            end;
           if (Players[CurrentPlayer].integers[1] <> LogsBurned[CurrentPlayer])
            then
             NextPlayer(True);
             end;
      end;
    until(false);
    FreeBitmap(log);

  4. #4
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Huh. I dunno why it lags more like that. I don't think it should...

  5. #5
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I scan my computer, maybe i have some trojans or such shit. So i guess i publish my script (again) in the JR-Member scripts
    thanks for help!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Making bitmaps.
    By Floor66 in forum OSR Help
    Replies: 8
    Last Post: 01-24-2009, 02:20 PM
  2. bitmaps make my script laggy
    By marpis in forum OSR Help
    Replies: 3
    Last Post: 12-15-2008, 09:19 PM
  3. Making first script need some help
    By AC Lova123 in forum OSR Help
    Replies: 4
    Last Post: 05-10-2008, 12:33 PM
  4. Help making script!
    By King of the Nites in forum OSR Help
    Replies: 2
    Last Post: 09-18-2007, 01:25 PM
  5. script cant find bitmaps
    By XcanadamanX in forum OSR Help
    Replies: 6
    Last Post: 11-18-2006, 02:26 PM

Posting Permissions

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