Results 1 to 10 of 10

Thread: Script Making Help

  1. #1
    Join Date
    Sep 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default Script Making Help

    Hey guys/girls I am finally getting the hang of this scripting business and i have made a very very basic cow killing script which just consists of finding the cow and killing it. i'm planning to make it more complex but just starting with the basic.

    But.. when its working it clicks other cows before if has killed the cow it is attacking.. also it tries to attack cows which someone else is fighting..

    Any suggestions on how to fix this?

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Use pixel shift to detect if your fighting, but IDK how to detect if other cows are fighting

  3. #3
    Join Date
    Jun 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    You need to determine the healthbar of your opponent.. i'm currently trying to get somekind of method for it myself as i have no slightest clue how to get my own personal healthbar nor the one you are fighting :P

  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Use pixel shift to detect if your fighting, but IDK how to detect if other cows are fighting
    First find a cow, then look above the cow for a healthbar. If there isn't one, attack the cow.

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    First find a cow, then look above the cow for a healthbar. If there isn't one, attack the cow.
    How do you do that lol?

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    How do you do that lol?
    I was thinking something along the lines of making a TBox from a cow ATPA, then subtracting about 50 pixels from Y1 so the TBox extends to include the area where a a healthbar would be. Then search for the healthbar colors inside the TBox.

  7. #7
    Join Date
    Sep 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    I was thinking something along the lines of making a TBox from a cow ATPA, then subtracting about 50 pixels from Y1 so the TBox extends to include the area where a a healthbar would be. Then search for the healthbar colors inside the TBox.
    How would i go about doing that?

    I'm looking at the pixelshift code, what's a tbox? i'm very sorry i'm an in-experienced scripter

    also what is an ATPA?

  8. #8
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    I was thinking something along the lines of making a TBox from a cow ATPA, then subtracting about 50 pixels from Y1 so the TBox extends to include the area where a a healthbar would be. Then search for the healthbar colors inside the TBox.
    Too advanced for them lol.

    Creds to DannyRS for this wonderful sig!

  9. #9
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by shaezy View Post
    How would i go about doing that?

    I'm looking at the pixelshift code, what's a tbox? i'm very sorry i'm an in-experienced scripter

    also what is an ATPA?
    A TBox is a box made from two TPoints, and you can also make one from an ATPA.
    An ATPA is an Array of TPAs, and TPAs are Arrays of TPoints.

    I'd recommend starting with something easier though
    Quote Originally Posted by Sjoekeloe View Post
    Too advanced for them lol.
    I was originally responding to Rjj, I hoped he might be able to understand

  10. #10
    Join Date
    Sep 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Hey, I have an off topic question about the script i'm making.

    i get this error "Identifier expected" but its on my "end." line at the end of the script???

    what am i doing wrong?

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
  •