Results 1 to 11 of 11

Thread: Default Player function.

  1. #1
    Join Date
    Aug 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Default Player function.

    Here is a simple function I made(My first official function actually).
    Result is true if the player is Default(bald, brown shirt, green pants)

    SCAR Code:
    {*******************************************************************************
    Function created by: Wilio.
    Version: 1.6.1
    Description: is he bald? wear a brown shirt and green pants?
    *******************************************************************************}

    function DefaultPlayer: Boolean;
    var
    x,y,x1,y1,dist:Integer;
    matched: Boolean;
    begin
    //Open equip screen
    wait(450 + random(200));
       Mouse(676,184,6,6,true);
    wait(1200 + random(400))
      Mouse(602, 428,6,6,true);
    wait(1200 + random(400))
      Mouse(98, 86,6,6,true);
    wait(400 + random(100));
     Mouse(105, 178,6,6,true);
    wait(400 + random(100));
     Mouse(109, 211,6,6,true);
    wait(1200 + random(400))
     //Then check color
     if(findcolortolerance(x,y,6984648,179,72,356,301,4))  //head
      and (findcolortolerance(x1,y1,2245649,179,72,356,301,4))  //pants
      then
    begin
    writeln('colors found');
    dist:= y1 - y;
    if(dist >= 90) then
    begin
    writeln('distance matched');
    matched := true;
    end
    else
    begin
    writeln('distance not matched');
    matched := false;
    end;
    end
    if(matched = true)
    and(findcolortolerance(x,y,2647153,179,72,356,301,4))
    then
       begin
       result:= true
       writeln ('Default player detected');
       end
    end;

  2. #2
    Join Date
    Jun 2007
    Location
    Minnesota
    Posts
    773
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, cant this just detect any brown, bald, and green in the screen? If it does, you should make sure it finds each color within a certain distance from another one, but I can't really tell :P

  3. #3
    Join Date
    Aug 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No worry. i have set the box on the player only.

  4. #4
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good job. Now try to make it return the coords of any person with the default character onscreen

  5. #5
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    not very effective unless its used in a tut runner, other wise it wont work if theyre wearing armor, and if they have default in the runner then theres no way to change it, so not to be mean or anything its not a great function. What would make it better would be to make them take off all their armor and then check, but then there comes the problem of if they have a full inventory so the function once again starts being not great, but it would definately be a lot better if it took off all the armor first. Then it could be used as for if someone didnt want their script to auto with a default person.

    sorry bout my long post but i wasnt really paying attention to the length when i was typing
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  6. #6
    Join Date
    Aug 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You're right, that's why I edited the function.
    SCAR Code:
    {*******************************************************************************
    Function created by: Wilio.
    Version: 1.5
    Description: is he bald? wear a brown shirt and green pants?
    *******************************************************************************}

    function DefaultPlayer: Boolean;
    var
    x,y,x1,y1,dist:Integer;
    matched: Boolean;
    begin
    wait(450 + random(200));
       MMouse(676,184,6,6);
    wait(400 + random(100));
       clickmouse(676,184,true);
    wait(1200 + random(400))
      MMouse(602, 428,6,6);
    wait(400 + random(100));
      clickmouse(602,428,true);
    wait(1200 + random(400))
      MMouse(98, 86,6,6);
    wait(400 + random(100));
      clickmouse(98,86,true);
     MMouse(105, 178,6,6);
    wait(400 + random(100));
      clickmouse(105,178,true);
     MMouse(109, 211,6,6);
    wait(400 + random(211));
      clickmouse(109,211,true);
    wait(1200 + random(400))
     //Then check color
     if(findcolortolerance(x,y,6984648,179,72,356,301,4))  //head
      and (findcolortolerance(x1,y1,2245649,179,72,356,301,4))  //pants
      then
    begin
    writeln('colors found');
    dist:= y1 - y;
    if(dist >= 92) then
    begin
    writeln('distance matched');
    matched := true;
    end
    else
    begin
    writeln('distance not matched');
    matched := false;
    end;
    end
    if(matched = true)
    and(findcolortolerance(x,y,2647153,179,72,356,301,4))
    then
       begin
       result:= true
       writeln ('Default player detected');
       end
    end;
    this time it will go in equipment, remove the head, body, and legs. then it will check the distance between bald head and pants. if it's true. it will check the color of the shirt. Again if it's true, Result will be true.

  7. #7
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't use ClickMouse.

    Use Mouse: (x, y, 5, 5, True);
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  8. #8
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,069
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by SantaClause View Post
    Don't use ClickMouse.

    Use Mouse: (x, y, 5, 5, True);
    Yes, clickmouse is obsolete. Mouse moves the mouse and clicks for you.

    ~Travis
    FORMERLY BORN2CODE | Play Internet Games
    http://img147.imageshack.us/img147/2084/sigg.png

  9. #9
    Join Date
    Aug 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  10. #10
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    But what if the person is not wearing armor? then, you look like a macro

  11. #11
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    -.- just check for a different color at that point (i made myself a armor taking off function not released)

    EDIT: and u can use gametab to get to the right tab, and what i would do is allow it to click anywhere inside the places for pants chest and head for example(if u dont want the extra vars for a different way)
    SCAR Code:
    findcolortolerance(x,y,42352{thats a random color},{ur coords for the outside of the clickable area for each armor}, 300);
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ultimate Merchanter (first player to player seller!)
    By Timothegreat in forum RS3 Outdated / Broken Scripts
    Replies: 63
    Last Post: 05-14-2009, 02:07 PM
  2. Player not found in player array?quikchat?
    By jerrysyron in forum OSR Help
    Replies: 2
    Last Post: 08-01-2008, 12:44 AM
  3. lvl 3 crp name autoers with default looks
    By chitin in forum Bot Information and Spottings
    Replies: 7
    Last Post: 11-22-2007, 10:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •