Results 1 to 23 of 23

Thread: Ways around UpText

  1. #1
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default Ways around UpText

    I'm working on a Jewelry Enchanting script, but I'm stuck really early on. In order to tell if an item has been enchanted or not, I need to use Uptext to make sure its the unenchanted item. The only problem is that SRL cannot find the uptext, ever. Here is all it can come up with:
    Quote Originally Posted by debug log
    2Cast Lvl-2 Enchant -> Amu
    3 Cast Lvl-2 Enchant ->
    4Cast Lvl-2 Enchant -> Amu
    5Ca..t Lvl-2 Enchant -> Em
    All I need it to find is any part out of "Emerald," but its failing quite miserably. Any help would be much appreciated!

    Edit: those numbers at the beginning are just the inventory spaces.

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    How are you looking for the UpText? Are you using IsUpText();?

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you post some screenshots of where it failed to get the uptext? (in PNG/BMP please)
    Verrekte Koekwous

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    You can make DTMs of the uptext instead, or bitmap masks.
    ^Look up tutorials about those and how to use them, but as far as I know, IsUpText should be working just fine... :/.
    Edit:http://www.villavu.com/forum/showthread.php?t=6129
    Tutorial on bitmap masks ^

  5. #5
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm...AFAIK, up text is working perfectly, in fact i just finished a private script with a hell of a lot of up texts. How are you calling it? Like one of the following?
    • UpText('s');
    • UpText(s);
    • IsUpText(s);


    (s = string)

    the proper way to call it is
    IsUpText('s');

    good luck!

    ~bionicle
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  6. #6
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    I'm using "IsUpText('meral');"
    I tried "meral," "erald," "era," and a few other combinations. I used GetUpText simply to show me what was going wrong.

    It's having issues with the orange text the most. Another test:
    2Cast Lvl-2 Enchant -> Cos
    3Cast Lvl-2 Enchant -> Amu
    4Cast Lvl-2 Enchant -> Amu
    5Cast Lvl-2 Enchant -> Eme
    This shows that its not fitting the whole string in. Does it have a maximum string length?

    I'll read up on bitmap masks, thanks .

    edit:
    a test of inv spaces 2-28:
    2Cast Lvl-2 Enchant -> Amu
    3 Cast Lvl-2 Enc.,ant ->
    4Cast Lvl-2 Enchant -> Amu
    5 Cast Lvl-_ Enchant ->
    6Cast Lvl-2 Enchant -> Eme
    7Cast Lvl-2 Enchant -> Eme
    8 Cast Lvl-2 Enchant -> .
    9Cast Lvl-2 Enchant -> Eme
    10Cast Lvl-2 Enchant -> Eme
    11Cast Lvl-2 Enchant -> Eme
    12Cast Lvl-2 Enchant -> Eme
    13Cast Lvl-2 Enchant -> Eme
    14Cast Lvl-2 Enchant -> Eme
    15Cast Lvl-2 Enchant -> Eme
    16Cast Lvl-2 Enchant -> Eme
    17Cast Lvl-2 Enchant -> Eme
    18 Cast Lvl-2 Enchant -> . .
    19Cast Lvl-2 Enchant -> Eme
    20Cast Lvl-2 Enchant -> Eme
    21Cast Lvl-2 Enchant -> Eme
    22 Cast Lvl-2 Enchant -> . .
    23Cast Lvl-2 Enchant -> Eme
    24Cast Lvl-2 Enchant -> Eme
    25Cast Lvl-2 Enchant -> Eme
    26Cast Lvl-2 Enchant -> Eme
    27Cast Lvl-2 Enchant -> Eme
    28Cast Lvl-2 Enchant -> Eme

  7. #7
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Can you post a section of code, maybe it's the way it's written?

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  8. #8
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Code:
    Function Enchant(invsp: Integer): boolean;
    begin
      MMouseItem(invsp);
      If IsUpText('erald') then
        MouseItem(invsp, true) else exit;
      wait(100+random(200));
    end;
    It's just not finding any of the uptext that I need.

  9. #9
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Hmm, I really don't know. I would use YoHoJo's suggestion and just make a mask of the UpText, seems like the best fix.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  10. #10
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by nategr8ns View Post
    Code:
    Function Enchant(invsp: Integer): boolean;
    begin
      MMouseItem(invsp);
      If IsUpText('erald') then
        MouseItem(invsp, true) else exit;
      wait(100+random(200));
    end;
    It's just not finding any of the uptext that I need.
    Add a wait after the mouse. Like, 300 ms. If it doesn't get it, make it 500. If it is still broken, your computer might really lag, and you can try 1000 just to see if it works. If it still doesn't work, try redownloading the newest dev SRL.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

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

    Default

    is your problem it cant read the whole uptext if so i think scar has a maxz char limit on uptext not 100% on that

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

    Default

    Quote Originally Posted by mastaraymond View Post
    Could you post some screenshots of where it failed to get the uptext? (in PNG/BMP please)
    I would also be interested in a screenshot of it failing.



    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)

  13. #13
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    I would also be interested in a screenshot of it failing.
    getting a screenshot now. I bet its just the orange color the name of the item is in.
    Last edited by stein3; 11-08-2009 at 10:24 PM.

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

    Default

    Quote Originally Posted by nategr8ns View Post
    getting a screenshot now. I bet its just the orange color the name of the item is in.
    I take it your brightness is set to max?



    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)

  15. #15
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCARs Rs_GetUpText is the one failing.

    I've tried to get a hold of freddy.. but stopped as it's not that much of a problem.
    And it'll be a pain as he needs to release a new scar for it to be fixed, and with a new
    SCAR comes new problems....

    Your best bet is to eaither make a DTM as already suggested, or go ahead and make a
    IsStringAlike function that covers up the mistakes Rs_GetUpText does by seeing if two
    strings matches.

    For example:
    Code:
    IsStringAlike('Apple', 'Aople'): Integer;
    Results in % alikeness, in this case 80%.

  16. #16
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    I take it your brightness is set to max?
    It definitely was last time I checked. I'll check again just in case.

    Quote Originally Posted by N1ke! View Post
    SCARs Rs_GetUpText is the one failing.

    I've tried to get a hold of freddy.. but stopped as it's not that much of a problem.
    And it'll be a pain as he needs to release a new scar for it to be fixed, and with a new
    SCAR comes new problems....

    Your best bet is to eaither make a DTM as already suggested, or go ahead and make a
    IsStringAlike function that covers up the mistakes Rs_GetUpText does by seeing if two
    strings matches.

    For example:
    Code:
    IsStringAlike('Apple', 'Aople'): Integer;
    Results in % alikeness, in this case 80%.
    Interesting... How would I use it though?


    edit: still no go...
    2Cast Lvl-2 Enchant -> Amu
    3Cast Lvl-2 Enchant -> Amu
    4 Cast Lvl-2 Enchant ->
    5 Cast Lvl-2 Enchant ->
    6Cast Lvl-2 Enchant -> Eme
    7Cast Lvl-2 Enchant -> Eme
    8Cast Lvl-2 Enchant -> Eme
    9Cast Lvl...2 Enchant -> E
    10Cast Lvl...2 Enchant -> E
    11Cast Lvl...2 Enchant -> E
    12Cast Lvl...2 Enchant -> E
    13Cast Lvl...2 Enchant -> E
    14Cast Lvl...2 Enchant -> E
    15Cast Lvl...2 Enchant -> E
    16Cast Lvl...2 Enchant -> E
    17Cast Lvl...2 Enchant -> E
    18Cast Lvl...2 Enchant -> E
    19 Cast Lvl...2 Enchant -> .
    20Cast Lvl...2 Enchant -> E
    21Cast Lvl...2 Enchant -> E
    22Cast Lvl...2 Enchant -> E
    23Cast Lvl...2 Enchant -> E
    24Cast Lvl...2 Enchant -> E
    25Cast Lvl...2 Enchant -> E
    26Cast Lvl...2 Enchant -> E
    27Cast Lvl...2 Enchant -> E
    28 Cast Lvl...2 Enchant ->
    it seems the issue is the max length of the strings though.
    Last edited by stein3; 11-08-2009 at 11:09 PM.

  17. #17
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by nategr8ns View Post
    It definitely was last time I checked. I'll check again just in case.



    Interesting... How would I use it though?


    edit: still no go...

    it seems the issue is the max length of the strings though.
    Have you tried using waits like I said?

    Also, try directly writing it in.

    Writeln(GetUpText);

    Might bypass the length of a string issue. :\

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  18. #18
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Have you tried using waits like I said?

    Also, try directly writing it in.

    Writeln(GetUpText);

    Might bypass the length of a string issue. :\
    I'm trying waits now...
    I used the GetUpText to print the logs I've been posting.

    edit: no go... The only other thing I can think of to try is FindText, but I don't know what the fonts are called.
    Last edited by stein3; 11-09-2009 at 01:15 AM.

  19. #19
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Did it work?
    waits did not. For GetUpText, look at any of the logs I posted.

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

    Default

    From the look of that picture, it looks light the Orange text is slightly transparent. I think that might be your problem.
    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

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

    Default

    IsUpText uses RS_GetUpTextAt ; considering RS_GetUpTextAt uses a couple of coords although we aren't able to set the rectangle we wish to analyse, maybe freddy's rectangle isn't indeed big enough, as it does seem to be the length as you suggest.

    ~RM

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

  22. #22
    Join Date
    Oct 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by Rasta Magician View Post
    IsUpText uses RS_GetUpTextAt ; considering RS_GetUpTextAt uses a couple of coords although we aren't able to set the rectangle we wish to analyse, maybe freddy's rectangle isn't indeed big enough, as it does seem to be the length as you suggest.

    ~RM
    I'll try using a custom RS_GetUpTextAt then. What is the font called?

  23. #23
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    UpChars

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
  •