maxzzz
2006-05-23 02:50:20
I wonder if you use break, does it stop the script like TerminateScript.. Or does it ends the procedure which is running and then go to the next one?
By example if I have this:
Another question I want to ask, and since I'm not at home (and I can't look into drigers Scar Tut), I want to know if I use the cases correct.
I'm not about this:
Thanks
~ Maxzzz
By example if I have this:
procedure SmeltWait;
begin
case OreYpe of
"Bronze" :=
begin
repeat
LeaveScreenEvery(1);
wait(500+random(1300));
Randoms;
if(IsChatMessage('You have run out of'))then
Break;
until(FindBitmapTol(TX, TY, BronzeBar, x1, y1, x2, y2))or(IsChatMessage('You have run out of')); // 14 inv slot coords from bar
end;
"Iron" :=
begin
repeat
LeaveScreenEvery(1);
wait(500+random(1300));
Randoms;
if(IsChatMessage('You have run out of'))then
Break;
until(not(FindBitMapTol(TX, TY, IronOre, x1, y1, x2, y2))or(IsChatMessage('You have run out of')); // 28 inv slot coords iron ore
end;
"Steel" :=
begin
repeat
LeaveScreenEvery(1);
wait(500+random(1300));
Randoms;
if(IsChatMessage('You have run out of'))then
Break;
until(FindBitmapTol(TX, TY, SteelBar, x1, y1, x2, y2))or(IsChatMessage('You have run out of')); // 9 inv slot coords steel bar
end;
"Mith" :=
begin
repeat
LeaveScreenEvery(1);
wait(100+random(700));
Randoms;
if(IsChatMessage('You have run out of'))then
Break;
until(FindBitmapTol(TX, TY, MithrilBar, x1, y1, x2, y2))or(IsChatMessage('You have run out of')); // 5 inv slot coords mith bar
end;
"Addy" :=
begin
repeat
LeaveScreenEvery(1);
wait(500+random(1300));
Randoms;
if(IsChatMessage('You have run out of'))then
Break;
until(FindBitmapTol(TX, TY, AdamantBar, x1, y1, x2, y2))or(IsChatMessage('You have run out of')); // 4 inv slot coords addy bar
end;
"Rune" :=
begin
repeat
LeaveScreenEvery(1);
wait(500+random(1300));
Randoms;
if(IsChatMessage('You have run out of'))then
Break;
until(FindBitmapTol(TX, TY, RuneBar, x1, y1, x2, y2))or(IsChatMessage('You have run out of')); // 3 inv slot coords rune bar
end;
end;
Will the break stop the whole script or will it just stop the running procedure to go on with other procedures?Another question I want to ask, and since I'm not at home (and I can't look into drigers Scar Tut), I want to know if I use the cases correct.
I'm not about this:
"Rune" := // Not sure of this, is := the right way or : ?
begin
repeat
LeaveScreenEvery(1);
wait(500+random(1300));
Randoms;
if(IsChatMessage('You have run out of'))then
Break;
until(FindBitmapTol(TX, TY, RuneBar, x1, y1, x2, y2))or(IsChatMessage('You have run out of')); // 3 inv slot coords rune bar
end;
Also if you have comments on this little piece of code, please post them.Thanks
~ Maxzzz