Results 1 to 18 of 18

Thread: if (not(InFight)) and InChatMulti('omeone','else','fighting') then

  1. #1
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default if (not(InFight)) and InChatMulti('omeone','else','fighting') then

    I want to use this with my script..

    Basicaly, it means if you're not in a fight, and the chat text says, "Someone else is already fighting that" then it continues the procedure until in a fight.

    Code:
    if (not(InFight)) and InChatMulti('omeone','else','fighting') then
    How can i put this ^^ into the procedure below? I'm stumped.. or is there a better way to do this? Help anyone??

    Code:
    procedure RapeHidez;
    begin
      repeat
        FindNormalRandoms;
       if (not(InFight))then
        FindObj(x,y,'ttack',CowColor,20);
        Wait(102+random(20));
        Mouse(x,y,0,0,true);
        if (InFight) then
        MarkTime(FightTime);
        FindNormalRandoms;
       until
       TimeFromMark(FightTime) >= 5000+random(100);
    end;



    Please and Thankyou

  2. #2
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    try this
    SCAR Code:
    procedure RapeHidez;
    begin
      repeat
        FindNormalRandoms;
       if (not(InFight))then
        begin
         FindObj(x,y,'ttack',CowColor,20);
         Wait(102+random(20));
         Mouse(x,y,0,0,true);
         if (InFight) then
          begin
           MarkTime(FightTime);
           FindNormalRandoms;
          end;
         if (not(InFight)) and InChatMulti('omeone','else','fighting') then
          begin
          {'whatever you want it to do next' code here}
          end;
       end;
      until
       TimeFromMark(FightTime) >= 5000+random(100);
    end;
    STOP PM'ING ME

  3. #3
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i want it to start the current procedure it's in over agian. like the looking for the cow color, and then killing it.

    I cant just put that procedures name, could i?

  4. #4
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    i dont know i've never had to try it before...so try it:
    SCAR Code:
    procedure RapeHidez;
    begin
      repeat
        FindNormalRandoms;
       if (not(InFight))then
        begin
         FindObj(x,y,'ttack',CowColor,20);
         Wait(102+random(20));
         Mouse(x,y,0,0,true);
         if (InFight) then
          begin
           MarkTime(FightTime);
           FindNormalRandoms;
          end;
       end;
     if (not(InFight)) and InChatMulti('omeone','else','fighting') then
      begin
       RapeHidez;
      end;
      until(TimeFromMark(FightTime) >= 5000+random(100))
    end;
    STOP PM'ING ME

  5. #5
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ahhh, thank you sir, it worked, haha. i could have swore before it didnt work!

    shit, i'm all set now, back to work.


    thanks agian

  6. #6
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    your welcome glad i could help
    STOP PM'ING ME

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

    Default

    if (not(InFight)) or InChatMulti('omeone','else','fighting') then

    Or would be a better idea.

  8. #8
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    You can use the name of a procedure in the procedure? I didn't know that. That will help.


  9. #9
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea, haha, tell me about it. it works too. as far as i can see.

  10. #10
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by bobarkinator View Post
    You can use the name of a procedure in the procedure? I didn't know that. That will help.
    Yea just watch out for endless loops.

  11. #11
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Boreas, that's what i was concerned about, do you think this would continue to loop through itself, or would it continue on to the next procedure?


    Code:
    procedure RapeHidez;
    begin
      repeat
        FindNormalRandoms;
       if (not(InFight))then
        begin
         FindObj(x,y,'ttack',CowColor,20);
         Wait(250+random(20));
         Mouse(x,y,0,0,true);
         if (InFight) then
          begin
           MarkTime(FightTime);
           FindNormalRandoms;
          end;
         if (not(InFight)) and InChatMulti('omeone','else','fighting') then
         RapeHidez;
       end;
      until
       TimeFromMark(FightTime) >= 5000+random(100);
    end;
    i'm almost sure it'll continue through the procedure, once it's "InFight" but i could be wrong..

  12. #12
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Make a global var just in case, +1 it, and break if goes too many times. Reset to 0 if not (not(InFight)) and InChatMulti('omeone','else','fighting')

  13. #13
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So, you think something like this Boreas


    Code:
    procedure RapeHidez;
    begin
     repeat
       A:= A+1
       repeat
       FindNormalRandoms;
       if (not(InFight))then
        begin
         FindObj(x,y,'ttack',CowColor,15);
         Wait(250+random(20));
         Mouse(x,y,0,0,true);
         if (InFight) then
          begin
           A:= A-A
           MarkTime(FightTime);
           FindNormalRandoms;
          end;
         if (not(InFight)) and InChatMulti('omeone','else','fighting') then
         RapeHidez;
        end;
       until
       TimeFromMark(FightTime) >= 5000+random(100)
      until A=5
    end;

  14. #14
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    No I mean +1 where the RapeHidez is inside. And only call the RapeHidez inside if less than 5 or whatever. And if not (not(InFight)) and InChatMulti('omeone','else','fighting') then reset to 0.

  15. #15
    Join Date
    Sep 2006
    Location
    West U.S.
    Posts
    2,172
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    Yea just watch out for endless loops.
    yep keep in mind that endless loops = BANNAGE!!

    They are sisters...
    Runescape Classic

  16. #16
    ronny.m.p Guest

    Default

    Endless loops are good for learning with but if your going to script then always use failsafes. However i do belive weve gone off topic lol.

  17. #17
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    procedure RapeHidez(HowMany:integer);
    begin
      repeat
        FindNormalRandoms;
       if (not(InFight))then
        begin
         FindObj(x,y,'ttack',CowColor,20);
         Wait(102+random(20));
         Mouse(x,y,0,0,true);
         if (InFight) then
          begin
           MarkTime(FightTime);
           FindNormalRandoms;
          end;
       end;
       if (HowMany<5) and (not(InFight)) and InChatMulti('omeone','else','fighting') then
      begin
       RapeHidez(HowMany+1);
       exit;
      end;
      until(TimeFromMark(FightTime) >= 5000+random(100))
    end;

    No need for global this way. When calling in mainloop or other procedures do RapeHidez(0);. When its called from within itself, it will increase it. You change the 5 of course.


    Edit: you could also do it another way. Make it HowMany-1, and make it if (HowMany>0). This way, when you call it in another procedure or mainloop, you can put in the parameters how many times you want it to try before giving up.

  18. #18
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea, i already did something similar, it just does it once, and if it's greater then one, it moves on. thanks a lot tho everyone.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. InChatMulti and InChat not working?
    By Sandstorm in forum OSR Help
    Replies: 2
    Last Post: 11-24-2008, 04:44 AM
  2. InFight not working
    By SirPa in forum OSR Help
    Replies: 20
    Last Post: 11-16-2008, 04:43 AM
  3. How do I use InFight
    By Mistagnerd in forum OSR Help
    Replies: 21
    Last Post: 11-17-2007, 08:42 PM
  4. 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
  •