Results 1 to 7 of 7

Thread: Need quick help on my loop

  1. #1
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default Need quick help on my loop

    Hey guys,
    I'm working on my Pc script and am stuck at a looping procedure. It knows when it is in the boat, on the island, and needs to cross the plank. It keeps trying to find the plank even when it is in the boat. Could someone post here or pm me and maybe we could teamview? Thanks a lot!

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    You could get [faster] help here, via posting the source code and pointing out the error/faulty code snippet.

  3. #3
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Im assuming youre looking for just an idea as to how to do it.

    Could use sps_getmypos to check if youre in the boat. If the compass always the same direction, you could search one side of the minimap for a lack of water color to see if youre in the boat?

    id use the second as sps_getmypos is slow (iirc), and when getting on the boat it may only move you a square or 2, so sps might not pick that up (though it should).

  4. #4
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    Im assuming youre looking for just an idea as to how to do it.

    Could use sps_getmypos to check if youre in the boat. If the compass always the same direction, you could search one side of the minimap for a lack of water color to see if youre in the boat?

    id use the second as sps_getmypos is slow (iirc), and when getting on the boat it may only move you a square or 2, so sps might not pick that up (though it should).
    To elaborate, I'd use CountColorTolerance to find the amount of water colored pixels on the minimap to make the judgement, or you could just use a DTM.

  5. #5
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    http://paste.villavu.com/show/4522/
    There is what I have. The values I have put for it to find if it is in the boat or island work, I tried them already by themselves. Yet all it does is try to click one time on plank no matter where it is, it doesn;t even wait for the up text

  6. #6
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Hey, forgot to make it repeat in the main loop! Now it works perfect but won't writeln if its in boat or island. It knows that it is because it stops clicking for the plank. I think the way I wrote it is wrong.

  7. #7
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Nevermind guys, figured it out! Was a late night and didn't check the capitalization!

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
  •