Results 1 to 10 of 10

Thread: Fantasy Online script?

  1. #1
    Join Date
    Aug 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Fantasy Online script?

    Hi, i just wanted to ask if anyone could be so kind and create me a quick script, since i have no idea what i'm doing.
    fantasy online is a browsergame with very simple graphics. all i need is a script that automatically attacks mobs with cretain colors. the one i have doesn't work, it always clicks the top left of the screen. i'd appreciate your help


    (the code that doesn't work):

    procedure Attack;
    begin
    if FindColor 63994 then
    begin
    Writeln('Found NPC > Attacking!')
    MoveMouse(x,y+random(3));
    wait(randomrange(25,50));
    ClickMouse(x,y,mouse_Left);

    Wait(5000); //MS to wait. 1000 = 1sec
    end;
    end;

    begin
    repeat

    Attack; //Procedure Attack

    until(false);
    end.
    Last edited by noodelz; 08-01-2013 at 11:31 AM.

  2. #2
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Firstly when posting code, please use simba tags.
    Secondly, the problem you have is that it is not finding the colour properlly. Look at how you are searching for the colour. You're doing it incorrectly. The Parameters for are:
    FindColor(var x, y:integer; color, xs, ys, xe, ye:integer):boolean;

  3. #3
    Join Date
    Aug 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by The Killer View Post
    The Parameters for are:
    FindColor(var x, y:integer; color, xs, ys, xe, ye:integer):boolean;
    ok, but how do i find the right variables? i've already downloaded ACA, but i don't really get it. (i'm a huge coding noob)

  4. #4
    Join Date
    Aug 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    ok i kinda got it to work now, but it takes about 20 seconds until it recognizes a mob, even though i have 20 of them standing around me... and it also keeps klicking on dead mobs. would it be possible to tell the script to stay on one mob until it makes a 90° fall (the dying animation)?



    Simba Code:
    program AutoFighter;

    var
    x,y: Integer;



    procedure Attack;
    begin
      If FindColorTolerance(x, y, 63994, 564, 214, 726, 451, 5) then
     begin
     Writeln('Found NPC > Attacking!')
      MoveMouse(x,y+random(3));
    wait(randomrange(25,50));
      ClickMouse(x,y,mouse_Left);
      ClickMouse(x,y,mouse_Left);

      Wait(3000); //MS to wait. 1000 = 1sec
     end;
    end;

    begin
     repeat

     Attack; //Procedure Attack

     until(false);
    end.
    Last edited by noodelz; 08-01-2013 at 01:09 PM.

  5. #5
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Quote Originally Posted by noodelz View Post
    ok i kinda got it to work now, but it takes about 30 seconds untill it recognizes a mob, even though i have 20 of them standing around me...



    Simba Code:
    program AutoFighter;

    var
    x,y: Integer;



    procedure Attack;
    begin
      If FindColorTolerance(x, y, 63994, 564, 214, 726, 451, 5) then
     begin
     Writeln('Found NPC > Attacking!')
      MoveMouse(x,y+random(3));
    wait(randomrange(25,50));
      ClickMouse(x,y,mouse_Left);
      ClickMouse(x,y,mouse_Left);

      Wait(3000); //MS to wait. 1000 = 1sec
     end;
    end;

    begin
     repeat

     Attack; //Procedure Attack

     until(false);
    end.
    Looks better , have a look if you can find better colours to speed it up, and are you using all the main screen and not a small area of it?
    if like runescape your player is in the middle of the screen, you can use spiral versions of findcolor to make it click the one closest.

  6. #6
    Join Date
    Aug 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by The Killer View Post
    Looks better , have a look if you can find better colours to speed it up, and are you using all the main screen and not a small area of it?
    if like runescape your player is in the middle of the screen, you can use spiral versions of findcolor to make it click the one closest.
    spiraling works and speeds things up a bit, thanks. but i still have one problem becuase it keeps klicking on dead mobs. would it be possible to tell the script to stay on one mob until it makes a 90° fall or simply ignore mobs that changed their position in a 90°angle? (they fall over when dead)

  7. #7
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Quote Originally Posted by noodelz View Post
    spiraling works and speeds things up a bit, thanks. but i still have one problem becuase it keeps klicking on dead mobs. would it be possible to tell the script to stay on one mob until it makes a 90° fall or simply ignore mobs that changed their position in a 90°angle? (they fall over when dead)
    To ingore them you could you ATPA's however thats fairly advanced, I would try and use pixel shit to see if they make the fall if you want to make it simple.
    Guide to pixel shit

  8. #8
    Join Date
    Aug 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by The Killer View Post
    To ingore them you could you ATPA's however thats fairly advanced, I would try and use pixel shit to see if they make the fall if you want to make it simple.
    Guide to pixel shit
    ok thanks, i'll see if i can use that. another idea i had was to just make the player idle after every kill/ make the script click a random spot not too far away, becuase for one that + the spiraling will avoid the dead ones and for some reason it seems to make it easier to recognize mobs when i move around a bit. if you could help me out with that too, i'll probably be able to make a more or less working bot

  9. #9
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Quote Originally Posted by noodelz View Post
    ok thanks, i'll see if i can use that. another idea i had was to just make the player idle after every kill/ make the script click a random spot not too far away, becuase for one that + the spiraling will avoid the dead ones and for some reason it seems to make it easier to recognize mobs when i move around a bit. if you could help me out with that too, i'll probably be able to make a more or less working bot
    hmm have you got teamviewer? I could help you over it if you want
    (pm me details if you wish to).

    Also 300 post quotes :P

  10. #10
    Join Date
    Aug 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by The Killer View Post
    hmm have you got teamviewer? I could help you over it if you want
    (pm me details if you wish to).

    Also 300 post quotes :P
    you're welcome my teamviewer id is 233 077 855

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
  •