Results 1 to 11 of 11

Thread: Problem with (wait)

  1. #1
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Problem with (wait)

    if (FindColor(x,y,MonsterColor1,0,0,515,336)) then
    begin
    MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
    Wait(123+random(15));
    ClickMouse(x,y,true);
    wait(1111)

    There are two instances of this code in the script, and it works however the wait before the next click is the same for both even though i've put 1 second for monster1, and 8 secs for mon2. Can anyone add whatever I'm missing pls..



    code by zeejenkins
    Last edited by Creed; 04-18-2009 at 02:49 PM.

  2. #2
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Are you using multiples of 1000? The time wait uses is in milliseconds. So to wait 1 second you would use wait(1000) and to wait 8 seconds, wait(8000).

  3. #3
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea, I put the 8 as 8000, because it was using milliseconds, but that didn't work.

  4. #4
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if (FindColor(x,y,MonsterColor1,0,0,515,336)) then
    begin
    MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
    Wait(123+random(10));
    ClickMouse(x,y,true);
    wait(1112); {how many second you want to wait between each click}
    end;
    if (FindColor(x,y,MonsterColor7,0,0,515,336)) then
    begin
    MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
    Wait(123+random(10));
    ClickMouse(x,y,false);
    wait(8112)

    Here it is in more detail

  5. #5
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Any solutions?

  6. #6
    Join Date
    Feb 2009
    Location
    UK
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could make your own function to do with the wait time for the fight:

    SCAR Code:
    function WaitTime: Integer;
    begin
      case MonsterColor of
        6956546: Result := 5000;
        5665687: Result := 10000;
        2068804: Result := 2000;
        4210752: Result := 7000;
        else
          Result := 15000; //If it doesn't recognise MonsterColor then waits longer.
      end;
    end;

    begin
      Wait(WaitTime + Random(2000));
    end.

    Hope this helps!
    SCAR Code:
    if (YourActivity = 'ReadingThis') then
        Inc(ViewCount);

  7. #7
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hope it helps too gearsnare :P, ill try it out, thank you

  8. #8
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    what error r u getting

  9. #9
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -.-

    J_Pizzle you should read the threads >:/

    he said it waits the same amount of time for everything he tries..

    Gear fixed it I think

  10. #10
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    srry read it wrong

  11. #11
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You cannot use or statement in functions or procedures like that.
    The only way you can use or is like this:
    SCAR Code:
    //IF- statement
    if InFight or (HPPercent < 50) then
    begin
     writeln('We are either in fight or our HP is below 50%!');
    end;

    //WHILE-statement
    while (TimeFromMark(t)<5000) or InFight do
     writeln('Time from mark (t) is under 5 seconds, or we are in fight!');

    //REPEAT-loop
    repeat
     writeln('We are in fight or i >  15!');
    until(not InFight or (i<=15));

    Actually there are more ways but these are the only ones you need to know

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
  •