Results 1 to 13 of 13

Thread: Best Monster Finding Way

  1. #1
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Best Monster Finding Way

    I am almost done on my monk fighter, but there is still 1 problem. It sometimes tries to fight a monk that's already being fought.

    I read somewhere in someone's signature (i think that's what you call it) that they are working on an auto fighter, using best method. DTM... Well is DTM the best way to fight the monks? Will DTM solve my problem of fighting a monk that's already being fought?.. also if DTM is the way then:

    First: I know how to use dtm... So do i just dtm the whole monster?
    Second: Will I need lots of dtm because the monster walks around..
    Third: If there is also another way to finding monster which is good plz lemme know

    Thx alot guyz

  2. #2
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by da_professa View Post
    I am almost done on my monk fighter, but there is still 1 problem. It sometimes tries to fight a monk that's already being fought.

    I read somewhere in someone's signature (i think that's what you call it) that they are working on an auto fighter, using best method. DTM... Well is DTM the best way to fight the monks? Will DTM solve my problem of fighting a monk that's already being fought?.. also if DTM is the way then:

    First: I know how to use dtm... So do i just dtm the whole monster?
    Second: Will I need lots of dtm because the monster walks around..
    Third: If there is also another way to finding monster which is good plz lemme know

    Thx alot guyz
    Lol, dude, DTM is a "Deformable Template Model". It has nothing to do with fighting. It's like a bitmap, but only certain pixels in a bitmap. It's much more efficient than a bitmap because it does not require all the pixels to be searched and is much smaller and faster to find.

    And use the functions in SRL/SRL/skill/Fighting.scar to find out if a monster is being fought or not.

  3. #3
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So is it no possible to use dtm to fight?.. also I used the ones in fighting, and they don't always work.
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig (I did, so should u )

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    its possible to use at DTM to fight but its very ineffeicnet
    best thing to do would use a compination of FindObj procedure and InFight at procedure.
    look those two up and try something out.
    DTMS are not really good for things on the mainscreen. only inventory and bank

  5. #5
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by yohojo8 View Post
    its possible to use at DTM to fight but its very ineffeicnet
    best thing to do would use a compination of FindObj procedure and InFight at procedure.
    look those two up and try something out.
    DTMS are not really good for things on the mainscreen. only inventory and bank
    Amen.

  6. #6
    Join Date
    Jun 2006
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Maybe use a procedure to check if it's in a fight? or check for the text 'someone else is fighting that' and if it gets t he text click on another monk

  7. #7
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rabcarl View Post
    Maybe use a procedure to check if it's in a fight? or check for the text 'someone else is fighting that' and if it gets t he text click on another monk
    That's exactly what I was thinking. Keep a log of the coords of the monk that is being fought and make an offset from that point and start a monster find from that x, y coord.

  8. #8
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Heres how to use findobj
    function FindObj(var cx, cy: Integer; Text: String; color, tolerance: Integer): Boolean;

    SCAR Code:
    if FindObj(x,y,'Attack Monk',MONKCOLOR,10) then
    Mouse(x,y,2,2,true)
    repeat
    Wait(1000)
    until (InFigh=False)

    that would click a monk and wait until you are no longer fighting it.
    you may also want to learn how to use
    IsFightAt
    to check if the monk you click is in a fight or not. but yea =)

  9. #9
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry abt the post delay...just been really busy wid studies .. Anyway yeah.. infight only checks if u r in fight.. but the idea about checking the log screen if it says if the monster is already in fight.. I think that would work... thx alot guyz
    tc
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig (I did, so should u )

  10. #10
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    One problem with using the text to check if the monster is in a fight is that if you're just attacking stuff the text won't be scrolling very fast. It will probably stay as 'already fighting' for quite a while, making your script think every monster is in combat.

    I would suggest you use my chickenkiller as a reference. I use sequential searches for colors. So, if a monk has a brown robe and a white head, then you could search for the headcolor, then the brown robe color, then another slightly different brown robe color. The benefit of doing it this way is that you can do all your monsterfinding before you ever move the mouse. So, if you work it out and use good colors, you will only need to make one mouse move over to the monster and click it to attack. FindObj only uses one color and moves the mouse all over the screen to find the monster name in the uptext, which I think is annoying and probably detectable.

    Once you've located a monster with the color searches, you should then see if it is already in combat. Again, you can do this before you move the mouse by searching for the green color or the red color of the health bar in a small square around the monk location you found with your color search.

    There is an AttackMonster function in SRL/SRL/skill/fighting.scar. You could also look at that as an example. One problem with that function is that it doesn't check for being in combat.

    If you copy that function into your own script you can modify it to check for combat by adding something like this after getting the coordinates from the color search part of the function...

    Code:
    if not(FindColor(tmpx2,tmpy2,65280,x-10,y-10,x+10,y+10)) then
          if not(FindColor(tmpx2,tmpy2,255,x-10,y-10,x+10,y+10)) then
          begin
            MMouse(x,y,1,2);
            Wait(50);
            if IsUpText(MonsterName) then
            begin
              Mouse(x,y,1,2,true);
              Result:=True;
              Monsterkills:=Monsterkills+1;
              Players[CurrentPlayer].Killed := Players[CurrentPlayer].Killed + 1;
              exit;
            end;
          end;
    ...where x and y are the location of the monster.

    65280 is the green color in the health bar. 255 is the red color in the health bar.

    If you do not include the fighting.scar include then you do not need to change the name of the AttackMonster function in your own script. If you do, then you will need to rename it, like AttackMonsterProf.

    Good luck!

  11. #11
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry for another post delay... That is actually really brilliant.. Tmpx2 is that cordinate for above monster.. if not wat is it?..

    Ok so this is how it goes right.. First find the monster using colours (no mouse moving so undetectable), then check if it doesn't find the red and the green colour on top of the monster. Then do the attack procedure... THis is brilliant, I wish there was a way to giv rep in this forum... Seriously that's brilliant.. Thx alot.. Even though I have left the monk fighter, Learning something new is great.. Esp if it's something like this...

    If possible can u just explain the tmpx, and the x-10 and so on.. All the stuff in the findcolor besides the colour it self.. I know that they are cordinates, but just want to know how they will work.. I don't know how to explain.. Maybe u understand what I am trying to say..

    Once again THX ALOT
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig (I did, so should u )

  12. #12
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    The monster is at position x,y.

    The tmpx2 and tmpy2 are 'throwaway' variables. They have no meaning here. The reason I didn't just use x or y is because those tell you where the monster is. If you did FindColor(x,y,blahblahblah) and it found green it would change the x,y position to where the green color was instead of where the monster is. And if it DOESN'T find green or red (not in combat) then it will return 0,0 so when you go to attack the monster the mouse will move to the top left corner of the screen instead of to where the monster is.

    The x-10,y-10,x+10,y+10 means that when you find your monster at position x,y you are going to search for the red and green colors within a 20x20 square around that spot, with x,y at the center of that square.

  13. #13
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok.. I understand.. Hey I learned something new once more; i.e. about why the mouse goes to the top left corner sometimes...

    Once again thx alot man.. Even though that script is garbage, it's best to keep on learning..Once more thxxxxxxxxxxxx
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig (I did, so should u )

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-23-2008, 03:37 AM
  2. Finding monster colors...
    By supersayian2224 in forum OSR Help
    Replies: 6
    Last Post: 11-17-2007, 08:58 PM
  3. Monster Sp4nker 1.0!
    By wtf i sp4nk in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 12-30-2006, 03:11 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
  •