Results 1 to 7 of 7

Thread: My script won't find a monster.

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

    My script won't find a monster.

    Hi i'm working on an autofighter for the game voyagecenturyonline
    but i just started and my first test was BAD.
    I think it's because it has good grafics, it doesn't find a monster at all.
    Is there a way to get this working better ?
    O yea here is the script but its still unfinished.
    SCAR Code:
    program VCOautofighter;
    {.include SRL/SRL.scar}
    const
      Monstercolor = 3155474;

    var
      kills : Integer;

    procedure findmonster;
    var
    x, y, a: Integer;
    begin
     repeat
      If FindColorTolerance(x,y,Monstercolor,0,0,0,0,0)then
       begin
         a := 1;
         Mouse(x,y,150,150,True);
       end;
     until(a = 1);
    a := 0;
    end;

    procedure attkmonster;
    var
      x, y: Integer;
    begin
    x := 495;
    y := 20;
    wait(50);
    Mouse(x,y,25,25,True);
    wait(20000);
    kills := kills + 1;
    end;

    procedure activate;
    var
      x, y: integer;
    begin
    x := 0;
    y := 0;
    Mouse(x,y,10,10,true)
    end;

    begin

    SetupSRL;
    activate;
    repeat
    findmonster;
    attkmonster;
    until(kills = 10);
    end.

  2. #2
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    This is the problem-line:
    SCAR Code:
    If FindColorTolerance(x,y,Monstercolor,0,0,0,0,0)then
    You have told the scripts to find MonsterColor in the box 0,0 to 0,0. Do you see that? There is nothing inside that box Put 0,0,100,100 or something. Then it will search for the monstercolor from co-ordinates 0,0 to 100,100, and save the position of the color in x,y.
    Also; If you get more problems, set the last 0 to 5 or something.

    Another thing that will probably cause problems:
    SCAR Code:
    Mouse(x,y,150,150,True);
    If it finds the monster color it will click the color with a randomness of 150 pixels in each way! That's a damn lot! About 1/7 of your screens width and about 1/5 of it's height. It should be like Mouse(x,y,5,5,True).

    -Knives

  3. #3
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Plus, i don't think I'll work very well with a game with graphics any better than rs... But thats just my opinion. If you make it, it'll be t3hp4n4g3.
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  4. #4
    Join Date
    Aug 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thx i just saw that
    SCAR Code:
    Mouse(x,y,150,150,True);
    was a bit too much i'll try it now.

  5. #5
    Join Date
    Jun 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    We all make mistakes, but nice script too.

  6. #6
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    No problemos. Let me know if there are any other problems.

    -Knives

  7. #7
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    keep up the good work

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How do i find Monster Colors?
    By buggyboy33 in forum OSR Help
    Replies: 6
    Last Post: 10-04-2008, 10:27 PM
  2. Best Way To Find And Attack A Monster?
    By Gilbert in forum OSR Help
    Replies: 2
    Last Post: 10-29-2006, 05:55 AM

Posting Permissions

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