Results 1 to 18 of 18

Thread: Older Uptext

  1. #1
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Older Uptext

    Hi, I'm currently working on a Woodcutting script for the Soulsplit RSPS with the help of a few of YoHoJo's video's. Anyway what I'm stuck with is the uptext not being recognised, it worked fine when I followed his DTM tutorial, but doesn't seem to work when I follow his Woodcutting tutorial. From what I've read, I need an older version of the uptext (apparently a 2010 will work) but I have no idea where to find it, how to change it or where to start. If someone could post a link to a guide (apparently they exist) or even tell me how to do it, I'd appreciate it greatly.

  2. #2
    Join Date
    Jul 2009
    Location
    Australia
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    It don't believe that you can downgrade to an older font but try following this tutorial http://villavu.com/forum/showthread.php?t=60451 and using a function like
    Simba Code:
    FindText
    or
    Simba Code:
    FindTextEx
    To locate your font.

    ~Caotom

  3. #3
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Caotom View Post
    It don't believe that you can downgrade to an older font but try following this tutorial http://villavu.com/forum/showthread.php?t=60451 and using a function like
    Simba Code:
    FindText
    or
    Simba Code:
    FindTextEx
    To locate your font.

    ~Caotom
    Thanks for the quick reply! I'll post back with a result.

  4. #4
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Sorry if I've posted too early and this is considered spam, but I was able to create my own custom uptext to an extent, and I'm still a little clueless on how exactly I'd bring that into my script. I'm assuming it doesn't happen automatically, or I've done something very wrong.

    If someone could give me an example of how to call a custom UpText as well as explain what actually happens it'd really help.

  5. #5
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    you don't need to create new ocr. Just use findcolors and length of that tpa. For example, the "Cut Tree" is blue and there the length of that tpa might be 80, where as "Walk to player" is different color with length of 130.
    Oh Hai Dar

  6. #6
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Main View Post
    you don't need to create new ocr. Just use findcolors and length of that tpa. For example, the "Cut Tree" is blue and there the length of that tpa might be 80, where as "Walk to player" is different color with length of 130.
    You wouldn't know of any tutorials/guides that might make doing what you just described a little easier? I've (as far as I know) torn the forums apart trying to find some sort of a guide but I can't find it for the life of me.

    Sorry for being so dependent.

    Edit: In hindsight I've been able to find something.

    Thanks for pointing me in the right direction!

    Edit: In double hindsight, if I was to write multiple scripts for this server (once I'd gotten the hang of it), wouldn't it be better for me to have a Custom Uptext written?
    Last edited by Jenga; 07-22-2012 at 05:52 PM.

  7. #7
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm working on writing scripts for private servers too. I might work on creating a custom font and I'll let you know if I can ever get it done :P

  8. #8
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Edit: In double hindsight, if I was to write multiple scripts for this server (once I'd gotten the hang of it), wouldn't it be better for me to have a Custom Uptext written?
    If you have found a method that works and is fool-proof then really there is no reason why you should need to create a 'Custom Uptext'. If finding the colour and it's length is working for you then I'd probably just stick with that to be honest.

  9. #9
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by p1ng View Post
    If you have found a method that works and is fool-proof then really there is no reason why you should need to create a 'Custom Uptext'. If finding the colour and it's length is working for you then I'd probably just stick with that to be honest.
    How do I acquire the objects length? I'm obviously new to this so any tutorials you can link me are appreciated. I've read a little on TPA's but I'm not sure if that's the path I should be going down.

  10. #10
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Jenga View Post
    How do I acquire the objects length? I'm obviously new to this so any tutorials you can link me are appreciated. I've read a little on TPA's but I'm not sure if that's the path I should be going down.
    older uptext, simba > fonts > uptextex (i have tested this and it WORKS for soulsplit, but i have personally never used it for all my soulsplit scripts, i find my method following fool proof). ive made a soulsplit chopper (17 hours proggies ) and i just simply use a dtm of the trees, and when i right click it, i check if the text reads "chop tree" otherwise itll exit and retry.

  11. #11
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by zluo View Post
    older uptext, simba > fonts > uptextex (i have tested this and it WORKS for soulsplit, but i have personally never used it for all my soulsplit scripts, i find my method following fool proof). ive made a soulsplit chopper (17 hours proggies ) and i just simply use a dtm of the trees, and when i right click it, i check if the text reads "chop tree" otherwise itll exit and retry.
    Yeah, I was thinking of using DTM's but I wasn't sure about the usability. How would I go about inserting that older uptext into my script?

    Edit: I've decided to use DTM's, is there a way to set an angle? I've attempted to use MakeCompass but it just sends my camera in circles. Any ideas?
    Last edited by Jenga; 07-23-2012 at 04:57 AM.

  12. #12
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Zluo said that the font UpTextEx will work for RSPS SoulSplit. I can neither confirm nor deny this, but if you are going to implement that method then this is roughly how you would go about it.

    function to use -
    FindText(var cx, cy: Integer; txt,font: string; xs, ys, xe, ye: Integer): Boolean;

    variables explained -
    cx - where it will store the x-coordinate if string is found
    cy -where it will store the y-coordinate if string is found
    txt - text to search for
    font - what font to search for the text in
    xs - start x-coordinate to search in
    ys - start y-coordinate to search in
    xe - end x-coordinate to search in
    ye - en y-coordinate to search in

    example use -
    Simba Code:
    procedure ChopTree;
    var
      x,y:integer;
    begin
      if FindTree then
      begin
        if FindText(x, y, 'hop', 'UpTextEx', 0, 0, w-1, h-1) then
          ClickMouse2(mouse_Left) else
        WriteLn('Incorrect UpText @ChopTree');
      end else
      WriteLn('Didn''t FindTree @ChopTree');
    end;

    Now this is purely an example, I do not know what your procedure looks like or anything like this so I'm not sure how you are implementing it but this is a quick run down of this procedure here.
    If the script finds a tree using whatever method it is you are using it will check for the UpText.
    If it finds the Text 'hop' anywhere within the top-left corner of the client and 1px in from the bottom right corner of the client the script will do a left click at it's current mouse position.
    You will need to implement that uptext with changes to the text and changes to the co-ordinates it searches within specific to your own script.

  13. #13
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    1,199
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    Quote Originally Posted by p1ng View Post
    Zluo said that the font UpTextEx will work for RSPS SoulSplit. I can neither confirm nor deny this, but if you are going to implement that method then this is roughly how you would go about it.

    function to use -
    FindText(var cx, cy: Integer; txt,font: string; xs, ys, xe, ye: Integer): Boolean;

    variables explained -
    cx - where it will store the x-coordinate if string is found
    cy -where it will store the y-coordinate if string is found
    txt - text to search for
    font - what font to search for the text in
    xs - start x-coordinate to search in
    ys - start y-coordinate to search in
    xe - end x-coordinate to search in
    ye - en y-coordinate to search in

    example use -
    Simba Code:
    procedure ChopTree;
    var
      x,y:integer;
    begin
      if FindTree then
      begin
        if FindText(x, y, 'hop', 'UpTextEx', 0, 0, w-1, h-1) then
          ClickMouse2(mouse_Left) else
        WriteLn('Incorrect UpText @ChopTree');
      end else
      WriteLn('Didn''t FindTree @ChopTree');
    end;

    Now this is purely an example, I do not know what your procedure looks like or anything like this so I'm not sure how you are implementing it but this is a quick run down of this procedure here.
    If the script finds a tree using whatever method it is you are using it will check for the UpText.
    If it finds the Text 'hop' anywhere within the top-left corner of the client and 1px in from the bottom right corner of the client the script will do a left click at it's current mouse position.
    You will need to implement that uptext with changes to the text and changes to the co-ordinates it searches within specific to your own script.
    Wow, that is probably one of the most informative posts I have ever seen.

    +Repped

  14. #14
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by p1ng View Post
    Zluo said that the font UpTextEx will work for RSPS SoulSplit. I can neither confirm nor deny this, but if you are going to implement that method then this is roughly how you would go about it.

    function to use -
    FindText(var cx, cy: Integer; txt,font: string; xs, ys, xe, ye: Integer): Boolean;

    variables explained -
    cx - where it will store the x-coordinate if string is found
    cy -where it will store the y-coordinate if string is found
    txt - text to search for
    font - what font to search for the text in
    xs - start x-coordinate to search in
    ys - start y-coordinate to search in
    xe - end x-coordinate to search in
    ye - en y-coordinate to search in

    example use -
    Simba Code:
    procedure ChopTree;
    var
      x,y:integer;
    begin
      if FindTree then
      begin
        if FindText(x, y, 'hop', 'UpTextEx', 0, 0, w-1, h-1) then
          ClickMouse2(mouse_Left) else
        WriteLn('Incorrect UpText @ChopTree');
      end else
      WriteLn('Didn''t FindTree @ChopTree');
    end;

    Now this is purely an example, I do not know what your procedure looks like or anything like this so I'm not sure how you are implementing it but this is a quick run down of this procedure here.
    If the script finds a tree using whatever method it is you are using it will check for the UpText.
    If it finds the Text 'hop' anywhere within the top-left corner of the client and 1px in from the bottom right corner of the client the script will do a left click at it's current mouse position.
    You will need to implement that uptext with changes to the text and changes to the co-ordinates it searches within specific to your own script.
    The Mesiah!

    I'm assuming that "UpTextEx" (isn't being recognized) is the same as 'UpCharsEx'? Excuse my ignorance.

    Also, could you suggest a function to find the color, that will work with that FindText command? I'm currently trying to use FindColorSpiral, but to no avail.
    Last edited by Jenga; 07-23-2012 at 08:06 AM.

  15. #15
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by Jenga
    I'm assuming that "UpTextEx" (isn't being recognized) is the same as 'UpCharsEx'? Excuse my ignorance.

    Also, could you suggest a function to find the color, that will work with that FindText command?
    Potentially, yes. Although given the fact I have never made an in-depth script for a privately server or specifically for SoulSplit, I couldn't tell you if that font will, in fact work. You could make up a dummy procedure that can test for you whether or not it reads the UpText correctly.

    If it does not you could then continue on through testing with all the fonts found in your Simba folder. Following on from that I know there is a tutorial on these forums somewhere that teaches you how to create your own font set for Simba if none of the pre-loaded ones work. From there you can go on to use the procedure similar to the one I outlined for you previously.

    In response to the finding color query, I would suggest using TPAs however these are a little bit more advanced than a simple FindColor and all of the tutorials that can be found on here are daunting big blocks of text in relation to TPA.

    If you would like you can PM me and I can attempt to run you through the absolute basics of creating a TPA function for finding a particular colour/object. Alternatively you can trawl through the tutorials and learn how to make one yourself

    PS- Thank-you for the +rep.

  16. #16
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    http://www.youtube.com/watch?v=98wVrr6GwyU
    it would be certianly useful to detect trees. however since theyre quite similar to the ground color and are spotted, you could always make a small bitmap of them and that would also work

  17. #17
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Thanks for the help everyone! Just thought I'd let you know that I've got tears of joy in my eyes because I've just managed to write the part of the script that drops the logs. Little steps.

    How would I make simba know that the inventory is full and it's time to drop the Logs? I assume it's a repeat until sort of thing, but repeat until what?

    Oh, I'm using DTM's of the logs, seeing as that's probably going to be relevant.

    Also forgive me for asking another question. I'm unaware to the etiquette regarding this, as it is on a different topic.
    Last edited by Jenga; 07-23-2012 at 06:57 PM.

  18. #18
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you should be able to use the invfull function, it works for me on private servers...
    ex.
    Code:
    Repeat
      ChopLogs;
    Until (InvFull);

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
  •