Im fixing a powerminer thats going to be realeased soon but i was wondering how do you drop uncuts?
Thanks
Printable View
Im fixing a powerminer thats going to be realeased soon but i was wondering how do you drop uncuts?
Thanks
make bitmaps / dtms of the uncuts. If you find them in your inventory after full load, call a drop procedure
lol, no you mine normally. And after ever full load of coal / iron, you check your inventory if there are any uncuts there. If so, then you drop them.
Something i quickly whipped together ;) May need a little editting, and you have to create the DTMPHP Code:Procedure DropUncuts;
Begin
While(FindDTM(UncutDTM, x, y, MIX1, MIY1, MIX2, MIY2))do
Begin
Mouse(x, y, 3, 3, False);
Wait(100 + Random(70));
If(FindText(x, y, 'Drop', UpChars, MIX1, MIY1, MIX2, MIY2))then
Begin
Mouse(x, y, 3, 3, True);
Wait(500 + Random(500));
end;
end;
end;
Star i was wondering... Whats the difference of using 'While' 'Do' instead of 'If' 'Then'?
While does it multiple times. If does it once. Repeat if is the same as while. However I like repeat if better because it offers more flexibilty in the until condition.
SCAR Code:program New;
const
booger=2; //dont touch
whichone='whiledo'; //choose 'whiledo' or 'ifthen' or 'repeatifthen'
begin
case whichone of
'whiledo':
begin
while booger=2 do
begin
writeln('lala');
end;
end;
'ifthen':
begin
if booger =2 then writeln('lala');
end;
'repeatifthen':
begin
repeat
if booger =2 then writeln('lala');
until not(booger=2);
end;
end;
end.
Similiarly, I like
SCAR Code:repeat
i:=i+1;
dostuff;
until i=some number;
//better than
for i= 0 to some number do
dostuff;
end;
np,
As Boreas said above:
Is the same as:PHP Code:While See_DTM do
Begin
...
end;
PHP Code:Repeat
...
Until not(See_DTM)
Not totally true.
From SCAR Manual :
While-Do, won't go through the loop at least once. ;)Quote:
Repeat loop is very similar, except the condition is checked at the end of the loop and it's exit condition (if it's true, the loop ends), so it always go through repeat-until loop at least 1 time.
Then you can wrap everything in the repeat with an if then to check it before going through. Repeat until FTW!!
Ok, i made the dtm for a uncut and puted it in, renamed it, changed the procedure a little bit star :P and put the procedure in the main loop, it compiles but it still just does the ores:eek: , any ideas?:confused:
Ok i made the dtm, changed ur procedure a little bit star to fix the dtm and added the drop uncuts into the main line and it compiles but doesnt drop the uncuts still any ideas?
it hasnt found the dtm, simple as that. Remake it