Вот такую ошибку выдаетProgram MiningFindResp;
var
runebooks: array of cardinal;
mineTimer: TDateTime;
iR, STATE: integer;
info_minepoint: string;
const
home_runebook = $5CD07BCD;
book_type = $0EFA;
runebook_color = $021E;
spellbook_color = $0000;
dropX = 1886;
dropY = 2090;
ore_type = $19B9;
cooper_type = $1BF2;
pickaxe_type = $0E85;
tools_type = $1EB9;
//
STATE_CORRECT = 100;
STATE_ERROR_ARRAY_RUNEBOOK = 101;
STATE_ERROR_NOT_SPELLBOOK = 102;
STATE_MINEORE = 103;
{$Include 'all.inc'}
{$Include 'recalling.inc'}
{$Include 'charmove.inc'}
{$Include 'checkequipt.inc'}
procedure addNewVarToArray(new_elem: cardinal; iE: integer);
begin
SetArrayLength(runebooks,(1 + iE));
runebooks[iE]:= new_elem;
end;
procedure CreatedArrayRunebook;
var
e: integer;
begin
e:= 0;
While CountEx(book_type, runebook_color, backpack) > 0 do begin
CheckStability;
FindTypeEx(book_type, runebook_color, backpack, false);
if finditem <> home_runebook then begin
addNewVarToArray(finditem, e);
e:= e + 1;
end;
Ignore(finditem);
end;
addToSystemJournal('Total count runebooks = '+IntToStr(GetArrayLength(runebooks)));
IgnoreReset;
end;
procedure WriteToFile(filepath: string; data: string);
var
file: TFileStream;
begin
try
file := TFileStream.Create(filepath,fmOpenReadWrite);
file.seek(0, soFromEnd);
except
file := TFileStream.Create(filepath,fmCreate);
end;
file.WriteBuffer(data,Length(data));
file.Free;
end;
procedure AnalyzeMine(x: integer; y: integer; z: integer);
var
coord_string: string;
present_ores: string;
result_string: string;
ores: array[0..10] of string;
c : integer;
present: boolean;
begin
present := false;
ores[0] := 'Lavarock';
ores[1] := 'Icerock';
ores[2] := 'Shadow';
ores[3] := 'Azu';
ores[4] := 'Doom';
ores[5] := 'BlueSteel';
ores[6] := 'DarkRuby';
ores[7] := 'Cry';
ores[8] := 'Onix';
ores[9] := 'Mifril';
ores[10] := 'Gem';
coord_string := 'In ' + inttostr(x) + 'x' + inttostr(y) + 'x' + inttostr(z) + ' we have ';
for c := 0 to 10 do
begin
if InJournalBetweenTimes(ores[c],mineTimer,Now) > 0 then
begin
present := true;
present_ores := present_ores + ores[c] + ' ';
end;
end
if present = true then
begin
result_string := coord_string + present_ores + #13#10;
WriteToFile('C:\Ores.txt',result_string);
end;
end;
procedure GrabOre(need_ore: integer);
var g : Byte;
OreCol : Array [1..11] of Word;
Begin
CheckStability;
if ObjAtLayer(RhandLayer) <> 0 then
begin
Disarm;
wait(1000);
end
OreCol[1] := $093F; //Mifril
OreCol[2] := $0946; //Onyx
OreCol[3] := $0487; //Crystalit
OreCol[4] := $05D7; //Gem
OreCol[5] := $094E; //Blue Steel
OreCol[6] := $0214; //Dark Ruby
OreCol[7] := $0943; //doom
OreCol[8] := $094A; //azurite
OreCol[9] := $0940; //shadow
OreCol[10] := $09F9; //ice
OreCol[11] := $006F; //lava
for g := 1 to need_ore do
begin
CheckStability;
FindTypeEx(ore_type,OreCol[g],ground,false);
if FindCount > 0 then
begin
if (g <= 3) then begin beep; wait(100); beep; wait(100); beep; wait(100); end;
Grab(finditem, GetQuantity(finditem));
wait(500);
CheckStability;
end
end
End;
procedure DropOre;
var
OreColor : Word;
Begin
CheckStability;
While Count(ore_type) > 0 do begin
FindType(ore_type,backpack);
if FindCount > 0 then begin
OreColor := GetColor(finditem);
stack(ore_type,OreColor);
CheckStability;
end;
end;
End;
procedure CheckPickAxe;
var
copper, tools : cardinal;
Begin
CheckStability;
if (Count(pickaxe_type) < 5) then begin
FindType(tools_type,ground);
if FindCount > 0 then begin
tools := finditem;
repeat
CheckStability;
FindType(cooper_type,ground);
if FindCount > 0 then begin
Copper := finditem;
wait(500);
UseObject(tools);
WaitTargetObject(copper);
WaitGump('3717');
WaitJournalLine(Now, 'You create|destroy|You put', 30000);
wait(500);
end else begin
AddToSystemJournal('Не найден Copper, не могу сделать кирок!');
FullDisconnect;
end;
until Count(pickaxe_type) >= 5;
end else begin
AddToSystemJournal('Не найден tinkers tools!');
FullDisconnect;
end;
end;
End;
procedure GotoOnDropLoc;
Begin
CheckStability;
repeat
CharMove(dropX,dropY,0,true,1);
CheckStability;
until (GetX(self) = dropX) and (GetY(self) = dropY);
End;
procedure HomeFunction;
begin
if CastRecall(home_runebook) then begin
GotoOnDropLoc;
DropOre;
CheckPickAxe;
GrabRecallReagent(15);
Hungry(1, -1);
end;
end;
procedure MineOre;
var
pickaxe : cardinal;
TileX, TileY : integer;
begin
wait(1000);
for TileX:= (GetX(self) - 2) to (GetX(self) + 2) do begin
for TileY:= (GetY(self) - 2) to (GetY(self) + 2) do begin
if TargetPresent then CancelTarget;
if GetType(ObjAtLayer(RHandLayer)) <> pickaxe_type then begin
if not CheckEquipt(pickaxe_type, RhandLayer) then begin
HomeFunction;
exit;
end;
end;
CheckStability;
pickaxe:= ObjAtLayer(RHandLayer);
mineTimer:= now;
UseObject(pickaxe);
WaitTargetXYZ(TileX,TileY,GetZ(self));
WaitJournalLine(Now, 'no more ore|broke|stop mining|cannot see|far away|cannot mine|what is this?!', 30000);
AnalyzeMine(TileX,TileY,GetZ(self));
CheckStability;
GrabOre(3);
end;
end;
GrabOre(11);
end;
function VerificationSetting : integer;
begin
if (GetArrayLength(runebooks) = 0) then begin
result:= STATE_ERROR_ARRAY_RUNEBOOK; exit;
end;
if (FindTypeEx(book_type, spellbook_color, backpack, true) = 0) then begin
result:= STATE_ERROR_NOT_SPELLBOOK; exit;
end;
result:= STATE_CORRECT;
end;
begin
if not Connected then WaitConnection(3000);
CheckStability;
CreatedArrayRunebook;
STATE:= VerificationSetting;
if STATE <> STATE_CORRECT then begin
addToSystemJournal('ERROR: '+IntToStr(STATE));
FullDisconnect;
end;
CheckStability;
SetArStatus(true);
while true do begin
for iR:= 0 to (GetArrayLength(runebooks)-1) do begin
if CastRecall(runebooks[iR]) then begin
addToSystemJournal('Recall in the '+IntToStr(iR)+' mine.');
info_minepoint:= #13#10 + 'Now Mine №'+IntToStr(iR)+' for RB $'+intToHex(runebooks[iR],8)+ #13#10;
WriteToFile('C:\Ores.txt',info_minepoint);
STATE:= STATE_MINEORE;
end;
if STATE = STATE_MINEORE then MineOre;
if Weight > 300 then begin
HomeFunction;
end;
end;
end;
end.
Стелс клиент последний скачал
Error Include: File Not Exist
D:\Games\Ultima\stealth\Scripts\Include\recalling.inc
Compiling
Compiler: [Error] (Òåêñòîâûé äîêóìåíò (2).txt at 42:1): Unknown identifier 'CheckStability'
Compiling failed
Script Òåêñòîâûé äîêóìåíò (2).txt stoped successfuly