Results 1 to 5 of 5

Thread: Can anyone tell me how I would solve this random (OSVELDAHAR)

  1. #1
    Join Date
    Oct 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Can anyone tell me how I would solve this random (OSVELDAHAR)

    imgur. com/KJu3X4L There's a server i'm playing right now that I would like to bot on, it has random events like this that appear (randomly of course :P) there are quite a few variations of this but if someone could possibly tell me the script needed to pass this one, I could apply it to all possible variations.

    Much thanks

    I couldn't post full link because of post count, but if you could check it out by arranging it properly thanks again!

    ALSO - If you could right a line somewhere in there that if this box appears it will solve it then restart script you would really be helping!
    Last edited by shuyin82; 10-31-2015 at 08:12 AM.

  2. #2
    Join Date
    Sep 2014
    Location
    C:\Simba\
    Posts
    565
    Mentioned
    9 Post(s)
    Quoted
    71 Post(s)

    Default

    You'd have to use some ocr for reading off the text, then a color finding function to differ which scimitar is which.

    This wont work, but it's a general example of how it would look somewhat, also there is no "script" predone for this. Noone has the time to make everything for every private server there is.

    This is if we assume there is an overload function called findText, (which there probably isnt).
    Simba Code:
    If FindText('Bronze Scimitar', SearchBox) Then
    Begin
      If FindColorTolerance(Settings for finding a bronze scimitar...) Then
        Mouse(x, y, 5, 5, Mouse_left);
    End;
    Last edited by Joopi; 10-31-2015 at 01:18 PM.

  3. #3
    Join Date
    Jun 2015
    Posts
    64
    Mentioned
    2 Post(s)
    Quoted
    21 Post(s)

    Default

    Some extra information about this would obviously make it easier to answer, for example does it always ask for a bronze scimitar and the scims are switched around each time or does it ask for a certain scimitar each time and the scims below are kept the same (if that makes sense) or is it a completely different random each time, honestly I think you should do what YouPee said however I doubt you'll be able to get the findText function so I'd just work it off bitmaps which work incredibly well.

    Simba Code:
    Function BronzeScim: Boolean;
    var
      x,y: Integer;
    begin
      if (FindBitmap(ScimitarTextBronze, x, y)) then
        result := true;
    end;

    Simba Code:
    procedure Scim1;
    var
    x,y: Integer;
    begin
      if (BronzeScim) then
      begin
      FindColorTolerance(Settings for finding a bronze scimitar...) Then
        Mouse(x, y, 5, 5, Mouse_left);
    End;

    ty YouPee for code blah blah you get the idea
    hi it me

  4. #4
    Join Date
    Oct 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah, i'm currently collecting all of the 16 possible variations of this random event, I have 10 so far and think that bitmaps would provide a better outcome, i just need the final 6 to show so I can screenshot them

  5. #5
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    I doubt you'll be able to get the findText function so I'd just work it off bitmaps which work incredibly well.
    It's not a problem, really. Simba is now using Tesseract OCR.
    Simba Code:
    program new;

    {$s+}
    type
      TDebug = (DEBUG, HEADER, SUB, FOOTER, LOG, HINT, WARNING, ERROR, FATAL);
    {$s-}
    procedure print(txt: string; debugType: TDebug = TDebug.DEBUG);// we need this to compile tesseract.simba without including the whole SRL
    begin
    end;

    {$i SRL-6\lib\core\tesseract.simba}
    function GetText(box :TBox) : string;
      var TesFilter: TTesseractFilter;
    begin
      TesFilter := TTesseractFilter([4, 4, [False, 20, TM_Mean]]);
      Result :=  Tesseract_GetText(box.x1, box.y1 , box.x2, box.y2, TesFilter);
    end;

    begin
      writeln(GetText(IntToBox(383,356,564,377 )) );
    end.

    Code:
    Compiled successfully in 530 ms.
    Click the ’Bronze Scimitar’
    Successfully executed.

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
  •