Results 1 to 4 of 4

Thread: please someone help

  1. #1
    Join Date
    Dec 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default please someone help

    I am working on a script that uses the function "ChooseOption('rade');" so that I can trade and buy something from a store, my problem is that when it right clicks the shop owner and it starts to go towards the "trade option" it goes extremely slow, I need to know if there is anyway I can fix this to be a "human-like speed." Also my script uses the function "MoveMouse(x, y);" I use this function many times in my script, my problem is it moves the mouse to where I want it to go extremly fast. Lastly, I need to learn a function that allows my script to type in some numbers and press the "enter key" so I can buy a certain amount of an item.

    It would be very much apreciated for any solutions to any of my problems, or for any helpful suggestions/tips.

    Even if you can't/don't help me thank you for reading my thread.

  2. #2
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    noooooo!

    ok tutorial time:

    in the first line of the script, under Program New; insert

    SCAR Code:
    {.include SRL/SRL.scar}

    now the new function for moving mouse is;

    SCAR Code:
    MMouse(x, y, random x offset, random y offset);

    eg. MMouse(x, y, 6, 6); (edit: woops)

    you also need to do this at the bottom of the script

    SCAR Code:
    SetupSRL;

    hope it helped

    pm me if you need help on this script btw

    Edit:
    Once you and SetupSRL, you will be able to use TypeSend(string) to enter a value and press Enter

    EDIT EDIT: I was bored, so i whipped this together for you... enjoy!

    SCAR Code:
    program ShopOpener;
    {.include SRL/SRL.scar}

    var
      SKColors : array of integer;

    procedure ShopKeeperColors;
    begin
      SKColors := [3957890, 8225414, 3161415]; //these are the shop assistant colors
    end;

    procedure OpenShop;
    var
      x, y, t : integer;
    begin
      if(FindObjCustom(x, y, ['eeper', 'ssistant'], SKColors, 10))then //this finds the shop keeper/assistant
      begin
        Mouse(x, y, 6, 6, False); //this right clicks it
        Wait(300 + Random(700)); //this waits for the menu
        ChooseOption('rade'); //this selects "trade"
        MarkTime(t); //this sets a time mark
        repeat
          Wait(100);
        until (ShopScreen) or (TimeFromMark(t) > 6000); // this waits until either a) shop is open, b) took longer than 6.5 seconds
      end else
        Writeln('Could not find shop assistant');
    end;


    begin
      SetupSRL;
      ActivateClient;
      ClearDebug;
      ShopKeeperColors;//defines the colors for scar
      OpenShop; //attempts to open shop
    end.

    Finds and opens shop. Takes a while because the color of the shop, but it will do the trick
    Project: Welcome To Rainbow

  3. #3
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    well the new MoveMouse is not Mouse... that is to move the mouse and click there...
    MMouse(x,y,xrandom,yrandom); is the mouse mouse procedure...

  4. #4
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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
  •