Results 1 to 14 of 14

Thread: monster fighting

  1. #1
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default monster fighting

    ok im alittle confused on the monster color fighting on wat to fill in it
    ' if(FindColor(x,y,MonsterColor,0,0,600,600)) '
    do i put anything in for the x,y?
    do i keep the monstercolor that name or does it matter?
    and wat do i do for the next 4 numbers

    and after i do do that how to i make it click the monster??
    (((how can u make scar right click?)))

    (((and fianly is there a command so wen ur character is at the coords it will do wat u want next))) were is a scar command list of all the commands??

  2. #2
    Join Date
    Oct 2007
    Location
    Florida
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    x,y are the variables of the coordinates the color of the monster is going to be, you leave those alone but be sure to declare them as variables. MonsterColor is probably the const your going to use to declare the monster's color, you can name this anything, but again, be sure to declare it as a const first, the 4 numbers after that is where SCAR is going to look for this color.

    When it comes to right clicking, use chooseoption('string').

  3. #3
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so if i put in
    choseoption thing the mouse will right click or how do i set it up??
    let me give u a lil mini script thing
    ((say i want the script to right click walk here to the position how wud i))
    program Mover;
    Begin
    repeat
    ClickMouse(352,185,true);
    Wait(5000);
    ClickMouse(352,185,true);
    Wait(5000);
    until(False) // Endless repeat
    end.

    ((( wen i use it to click coords it doesnt.. it jus clicks off that distance to the left or right not the same spot)))

    and how am i post to set the const variable (( and do i lieave the 4 numbers alone or wat)) i no its alot sorry but ty so much

  4. #4
    Join Date
    Oct 2007
    Location
    Florida
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here's an example of how I would attack a monster:

    SCAR Code:
    if FindColorSpiralTolerance(x, y, MonsterColor, 0,0,600,600)then
          begin;
            MMouse(x, y, 4, 4, false)
            ChooseOption('ttack')

    And to set your const:

    SCAR Code:
    const
    MonsterColor = 295929

    Of course, replacing 295929 with the actual color of the monster.

  5. #5
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    const
    monstercolor1 = 55555;
    monstercolor2 = 44444;

    procedure find;
    begin
      if(FindObjCustom(x, y, ['att', 'ack'], [monstercolor1 , monstercolor2 ], 5))then
      begin
        Mouse(x,y,3,3,true); //or false for right click
        //more code
      end;
    end;

    Basically that will find the colors you have picked and check if the uptext is attack (to see if you can attack it or making sure it is an npc). 5 at the end is tolerance.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

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

    Default

    Quote Originally Posted by Mute View Post
    Here's an example of how I would attack a monster:

    SCAR Code:
    if FindColorSpiralTolerance(x, y, MonsterColor, msx1,msy1,msx2,msy2)then
    begin;
      MMouse(x, y, 4, 4, false)
      ChooseOption('ttack')
      end;


    And to set your const:

    SCAR Code:
    const
    MonsterColor = 295929

    Of course, replacing 295929 with the actual color of the monster.

    600 isn't real mainscreen down and left corner
    use msx1,msy1,msx2,msy2

    ok this is RS main screen:
    SCAR Code:
    ______________________________
    |                      Msy1                   |
    |                                                |
    |                                                |
    |                                                |
    |Msx1                                  Msx2 |
    |                                                |
    |                                                |
    |                                                |
    |______________Msy2____________|

    Edit: i don't know why, but text moved after posting it


    Got it?
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  7. #7
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default



    There

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  8. #8
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok ok
    can lets say the montser color is 476935(random number)

    put that in a little short fight script for an example on how i wud do this

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

    Default

    Here's one way to do it, and I've commented almost every line so you can understand what's going on.

    SCAR Code:
    Program Something;

    const
     MonsterColor= 12312041; // Random number
     
    Procedure FightMonster;
    var x,y: Integer;
    begin
      if FindColorTolerance(x,y,MonsterColor,MSx1,MSy1,MSx2,MSy2,4) then // Finds color
      begin
       Mouse(x,y,5,5,false) // Right-clicks on the color with a little randomness
       Wait(200+random(300)) // For safety, and a little more humanlikeness
       if ChooseOption('ttack') then Writeln('Attacked monster') // Chooses the option to attack
       else Wait(2000+random(2000)) // Will wait if it didn't find "Attack"-option.
      end;
    end;

    Enjoy.

    -Knives

  10. #10
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok im tryning to use it for a rsc private server
    so i can jus need to fill in the color into that script and it shud work?

    EDITED i get en error in the MSx1

  11. #11
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    make sure u have SRL

    otherwise you cant just put in MSX1...ect.
    METAL HEAD FOR LIFE!!!

  12. #12
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    says
    Line 9: [Error] (9:40): Unknown identifier 'MSx1' in script
    if sum1 can help add
    stuna_boi@yahoo.com
    crime_mob_boy@hotmail.com

  13. #13
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    You have to include SRL

    {.include SRL/SRL.scar}
    Interested in C# and Electrical Engineering? This might interest you.

  14. #14
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OMG IT DOESNT WORK I INSTALLED THE SRL it said i complied it succfully

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Best Monster to range with?
    By Claymore in forum OSR Help
    Replies: 9
    Last Post: 12-04-2008, 08:55 PM
  2. Monster Sp4nker 1.0!
    By wtf i sp4nk in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 12-30-2006, 03:11 AM
  3. Best Monster Finding Way
    By da_professa in forum OSR Help
    Replies: 12
    Last Post: 11-18-2006, 05:45 PM

Posting Permissions

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