ok im very confused to be honest, i have made a powerminer script firstly each rock had its own mining procedure, and i was told that it was unnessesary to have 8 procedures that all do the same thing execpt mine a different rock!
so i change the script and added cases eg...
and with that i used only one procedure...Code:procedure SetRockColor; begin Case Rock of //Depending on what the user put for RockType, do one of the following 'Clay' : RockColor := ClayColor; //Load the right color into RockColor 'Tin' : RockColor := TinColor; 'Copper' : RockColor := CopperColor; 'Iron' : RockColor := IronColor; 'Gold' : RockColor := GoldColor; 'Mithril' : RockColor := MithrilColor; 'AddyColor' : RockColor := AddyColor; 'RuneColor' : RockColor := RuneColor; else begin WriteLn('Invalid RockType.'); TerminateScript; end;
(i know this procedure isnt my work but im just learning)Code:procedure Mine; begin if FindColorSpiralTolerance(x, y, RockColor, 1, 1, 515, 338, 5) then begin repeat wait(100+random(123)) Mmouse(x,y,3,3) wait(50 + random(50)); if (IsTextAt2(x, y, 'ine', 5) = True) then wait(50 + random(50)); wait(1) Mouse(x,y,2,2,True) Flag; FindNormalRandoms; Until(invfull) If (invfull) = True Then Loads := Loads + 1; MinedOres := MinedOres + 28; End; End;
but now im getting a problem with finding the rocks...
you see the whole...
confuses me, now somone said that i should change it toCode:'Clay' : RockColor := ClayColor;
but that wouldnt work because then i would be back to making a different procedure for each rock eg...Code:'Clay' := ClayColor;
this is confusing me quite abit and ive been looking for help for the last two days... please can somone help me out here and explain this to me.Code:procedure Mine; begin if FindColorSpiralTolerance(x, y, 'Clay', 1, 1, 515, 338, 5) then begin repeat wait(100+random(123)) Mmouse(x,y,3,3) wait(50 + random(50)); if (IsTextAt2(x, y, 'ine', 5) = True) then wait(50 + random(50)); wait(1) Mouse(x,y,2,2,True) Flag; FindNormalRandoms; Until(invfull) If (invfull) = True Then Loads := Loads + 1; MinedOres := MinedOres + 28; End; End;
thanks a million to everyone who helps me here, i would appreciate it so much.
HTYA



Reply With Quote










