Results 1 to 8 of 8

Thread: Find Lamp...

  1. #1
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Find Lamp...

    SCAR Code:
    {*******************************************************************************
    function FindLamp(skill: String): Boolean;
    by: Pups, Starblaster100,PriSoner, Lee Lok Hin, Timer
    Description: handles Genie. Results True if lamp found and handled.
    skill: Skill to use with lamp eg. 'strength', 'attack', etc.
    *******************************************************************************}


    function FindLamp(skill: string): Boolean;
    var
      LampTime, X, Y, I: Integer;
      TPA: TPointArray;
    begin
      GameTab(tab_Inv);
      if (FindDTM(Lamp, x, y, MIX1, MIY1, MIX2, MIY2)) then
      begin
        Result := True;
        Inc(RandSolved[rand_Lamp]);
        TakeScreen('Lamp Random Solved');
        AddToSRLLog('******** SOLVED LAMP RANDOM ********');
        WriteLn('******** SOLVED LAMP RANDOM ********');
        Mouse(X, Y, 4, 4, True);
        Wait(1500 + Random(500));
        MarkTime(LampTime);
        for I := 1 to 4 do
        begin
          case (LowerCase(Skill)) of
            'attack': Mouse(81, 109, 12, 12, True);
            'strength': Mouse(139, 110, 12, 12, True);
            'ranged': Mouse(196, 113, 12, 12, True);
            'magic': Mouse(257, 117, 12, 12, True);
            'defence': Mouse(319, 109, 12, 12, True);
            'crafting', 'craft': Mouse(376, 111, 12, 12, True);
            'hitpoints', 'hp': Mouse(436, 112, 12, 12, True);
            'prayer', 'pray': Mouse(79, 166, 12, 12, True);
            'agility': Mouse(141, 166, 12, 12, True);
            'herblore': Mouse(199, 171, 12, 12, True);
            'thieving', 'thief': Mouse(258, 167, 12, 12, True);
            'fishing', 'fish': Mouse(325, 164, 12, 12, True);
            'runecraft', 'runecrafting': Mouse(375, 167, 12, 12, True);
            'slayer', 'slay': Mouse(436, 173, 12, 12, True);
            'farming', 'farm': Mouse(83, 224, 12, 12, True);
            'mining', 'mine': Mouse(137, 222, 12, 12, True);
            'smithing', 'smith': Mouse(197, 220, 12, 12, True);
            'hunting', 'hunt', 'hunter': Mouse(257, 222, 12, 12, True);
            'cooking', 'cook': Mouse(318, 227, 12, 12, True);
            'firemaking', 'fire': Mouse(378, 226, 12, 12, True);
            'woodcutting', 'wc': Mouse(439, 222, 12, 12, True);
            'fletching', 'fletch': Mouse(199, 275, 12, 12, True);
            'construction': Mouse(255, 277, 12, 12, True);
            'summoning': Mouse(323, 276, 12, 12, True);
          else
            Mouse(438, 113, 12, 12, True);
          end;
          Wait(500 + Random(200) + Random(100));
          if FindColorTolerance(X, Y, 5602449, 41, 75, 470, 302, 30) then Break;
          if (TimeFromMark(LampTime) > 10000) then
          begin
            Result := False;
            Logout;
            Players[CurrentPlayer].Rand := 'Lamp';
            Exit;
          end;
          ClickToContinue;
        end;
        Mouse(416, 281, 7, 1, True);
        Wait(500 + Random(150) + Random(150));
      end;
    end;

    and...
    SCAR Code:
    {*******************************************************************************
    procedure LoadSRLBitMaps;
    By: SRL Dev Team
    Description: Loads SRL Bitmaps into memory.
    *******************************************************************************}


    procedure LoadSRLBitMaps;
    begin
      bmpMod := BitmapFromString(9, 6, 'beNqbPn0RWeDBgwdAkgEMkBnT' +
           'p0+HS6GR+KVwAgAGXFQr');
      bmpAdmin := BitmapFromString(9, 6, 'beNqbp/j9PwcZ6P//FiDJAA' +
           'bIjGvzFOFSaCR+KZwIALniVEk=');
        Lamp := DTMFromString('78DA639CC6C4C050C2C8800C664E1765F80FA' +
            '441A2FF8180B103A8A608550D030313988489322E01F24B09A899' +
            '0FE4971150331DC8AF24424D2E01355380FC7C026A6611A166129' +
            '05F4140CD1C22DCDC4BD82E00BB8011F9');//Fuck a bitmap..
    end;

  2. #2
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Lamp := DTMFromString('78DA639CC6C4C050C2C8800C664E1765F80FA' +
            '441A2FF8180B103A8A608550D030313988489322E01F24B09A899' +
            '0FE4971150331DC8AF24424D2E01355380FC7C026A6611A166129' +
            '05F4140CD1C22DCDC4BD82E00BB8011F9');//Fuck a bitmap..
    end;
    Don't think there was a need for that language or attitude...

    BUT the fix was greatly needed...bitmaps probably should be taken out of general use, and DTMs put into place...
    Last edited by Bad Boy JH; 01-30-2010 at 08:05 AM.

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    A DTM alone isn't really what I call stable, and generally a good idea when you are searching for a lamp. Unless you want it to find lamps all over the place, I suggest you use a bitmap. Then again, I don't know HOW many points this dtm has. I also don't see why a DTM is better than a bitmap in this case.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Bad Boy JH View Post
    Don't think there was a need for that language or attitude...

    BUT the fix was greatly needed...bitmaps probably should be taken out of general use, and DTMs put into place...
    I'm not really a attitude, just a inside joke.

    Quote Originally Posted by Wizzup? View Post
    A DTM alone isn't really what I call stable, and generally a good idea when you are searching for a lamp. Unless you want it to find lamps all over the place, I suggest you use a bitmap. Then again, I don't know HOW many points this dtm has. I also don't see why a DTM is better than a bitmap in this case.
    Eh, I tested it for 2 lamps, worked perfectly fine for me. I also made sure it didn't catch other items.

  5. #5
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Aren't DTM's easier to find...sorry I am still a noob, and haven't had any success with Bitmaps, and DTMs work perfectly...

  6. #6
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Bad Boy JH View Post
    Aren't DTM's easier to find...sorry I am still a noob, and haven't had any success with Bitmaps, and DTMs work perfectly...
    If you're talking about the inventory, you are probably not using the correct tolerance /method. According to a lot of people inventory bitmaps are "Faster than dtms" but I doubt that. The main advantage of a DTM is the possibility to be dynamic, accurately rotate, speed, and if you want will find objects with the same shape.

  7. #7
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    If you're talking about the inventory, you are probably not using the correct tolerance /method. According to a lot of people inventory bitmaps are "Faster than dtms" but I doubt that. The main advantage of a DTM is the possibility to be dynamic, accurately rotate, speed, and if you want will find objects with the same shape.
    x] It's not like.. a conspiracy that BMPs are faster than DTMs.. They say that because it is. Test it.

  8. #8
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK, so I was wrong, still, I haven't been able to get a working bitmap yet...

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
  •