Results 1 to 5 of 5

Thread: IsTextAt2

  1. #1
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default IsTextAt2

    there are a few occations when people use IsTextAt2 in SRL when they should not, this function only works if you put loadchars('') in your main loop

    i know that loadchars('') is not used in SRL because if it was, you would get the message "font loaded from c://program files/..../scar/charsrs2/"

    one example is in skills/woodcutting.scar, DropAllLogs

    SCAR Code:
    rocedure DropAllLogs;
    var
      rx, ry, m, n : Integer;
    begin
        Status('Dropping Logs');
        Gametab(4)
        begin
          for M:=1 to 7 do
          begin
            for n:=1 to 4 do
            begin
              rx := 544 + (n * 42)
              ry := 192 + (m * 36)
              mmouse(rx, ry, 0, 0)
              wait(100 + random(100));
              if (IsTextAt2(9, 9, 'Wield', 100)) or
                 (IsTextAt2(9, 9, 'Search Bird', 100)) or
                 (IsTextAt2(9, 9, 'Use Knife', 100)) or
                 (IsTextAt2(9, 9, 'Use Tinder', 100)) then    
                    Chopped := Chopped - 1;

    Another example is in core/text.scar, FindTextSpiral, i understand this because it was made by people who didn't use loadchars2 or IsTextAtEx (khain and ohdearurdead)

    SCAR Code:
    GetMousePos(x, y);
          x := x - step;
          MoveMouseSmooth(x, y);
          Wait(SpiralWait);
          if (IsTextAt2(9, 9, txt, 100)) then
            FoundText := True;
        until (qx >= x) or (FoundText);
        if (FoundText) then
          Break;

    My point is, in the next SRL, change these IsTextAt2 to IsUpText or something, otherwise it will not work unless we all put loadchars('') in our main loops

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I'm not sure, but isn't loadchars already in srl. Meaning that when you do SetupSRL; that it also does LoadChars('');...
    Administrator's Warning:


  3. #3
    Join Date
    Feb 2006
    Location
    Myrtle Beach, SC USA!
    Posts
    841
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Sub Zero
    I'm not sure, but isn't loadchars already in srl. Meaning that when you do SetupSRL; that it also does LoadChars('');...
    Actualy no its not, and that is a very good observation we were already discussing adding LoadChars to SRL, it just wasnt a high priority yet...

  4. #4
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    when you do loadchars, it says "font loaded from ....scar/charsrs2"
    thats how i know that SRL doesn't use loadchars

    I dont think SRL should have it, its a depreceated function so it probably has some fatal flaw in it which made kaitneiks decide to scap it and change to loadchars2

  5. #5
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Well i must say, very nice observation, how in the world did you found out about this . I'm sure something will be done about it pretty soon
    Administrator's Warning:


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unknown identifier 'IsTextAt2'
    By Acroya in forum OSR Help
    Replies: 4
    Last Post: 07-15-2008, 01:20 PM
  2. 'IsTextAt2' Error in my Auto Smithing...
    By Biogenes in forum OSR Help
    Replies: 2
    Last Post: 02-17-2008, 09:04 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
  •