Results 1 to 5 of 5

Thread: Need Help on Disney Channel Game (Trying to Learn How to Script)

  1. #1
    Join Date
    Feb 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need Help on Disney Channel Game (Trying to Learn How to Script)

    So I've been watching tutorials and decided to try to script for a Disney Channel game called "Bueno Rufus". The link to the game is here:
    http://disney.go.com/disneychannel/g...-rufus-1966338

    The problem that I am having is that when the script detects, for example, ice cream under the chocolate squirter, the script goes frantic and constantly clicks the squirter, which causes it to squirt things other than ice cream, causing the score to be lowered. Yes, I realize this happens because the script clicks as many times as it can in the very short amount of time that the ice cream is below the squirter due to the "repeat". But this repeat has to be there, so how do I get it to click only once? Please help!

    This is my script so far:


    program Rufus;

    procedure Squirt;
    var
    x, y:Integer;
    begin
    repeat
    If FindColorSpiral(x, y, 10066431, 371, 342, 431, 367) then
    begin
    MoveMouse(393, 213);
    ClickMouse(393, 213, 1);
    end;
    until(false)
    end;
    procedure StartGame;
    begin
    ActivateClient;
    MoveMouse(534, 346);
    ClickMouse(534,346, 1);
    Wait(750);
    ClickMouse(534, 346, 1);
    end;


    begin
    Startgame;
    Squirt;
    end.

  2. #2
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Function Squirt: Boolean;
    var
    x, y:Integer;
    begin
    repeat
    If FindColorSpiral(x, y, 10066431, 371, 342, 431, 367) then
    MoveMouse(393, 213);
    ClickMouse(393, 213, 1);
    Result:= True;
    until(Result)
    end;

    Try that?
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  3. #3
    Join Date
    Dec 2012
    Posts
    115
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Why does the repeat have to be there? It shouldn't have to be there.

    I would find the color like this..
    Simba Code:
    procedure Squirt;
    var
    x, y:Integer;
    begin
    If FindColortolerance(x, y, 10066431, 371, 342, 431, 367,5) then
    //the "5" is the tolerance.
    begin
    Mmouse(x,y,0,0);//SRL function, so we need to setupSRL in the main loop
    wait(400);
    clickmouse2(mouse_left);//SRL function, so we need to setupSRL in the main loop
    end;
    end;

    begin//main loop
    SetupSRL;
    Squirt;//calling Squirt procedure
    end.

    That would work to find the color on the screen, move the mouse to the location and then click the left mouse button.

    Feel free to pm me if my instructions aren't clear

  4. #4
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    That only works once then the scripts ends and that is not what he is looking for. He only wants it to click once, then wait again for that color and click once more. So yes he needs the repeat.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  5. #5
    Join Date
    Dec 2012
    Posts
    115
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Element17 View Post
    That only works once then the scripts ends and that is not what he is looking for. He only wants it to click once, then wait again for that color and click once more. So yes he needs the repeat.
    Ahh I thought he said he only wanted to do it once then stop. baha my bad

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
  •