Results 1 to 24 of 24

Thread: InGE fix

  1. #1
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default InGE fix

    although J_Pizz made a fix too, i might as well post mine

    it uses dtms of the bankers, and the other is for the walls.

    i cant time how long it takes to find it because my cpu sucks, and it would be slow no matter what i use

    SCAR Code:
    Function InGeEx: boolean;
    var inge : array [0..1] of integer; x, y, i : integer;
    begin
     InGe[0] := DTMFromString('78DA63CC64666060646440067FFE308169982' +
           '86311500D0B01357940353C04D4A401D570E2570300CB1109CA');
      InGe[1] := DTMFromString('78DA63AC606660B8CB8002BE7D7CC5C005A41' +
           '981F83F10304E05AAF9895B0D08304E07AA1166C450C3005503C6' +
           '2E4035FF18F0AB4901AA31C06F0E009CF317A7');
      for i:= 0 to 1 do
      begin
        if dtmrotated(inge[i], x, y, mmx1, mmy1, mmx2, mmy2) then
        begin
          result := true;
          break;
        end;
      end;
      freedtm(inge[0]);
      freedtm(inge[1]);
    end;
    Last edited by Awkwardsaw; 08-16-2009 at 10:39 PM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  2. #2
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    I'm lazy right now, but make me something to run to test how long it takes and I'll run it for you. Good job with a fix though

    EDIT: This function is just to find out if you are at the g/e? not in it, like the exchange screen open?

  3. #3
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Akward, use DTMRotated instead of FindDTMRotated.

    And, those DTMs look pretty big, are you sure there's no way to make the points fewer, or have each of them cover a smaller area? (That is, if you have the points to different areasizes than 0.)

  4. #4
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Baked0420 View Post
    I'm lazy right now, but make me something to run to test how long it takes and I'll run it for you. Good job with a fix though

    EDIT: This function is just to find out if you are at the g/e? not in it, like the exchange screen open?
    mine works for the open screen thingy

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by EvilChicken! View Post
    Akward, use DTMRotated instead of FindDTMRotated.

    And, those DTMs look pretty big, are you sure there's no way to make the points fewer, or have each of them cover a smaller area? (That is, if you have the points to different areasizes than 0.)
    yes, i can make them smaller. i just made it so big to make sure(they are about 6-8 points each),

    and yes baked, this is just to find if you are at the place, not in the screen

    edit: i edited the function, like EC! said
    Last edited by Awkwardsaw; 08-16-2009 at 10:38 PM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  6. #6
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    soo.. nothing is going to be done about InGE?
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  7. #7
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    soo.. nothing is going to be done about InGE?
    That tends to happen with the majority of fix's that get posted...

  8. #8
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by NCDS View Post
    That tends to happen with the majority of fix's that get posted...
    i'm not to worried about this particular procedure to be added, or if its mine at all. its just that its used in this script, a lot haha. and in every GE procedure
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  9. #9
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    I'll commit this if you test it in five different worlds and it works every time.

  10. #10
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by EvilChicken! View Post
    Akward, use DTMRotated instead of FindDTMRotated.

    And, those DTMs look pretty big, are you sure there's no way to make the points fewer, or have each of them cover a smaller area? (That is, if you have the points to different areasizes than 0.)
    May I ask whats the difference between FindDTMRotated and DTMRotated?

  11. #11
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by BobboHobbo View Post
    May I ask whats the difference between FindDTMRotated and DTMRotated?
    DTMRotated does exactly what FindDTMRotated does, except you do not have to specify the angle. DTMRotated will keep incrementing the angle until the DTM is found or if the angle is above 'Pi / 3'. DTMRotated is in SRL whilst FindDTMRotated is in SCAR.

    I'm sure the code can explain it better:

    SCAR Code:
    {*******************************************************************************
    function DTMRotated(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
    By: Yakman
    Description: First looks for a DTM without rotation, then increases the amount
    of rotation around 0 gradually until it finds the DTM. A bit like the
    ProgressiveTol Bitmap Engines.
    *******************************************************************************}


    function DTMRotated(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
    var
      t, s, AngleFound: Extended;
    begin
      if (FindDTM(DTM, x, y, x1, y1, x2, y2)) then
      begin
        Result := True;
        Exit;
      end;
      repeat
        s := 0.3;
        repeat
          if (FindDTMRotated(DTM, x, y, x1, y1, x2, y2, 0 - t, 0 + t, s, AngleFound)) then
          begin
            Result := True;
            Exit;
          end;
          s := s - 0.1;
        until (s <= 0.1);
        t := t + (Pi / 20);
      until (t >= Pi / 3);
    end;

  12. #12
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by EvilChicken! View Post
    I'll commit this if you test it in five different worlds and it works every time.
    mkay
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  13. #13
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    im sorry i dont mean to drag on your function or anything but y would we need this at all?

    it checks if u are standing in the GE


    and if it needed u could shorten it big time if i recall there are some very unique symbols in the ge y not make a dtm of them

  14. #14
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    because they are used in every function in grandexchange.scar, tbh i think it should just be removed but if not it needs a fix

    and yes there are very unique symbols, which is what this dtm covers. they are not player accessable, unlike the symbols on the minimap, like the bitmap that the current one has

    and edit: i tested in 5 different worlds, 5 times each with different compass angles, and they all worked
    Last edited by Awkwardsaw; 08-20-2009 at 07:21 AM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  15. #15
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    well the current in ge checks if u are in the menu to actaully do the exchanging

    edit the words in the description could go either way
    Last edited by JPHamlett; 08-20-2009 at 10:16 AM.

  16. #16
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by EvilChicken! View Post
    I'll commit this if you test it in five different worlds and it works every time.
    Moar

    Remember those freak worlds

    I was testing FindTreeColour for 20 HOURS straight, and I got two freak worlds
    Last edited by noidea; 08-20-2009 at 10:19 AM.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  17. #17
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by J_Pizzle View Post
    well the current in ge checks if u are in the menu to actaully do the exchanging
    the bitmap showed the symbol on the minimap.

    is it on the screen too? if it is, i might cry lol
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  18. #18
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    the bitmap showed the symbol on the minimap.

    is it on the screen too? if it is, i might cry lol
    are you talking about the hang holding the coins if so yes it is in the screen

  19. #19
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by J_Pizzle View Post
    are you talking about the hang holding the coins if so yes it is in the screen
    [spam]OAIFB0U3QG40E8GF80Q3BIPJNRGFCLX;uaw97653y4o2geuwhd b0fuq3y0WYRGTFPBGPCNQEW0UGYR0BFPOVCABPWEYGR5Q03847 YG0HBFCQAUGEWRFNCAPAIEUBHFVPCQAEIJHBTG[/spam]

    i dont think i deserve to script for a while.. lol
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  20. #20
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    its ok man id be honored to do a script with u any time

  21. #21
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by J_Pizzle View Post
    its ok man id be honored to do a script with u any time
    thanks
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  22. #22
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    thanks
    yup anytime

  23. #23
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    InGE is for the GE screen, not for the "place".

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  24. #24
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by Rasta Magician View Post
    InGE is for the GE screen, not for the "place".

    ~RM
    [spam]OAIFB0U3QG40E8GF80Q3BIPJNRGFCLX;uaw97653y4o2geuwhd b0fuq3y0WYRGTFPBGPCNQEW0UGYR0BFPOVCABPWEYGR5Q03847 YG0HBFCQAUGEWRFNCAPAIEUBHFVPCQAEIJHBTG[/spam]

    i dont think i deserve to script for a while.. lol
    i know
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •