Results 1 to 6 of 6

Thread: GetTextAtEx and new fonts.

  1. #1
    Join Date
    Aug 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default GetTextAtEx and new fonts.

    Code:
    chars:= LoadChars2(AppPath+'Fonts/new/');
    Result:=GetTextAtEx(x,y,50,chars,false,false,0,0,color,length,false,tr_AllChars);
    Exit;
    I'm working on creating a script for a non-rs game and am working with a different font. First question: for the function GetTextAtEx what are the values 0,0 for? I know what all the rest of the parameters are, but couldn't find details about that anywhere.

    Next... for LoadChars2 because I'm using a different font, is there a way to have this loaded automatically like the RS fonts?

    Lastly, I know you need to have the exact location of the text, but for the game I'm working with the Y value is always the same, but the x value is different depending on the length of the string because the text is centered. Are there any functions to deal with that?

  2. #2
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    1. if the text does not move slightly (like it does in rs (it sometimes move left or right 1 or 2 pixels)) then use 0,0

    2. no it has to be built into scar which only Freddy can do

    3. im not to sure how you would do that but where theres a will theres a way

    ~shut

  3. #3
    Join Date
    Aug 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    3. im not to sure how you would do that but where theres a will theres a way
    I wrote a function to do it, the location is always the same based on the number of digits, so it checks for color at the location it would be for, say, 6 digits, if it finds the color it gets the text, and then 5, 4, etc until it finds it. It works, but is slower than I want it to be.

  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  5. #5
    Join Date
    Aug 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    card counting black jack game

  6. #6
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First you can press F1 in scar if you don't know that already and you can search for that function. There you will can see what parameters are for.
    And to find where you search maybe try to store the letter colors in a TPA then GetTPAbound and search in that box. I haven't tried that but that's how some SRL function works.

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
  •