PDA

View Full Version : [Help] How do i make a fighter wait?



Hey321
11-10-2006, 10:28 PM
How do i make an auto-fighter wait until the fight is over? This is my current fighting proc.



procedure Fighting;
begin
if not InFight then begin
FindMonster(MColor1, MColor2, MColor3,tolerance, MonsterName);
KAttackMonster(MColor1,MColor2,MColor3,tolerance,M onsterName);
end; end;

Any ideas?

Infantry001
11-11-2006, 02:47 AM
Procedure Fighting;
begin
if not InFight then
begin
FindMonster(MColor1, MColor2, MColor3,tolerance, MonsterName);
KAttackMonster(MColor1,MColor2,MColor3,tolerance,M onsterName);
end;
while InFight do
randomstuffhere;
end;

I think this may be what oyu want? if no, then give me more info please.

Hey321
11-11-2006, 11:21 AM
That's pretty much what i was looking for. But what it will do is wait until it's done fighting then fight again? Or do i have to call on the procedure in the randomstuffhere; part?

Jagex_Fagex
11-11-2006, 11:54 AM
well, you wld have to do something along the lines of,

while inFight do
repeat
wait(100);
until(not inFight)

or sumthign like that
you would need to add to that for more randomness and failsafes and such. but you get the basic idea

Hey321
11-11-2006, 12:16 PM
Yes, i'll try and if then begin else statement first. I'v got a lot of help to as my mom is a programmer :).

Infantry001
11-11-2006, 07:59 PM
lol that is awesome