Results 1 to 21 of 21

Thread: InFight not working

  1. #1
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default InFight not working

    Hi Me again.

    Im still working on my chicken killer + cooker, but i ran into another problem
    I want to make the script wait to perform the next action untill a chicken is killed.
    I know you can do this using the InFight boolean, but it is not working =|

    Can someone find what is wrong with the script?

    PS: It is a little messy, tried different methods to make the InFight thing work

    Regards

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    In Fight is to check if your being attacked not if the chicken is killed, I recommend following the chicken with your mouse until you cant find the uptext e.g
    SCAR Code:
    Repeat
      FollowColor(x, y, {chicken color}, 6000);
    Until(Not IsUpText('hen'));

    Hope I Helped

  3. #3
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm well i thought because it's a chicken, InFight will only return true if you are attacking (and therefore attacked by) a chicken
    Thats why i used InFight To see if you are attacking/attacked, and if not, continue

    Anywho, i will try your idea

    Thanks (still messing with InFight though )


    EDIT: Tried Nauman's idea, but it doesn't work...
    SCAR Code:
    Unknown identifier 'FollowColor'

    Any other methods of getting this to work?

  4. #4
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Follow color is one of Naums Functions. He posted it some where in the forums. I think it was in the 'Core' section.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  5. #5
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Found it, thanks
    Where in the srl files should i implent it though?
    Not familiar with adding new functions

  6. #6
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Jiust copy the function into your script
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  7. #7
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Added it, just ending up with a illegal ammount of parameters
    Ill try something else,
    just want to make the script check if you are fighting, and perform the next action when you are not fighting anymore

  8. #8
    Join Date
    Dec 2007
    Location
    UK
    Posts
    479
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Check your animation while your fighting:

    This is what I use for my fishing script.

    SCAR Code:
    function AreWeFishing: Boolean;
    Var
     Me:TMe;
    Begin

      Me:= GetMe;
      Result := (InRange(Me.Animation,618,623)); // Finds your animation

    end;

    You will have to find out your animation number tho Goodluck!!
    I don't play runescape. I auto it

  9. #9
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm ill try that then

    I think it's wierd though, there are lotsa autofighters out there, yet noone knowns how to get my InFight working

    Thanks for all the help tho =D

  10. #10
    Join Date
    Dec 2007
    Location
    UK
    Posts
    479
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I hope it works because its a pretty flawless way to tell if your fighting or not.
    Is it a reflection script?
    I don't play runescape. I auto it

  11. #11
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nope, it's as basic as the come (Post 1 attachment )
    Only got back in to scripting 2 days ago, so yeah, nothing fancy yet

  12. #12
    Join Date
    Dec 2007
    Location
    UK
    Posts
    479
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh ryt, well ignore my other post. Cuz thats reflection. Appologies
    I don't play runescape. I auto it

  13. #13
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thats ok, you're just trying to help
    I did notice something though

    SCAR Code:
    Var
     Me:TMe;
    Begin
     
      Me:= GetMe;

    Does this also work with non-reflection scripts?

  14. #14
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Nope GetMe is a reflection-based function. BTW welcome back, I remember helping you with an auto talker or something.

  15. #15
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey yeah i remember you
    You helped me with the trading part of my autotalker
    Hmm might get back into that one, as this script aint getting nowhere

    ~Solved-ish, just set the wait to 12 secs, if i cant kill i chicken in 12 secs, im being weak.

    Thanks for all the help

  16. #16
    Join Date
    Dec 2007
    Location
    UK
    Posts
    479
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think TMe is a reflection variable but you can try it, just try to compile the script with the TMe bit in.
    I don't play runescape. I auto it

  17. #17
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    I know 4 different ways to check if your InFight or not. 2 color ways, 2 reflection. Which do u want?
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  18. #18
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ill go for the color once, as im not making a reflection script

  19. #19
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    //Uses findcolors, i use this in Fast fighter and NAF
    function InFight: Boolean;
    var
      x, y : Integer;
    begin
      Result := (FindColor(x, y, 65280, 242, 142, 283, 158)
        or FindColor(x, y, 255, 242, 142, 283, 158));
    end;

    //Uses TPA, this one I use in Nautilus
    function InFight: Boolean;
    var
      G, R, TPA: Tpointarray;
    begin
      FindColorsTolerance(G, 65280, 233, 134, 282, 172, 0);
      FindColorsTolerance(R, 255, 233, 134, 282, 172, 0);
      TPA := CombineTPA(G, R);
      Result := High(TPA) > 10;
    end;
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  20. #20
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    I know 4 different ways to check if your InFight or not. 2 color ways, 2 reflection. Which do u want?
    What are the reflection ways? (curious)

  21. #21
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    http://www.villavu.com/forum/showthread.php?t=19859

    a guy has a fix for you that might work in this thread.

    SCAR Code:
    var
      InFight : Boolean;

     repeat
       Wait(800 + random(200));
      until(InFight = False);

    Does that work? (unable to access RS to check it right now)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. New InFight function (using TPA)
    By marpis in forum Research & Development Lounge
    Replies: 5
    Last Post: 01-09-2009, 12:10 AM
  2. How do I use InFight
    By Mistagnerd in forum OSR Help
    Replies: 21
    Last Post: 11-17-2007, 08:42 PM
  3. InFight not working?
    By Maxcore in forum OSR Help
    Replies: 1
    Last Post: 10-27-2007, 05:29 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
  •