Results 1 to 9 of 9

Thread: AttackMonsterSpiral

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

    Default AttackMonsterSpiral

    Finds the closest monster to yourself.

    Thanks Bebe ;D

    Code:
    {*****************************************************************************
    Procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
    By: Bebemycat2 edited by Pwnd
    Description: Now uses FindColorSpiralTolerance so it'll search from your feet out.
                 Finds the monster specifyed by color1,color2,color2 and MonsterName and clickss to fight it.
                 If it doesn't find the 3 colors then it will try for 2 out of the 3 colors 3 times
                 If that doesn't work then it will exit out of the procedure
    *****************************************************************************}
    
    procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
    var
      xa, ya: integer;
    begin
      xa:= 259;
      ya:= 196;
      if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack ' + MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
      if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack ' + MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
      if(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack ' + MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
      if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack '+ MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
          exit;
    end;

  2. #2
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Pwnd
    Finds the closest monster to yourself.

    Thanks Bebe ;D

    Code:
    {*****************************************************************************
    Procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
    By: Bebemycat2 edited by Pwnd
    Description: Now uses FindColorSpiralTolerance so it'll search from your feet out.
                 Finds the monster specifyed by color1,color2,color2 and MonsterName and clickss to fight it.
                 If it doesn't find the 3 colors then it will try for 2 out of the 3 colors 3 times
                 If that doesn't work then it will exit out of the procedure
    *****************************************************************************}
    
    procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
    var
      xa, ya: integer;
    begin
      xa:= 259;
      ya:= 196;
      if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack ' + MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
      if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack ' + MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
      if(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack ' + MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
      if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
        (FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
        (Option2('Attack '+ MonsterName + ''))then
          Mouse(x, y, 5, 5, true)
        else
          exit;
    end;

    Sweet. Grr whenever I use "else" I get an error.

  3. #3
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by WhiteShadow
    Sweet. Grr whenever I use "else" I get an error.
    You're probably using it wrong..

    You have to do

    if()then
    begin
    .....
    .....
    end else
    begin
    ....
    ....
    end;

    or

    if()then
    ....
    else
    .....
    Free File Hosting
    No download timers!

    Rifkwtf.com

  4. #4
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Pwnd
    You're probably using it wrong..

    You have to do

    if()then
    begin
    .....
    .....
    end else
    begin
    ....
    ....
    end;

    or

    if()then
    ....
    else
    .....
    What's the difference between end else and else?

  5. #5
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, this helps if you know some java, but I'll help you out.

    If()then
    ...
    else
    ...

    You can only put one more method after the if statement and the else.. sort of like this

    if(loggedin)then
    exit;
    else
    login;

    Now, end else is for multiple things..

    if(loggedin)then
    begin
    writeln('Logged in');
    exit;
    end else
    begin
    writeln('Not logged in');
    writeln('Logging in');
    Login;
    end;

    It's hard to read, but I was to lazy to space it out.

    Hopefully you can understand that... If not, just ask again.
    Free File Hosting
    No download timers!

    Rifkwtf.com

  6. #6
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    nice! i might use this is a few weeks... dont feel bad.. just i dont have the time atm
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  7. #7
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Pwnd
    Ok, this helps if you know some java, but I'll help you out.

    If()then
    ...
    else
    ...

    You can only put one more method after the if statement and the else.. sort of like this

    if(loggedin)then
    exit;
    else
    login;

    Now, end else is for multiple things..

    if(loggedin)then
    begin
    writeln('Logged in');
    exit;
    end else
    begin
    writeln('Not logged in');
    writeln('Logging in');
    Login;
    end;

    It's hard to read, but I was to lazy to space it out.

    Hopefully you can understand that... If not, just ask again.
    Thanks, I get it. I was using else like it was an end else before silly me.

  8. #8
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by phantombmx
    nice! i might use this is a few weeks... dont feel bad.. just i dont have the time atm
    No worries. I barely made any of it. I just added the "spiral" part and where the spiral starts, so... I guess it's better in a sense.
    Free File Hosting
    No download timers!

    Rifkwtf.com

  9. #9
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'll try it in my autofighter when I relese version 2.

    It should work, some minor testing. I'm just lazy. XD

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
  •