Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7
Не работает проверка
-
- Posts: 5
- Joined: 30.11.2009 10:45
10:52:17 [grin123]: Compiler: [Error] мининг.txt at 154:1): Identifier expected
10:52:17 [grin123]: Compiling failed
10:52:17 [grin123]: Script мининг.txt stoped successfuly
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
...... вот здесь ошибка, если удалить то в 165 строке
остальной код процедуры
......
Подскажите пожалуйста что не так?!....
program mining;
// ZuluHotel 3
//Mining s rekolom domoy
//Rekolits9 pri nahojdenii tipov man,woman,explojen,prichki
//pri previshenii vesa 1000
//dobor kirok, zariajaet RB
//resaets9 cheresz .rescue
//
// crafted by bahoho 1.04
const
pickaxe = $0E85;
sunduk = $4ACF5883; //Sunduk dl9 scroll recall, jarenoy ribi, kirok <Need Setup>
sunduk2 = $4B19F176; // Sunduk dl9 sbrosa rudi <Need Setup>
RB = $4B5304B2; // Roone book <Need Setup>
RunaHome = 1; // Nomer runi domoy [1-16] <Need Setup>
Xhome = 1072; // Koordinata X v dome <Need Setup>
trash = $4B79F18A; // pomoyka dl9 sbrosa mapov <Need Setup>
Moving = 1; // esli 1 s hodilkoy, esli drugoe 4islo to bez
MaxWeight = 300;
var x,y,i,t,k,p,r:integer;
ctime:TDateTime;
Enemy : array[1..5] of cardinal;
Ruda : array[1..8] of cardinal;
Runa : array[1..4] of integer;
{$Include 'all.inc'}
procedure Recall;
begin
Runa[1] := 2; // Nomera run v RB po shahtam [1-16] <Need Setup>
Runa[2] := 3; //esli netu stolko run prosto povtorit' neskolko odinakovih
Runa[3] := 4;
Runa[4] := 5;
UseObject(RB);
WaitGump(IntToStr(15 + Runa[r]));
wait(4000);
r:=r+1;
if (r > 4) then r:=1;
end;
procedure Home;
begin
repeat
checksave;
disarm;
wait(200);
UseObject(RB);
WaitGump(IntToStr(15 + RunaHome));
wait(3000);
if (GetX(self) <> Xhome) then
begin
Raw_move(Random(7), true);
wait(250);
Raw_move(GetDirection(self), true);
wait(500);
end;
until (GetX(self) = Xhome) or dead
end;
function CheckPickaxe : Boolean;
var tmpser : Cardinal;
begin
Result := true;
if (ObjAtLayer(RhandLayer) = 0) then
begin
tmpser := findtype(pickaxe,backpack);
if tmpser = 0 then
begin
Result := false;
exit;
end;
wait(500);
checksave;
end;
end;
function CheckEnemy : Boolean;
begin
Result := false;
for p:=1 to 5 do
begin
findtype(Enemy[p],ground)
if (findcount > 0) then
begin
Result := true;
Addtosystemjournal('Vragi, suka, ne sp9t!!!');
exit;
end;
wait(100)
checksave;
end;
end;
procedure move;
begin
x:=GetX(self);
y:=GetY(self);
t:=1;
if (GetDirection(self) = 0) then k:= 4;
if (GetDirection(self) = 1) then k:= 5;
if (GetDirection(self) = 2) then k:= 6;
if (GetDirection(self) = 3) then k:= 7;
if (GetDirection(self) = 4) then k:= 0;
if (GetDirection(self) = 5) then k:= 1;
if (GetDirection(self) = 6) then k:= 2;
if (GetDirection(self) = 7) then k:= 3;
repeat
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
ctime:=now;
UseObject(ObjAtLayer(RHandLayer));
WaitForTarget(2000);
If TargetPresent then TargetToTile(0,GetX(self),GetY(self), GetZ(self));
wait(2000);
k := InJournalBetweenTimes('start', ctime, Now);
if (k <> -1) then
begin
if (t = 1) then
begin
Raw_move(GetDirection(self), true);
t:= t+1;
end
else
begin
Raw_move(Random(7), true);
t:=1;
end;
end
else
begin
Raw_move(k, true);
end;
wait(1000);
until (GetX(self) <> x) or (GetY(self) <> y) or dead
end;
function timer(var acttimer:integer;actafter:integer):boolean;
begin
result:=false;
acttimer:=acttimer+1;
if acttimer>=actafter then
begin
acttimer:=0;
result:=true;
end;
end;
function Min:integer;
begin
result:=0;
while (connected) do
begin
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
......
остальной код процедуры
......
if (ObjAtLayer(RHandLayer) = 0) then
begin
if (not CheckPickaxe) then begin
result:=1;
exit;
end;
equipt(RHandLayer,pickaxe);
end;
end;
end;
if (Moving = 1) then move;
end;
end;
for x := -2 to 2 do
begin
for y := -2 to 2 do
begin
wait(1000);
if (weight > MaxWeight) then
begin
wait(1000);
home;
exit;
end;
ctime := Now;
UseObject(ObjAtLayer(RHandLayer));
WaitForTarget(5000);
checksave;
If TargetPresent then TargetToTile(0, GetX(self)+x, GetY(self)+y, GetZ(self));
k:=0
repeat
if (CheckEnemy) then
begin
uosay('.guards')
Raw_move(GetDirection(self), true);
wait(1000);
home;
exit;
end;
checksave;
wait(100);
k:= k+1;
i := InJournalBetweenTimes('stop|anything', ctime, Now);
until (i<>-1) or ( k > 600);
wait(1000);
if (ObjAtLayer(RHandLayer) = 0) then
begin
if (not CheckPickaxe) then exit;
equipt(RHandLayer,pickaxe);
end;
end;
end;
if (Moving = 1) then move;
end;
end;
BEGIN
r:=1;
Ruda[1] := $19B9;
Ruda[2] := $0F30;
Ruda[3] := $0F2D;
Ruda[4] := $0F25;
Ruda[5] := $0EED;
Ruda[6] := $0F21;
Ruda[7] := $0F25;
Ruda[8] := $1BE9;
Enemy[1] := $0191;
Enemy[2] := $0190;
Enemy[3] := $0F0D;
Enemy[4] := $0005;
Enemy[5] := $0006;
ignore(self);
finddistance := 20;
if (not dead) then home;
SetARStatus(true);
while true do
begin
while Connected do
begin
if (GetX(self) = Xhome) and not dead then
begin
Addtosystemjournal('Home, sweet home');
wait(1000);
MoveItems(backpack, $14ED, $FFFF, trash, 0, 0, 0, 50)
wait(1000);
useobject(sunduk2);
wait(1000);
for k := 1 to 8 do
begin
repeat
findtype(Ruda[k],BackPack);
if (findcount > 0) then MoveItems(backpack, Ruda[k], $FFFF, sunduk2, 0, 0, 0, 50);
wait(100);
checksave;
until findcount = 0;
end;
wait(1000);
useobject(sunduk);
wait(1000);
Hungry(1,sunduk);
wait(1000);
checksave;
findtype($1F4C,sunduk);
if (findcount > 0) then MoveItems(sunduk, $1F4C, $FFFF, RB, 0, 0, 0, 500)
else
begin
Addtosystemjournal('KoH4uJIuCb scrool recall');
exit;
end;
wait(1000);
checksave;
MoveItems(Backpack, $1F4C, $FFFF, sunduk, 0, 0, 0, 500);
wait(1000);
checksave;
wait(1000);
if (not CheckPickaxe) then
begin
findtype($0E85,sunduk);
if findcount > 0 then
MoveItem(FindItem, 5, BackPack, 0, 0, 0)
else
Addtosystemjournal('KoH4uJIuCb Kupku');
checksave;
end;
wait(1000);
disarm;
recall;
end;
if CheckPickaxe and (not dead) then Min
else
begin
if dead then
begin
wait(1000);
uosay('.rescue');
wait(3000);
Addtosystemjournal('y6uJIu!!!');
uosay('.msg Doger PALEVOOOOOOOOOOOOooooooOOOOOO');
home;
end;
end;
end;
wait(100);
end;
END.
10:52:17 [grin123]: Compiling failed
10:52:17 [grin123]: Script мининг.txt stoped successfuly
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
...... вот здесь ошибка, если удалить то в 165 строке
остальной код процедуры
......
Подскажите пожалуйста что не так?!....
program mining;
// ZuluHotel 3
//Mining s rekolom domoy
//Rekolits9 pri nahojdenii tipov man,woman,explojen,prichki
//pri previshenii vesa 1000
//dobor kirok, zariajaet RB
//resaets9 cheresz .rescue
//
// crafted by bahoho 1.04
const
pickaxe = $0E85;
sunduk = $4ACF5883; //Sunduk dl9 scroll recall, jarenoy ribi, kirok <Need Setup>
sunduk2 = $4B19F176; // Sunduk dl9 sbrosa rudi <Need Setup>
RB = $4B5304B2; // Roone book <Need Setup>
RunaHome = 1; // Nomer runi domoy [1-16] <Need Setup>
Xhome = 1072; // Koordinata X v dome <Need Setup>
trash = $4B79F18A; // pomoyka dl9 sbrosa mapov <Need Setup>
Moving = 1; // esli 1 s hodilkoy, esli drugoe 4islo to bez
MaxWeight = 300;
var x,y,i,t,k,p,r:integer;
ctime:TDateTime;
Enemy : array[1..5] of cardinal;
Ruda : array[1..8] of cardinal;
Runa : array[1..4] of integer;
{$Include 'all.inc'}
procedure Recall;
begin
Runa[1] := 2; // Nomera run v RB po shahtam [1-16] <Need Setup>
Runa[2] := 3; //esli netu stolko run prosto povtorit' neskolko odinakovih
Runa[3] := 4;
Runa[4] := 5;
UseObject(RB);
WaitGump(IntToStr(15 + Runa[r]));
wait(4000);
r:=r+1;
if (r > 4) then r:=1;
end;
procedure Home;
begin
repeat
checksave;
disarm;
wait(200);
UseObject(RB);
WaitGump(IntToStr(15 + RunaHome));
wait(3000);
if (GetX(self) <> Xhome) then
begin
Raw_move(Random(7), true);
wait(250);
Raw_move(GetDirection(self), true);
wait(500);
end;
until (GetX(self) = Xhome) or dead
end;
function CheckPickaxe : Boolean;
var tmpser : Cardinal;
begin
Result := true;
if (ObjAtLayer(RhandLayer) = 0) then
begin
tmpser := findtype(pickaxe,backpack);
if tmpser = 0 then
begin
Result := false;
exit;
end;
wait(500);
checksave;
end;
end;
function CheckEnemy : Boolean;
begin
Result := false;
for p:=1 to 5 do
begin
findtype(Enemy[p],ground)
if (findcount > 0) then
begin
Result := true;
Addtosystemjournal('Vragi, suka, ne sp9t!!!');
exit;
end;
wait(100)
checksave;
end;
end;
procedure move;
begin
x:=GetX(self);
y:=GetY(self);
t:=1;
if (GetDirection(self) = 0) then k:= 4;
if (GetDirection(self) = 1) then k:= 5;
if (GetDirection(self) = 2) then k:= 6;
if (GetDirection(self) = 3) then k:= 7;
if (GetDirection(self) = 4) then k:= 0;
if (GetDirection(self) = 5) then k:= 1;
if (GetDirection(self) = 6) then k:= 2;
if (GetDirection(self) = 7) then k:= 3;
repeat
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
ctime:=now;
UseObject(ObjAtLayer(RHandLayer));
WaitForTarget(2000);
If TargetPresent then TargetToTile(0,GetX(self),GetY(self), GetZ(self));
wait(2000);
k := InJournalBetweenTimes('start', ctime, Now);
if (k <> -1) then
begin
if (t = 1) then
begin
Raw_move(GetDirection(self), true);
t:= t+1;
end
else
begin
Raw_move(Random(7), true);
t:=1;
end;
end
else
begin
Raw_move(k, true);
end;
wait(1000);
until (GetX(self) <> x) or (GetY(self) <> y) or dead
end;
function timer(var acttimer:integer;actafter:integer):boolean;
begin
result:=false;
acttimer:=acttimer+1;
if acttimer>=actafter then
begin
acttimer:=0;
result:=true;
end;
end;
function Min:integer;
begin
result:=0;
while (connected) do
begin
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
......
остальной код процедуры
......
if (ObjAtLayer(RHandLayer) = 0) then
begin
if (not CheckPickaxe) then begin
result:=1;
exit;
end;
equipt(RHandLayer,pickaxe);
end;
end;
end;
if (Moving = 1) then move;
end;
end;
for x := -2 to 2 do
begin
for y := -2 to 2 do
begin
wait(1000);
if (weight > MaxWeight) then
begin
wait(1000);
home;
exit;
end;
ctime := Now;
UseObject(ObjAtLayer(RHandLayer));
WaitForTarget(5000);
checksave;
If TargetPresent then TargetToTile(0, GetX(self)+x, GetY(self)+y, GetZ(self));
k:=0
repeat
if (CheckEnemy) then
begin
uosay('.guards')
Raw_move(GetDirection(self), true);
wait(1000);
home;
exit;
end;
checksave;
wait(100);
k:= k+1;
i := InJournalBetweenTimes('stop|anything', ctime, Now);
until (i<>-1) or ( k > 600);
wait(1000);
if (ObjAtLayer(RHandLayer) = 0) then
begin
if (not CheckPickaxe) then exit;
equipt(RHandLayer,pickaxe);
end;
end;
end;
if (Moving = 1) then move;
end;
end;
BEGIN
r:=1;
Ruda[1] := $19B9;
Ruda[2] := $0F30;
Ruda[3] := $0F2D;
Ruda[4] := $0F25;
Ruda[5] := $0EED;
Ruda[6] := $0F21;
Ruda[7] := $0F25;
Ruda[8] := $1BE9;
Enemy[1] := $0191;
Enemy[2] := $0190;
Enemy[3] := $0F0D;
Enemy[4] := $0005;
Enemy[5] := $0006;
ignore(self);
finddistance := 20;
if (not dead) then home;
SetARStatus(true);
while true do
begin
while Connected do
begin
if (GetX(self) = Xhome) and not dead then
begin
Addtosystemjournal('Home, sweet home');
wait(1000);
MoveItems(backpack, $14ED, $FFFF, trash, 0, 0, 0, 50)
wait(1000);
useobject(sunduk2);
wait(1000);
for k := 1 to 8 do
begin
repeat
findtype(Ruda[k],BackPack);
if (findcount > 0) then MoveItems(backpack, Ruda[k], $FFFF, sunduk2, 0, 0, 0, 50);
wait(100);
checksave;
until findcount = 0;
end;
wait(1000);
useobject(sunduk);
wait(1000);
Hungry(1,sunduk);
wait(1000);
checksave;
findtype($1F4C,sunduk);
if (findcount > 0) then MoveItems(sunduk, $1F4C, $FFFF, RB, 0, 0, 0, 500)
else
begin
Addtosystemjournal('KoH4uJIuCb scrool recall');
exit;
end;
wait(1000);
checksave;
MoveItems(Backpack, $1F4C, $FFFF, sunduk, 0, 0, 0, 500);
wait(1000);
checksave;
wait(1000);
if (not CheckPickaxe) then
begin
findtype($0E85,sunduk);
if findcount > 0 then
MoveItem(FindItem, 5, BackPack, 0, 0, 0)
else
Addtosystemjournal('KoH4uJIuCb Kupku');
checksave;
end;
wait(1000);
disarm;
recall;
end;
if CheckPickaxe and (not dead) then Min
else
begin
if dead then
begin
wait(1000);
uosay('.rescue');
wait(3000);
Addtosystemjournal('y6uJIu!!!');
uosay('.msg Doger PALEVOOOOOOOOOOOOooooooOOOOOO');
home;
end;
end;
end;
wait(100);
end;
END.
Code: Select all
begin
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
......
остальной код процедуры <===============ВЫГЛЯДИТ НЕМНОГО ПОДОЗРИТЕЛЬНО, НЕ НАХОДИШЬ?
......
if (ObjAtLayer(RHandLayer) = 0) then
begin
if (not CheckPickaxe) then begin
"Как хочешь ты трудись;
Но приобресть не льстись
Ни благодарности, ни славы,
Коль нет в твоих трудах ни пользы, ни забавы. (с) С.Крылов."
Но приобресть не льстись
Ни благодарности, ни славы,
Коль нет в твоих трудах ни пользы, ни забавы. (с) С.Крылов."
-
- Posts: 5
- Joined: 30.11.2009 10:45
WladL wrote:Code: Select all
begin if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe); ...... остальной код процедуры <===============ВЫГЛЯДИТ НЕМНОГО ПОДОЗРИТЕЛЬНО, НЕ НАХОДИШЬ? ...... if (ObjAtLayer(RHandLayer) = 0) then begin if (not CheckPickaxe) then begin
![Very Happy :D](./images/smilies/icon_biggrin.gif)
" ......
остальной код процедуры"?а про должение оставить? В остальном я правильно подобавлял?
-
- Posts: 5
- Joined: 30.11.2009 10:45
эм...не сочти за труд, загляни сюда http://stealth.od.ua/forum/viewtopic.php?t=1123 и через 2 часа изучения, ты сам найдешь "Что не так?".
"Как хочешь ты трудись;
Но приобресть не льстись
Ни благодарности, ни славы,
Коль нет в твоих трудах ни пользы, ни забавы. (с) С.Крылов."
Но приобресть не льстись
Ни благодарности, ни славы,
Коль нет в твоих трудах ни пользы, ни забавы. (с) С.Крылов."
-
- Posts: 5
- Joined: 30.11.2009 10:45
Это из этой строчки:dance4Life2 wrote:Вроде всё работает, но есть 1 проблема, когда он прилетел в шахту, начинает копать, а потом реколитса(После рекола пишет что он видет себя) Может быть такое?(что он из-за себя реклитса?)
Code: Select all
if (weight > MaxWeight) then
Code: Select all
if (weight > str*4) then
Code: Select all
program mining;
// ZuluHotel 3
//Mining s rekolom domoy
//Rekolits9 pri nahojdenii tipov man,woman,explojen,prichki
//pri previshenii vesa 1000
//dobor kirok, zariajaet RB
//resaets9 cheresz .rescue
//
// crafted by bahoho 1.04
const
pickaxe = $0E85;
sunduk = $5273C4E2; //Sunduk dl9 scroll recall, jarenoy ribi, kirok <Need Setup>
sunduk2 = $5273C0B6; // Sunduk dl9 sbrosa rudi <Need Setup>
RB = $51EEA179; // Roone book <Need Setup>
RunaHome = 1; // Nomer runi domoy [1-16] <Need Setup>
Xhome = 383; // Koordinata X v dome <Need Setup>
trash = $5273E1BF; // pomoyka dl9 sbrosa mapov <Need Setup>
Moving = 1; // esli 1 s hodilkoy, esli drugoe 4islo to bez
MaxWeight = 100;
var x,y,i,t,k,p,r:integer;
ctime:TDateTime;
Enemy : array[1..5] of cardinal;
Ruda : array[1..8] of cardinal;
Runa : array[1..4] of integer;
{$Include 'all.inc'}
procedure Recall;
begin
Runa[1] := 3; // Nomera run v RB po shahtam [1-16] <Need Setup>
Runa[2] := 4; //esli netu stolko run prosto povtorit' neskolko odinakovih
Runa[3] := 3;
Runa[4] := 4;
UseObject(RB);
WaitGump(IntToStr(15 + Runa[r]));
wait(4000);
r:=r+1;
if (r > 4) then r:=1;
end;
procedure Home;
begin
repeat
checksave;
disarm;
wait(200);
UseObject(RB);
WaitGump(IntToStr(15 + RunaHome));
wait(3000);
if (GetX(self) <> Xhome) then
begin
Raw_move(Random(7), true);
wait(250);
Raw_move(GetDirection(self), true);
wait(500);
end;
until (GetX(self) = Xhome) or dead
end;
function CheckPickaxe : Boolean;
var tmpser : Cardinal;
begin
Result := true;
if (ObjAtLayer(RhandLayer) = 0) then
begin
tmpser := findtype(pickaxe,backpack);
if tmpser = 0 then
begin
Result := false;
exit;
end;
wait(500);
checksave;
end;
end;
function CheckEnemy : Boolean;
begin
Result := false;
for p:=1 to 5 do
begin
findtype(Enemy[p],ground)
if (findcount > 0) then
begin
Result := true;
Addtosystemjournal('Vragi, suka, ne sp9t!!!');
exit;
end;
wait(100)
checksave;
end;
end;
procedure move;
begin
x:=GetX(self);
y:=GetY(self);
t:=1;
if (GetDirection(self) = 0) then k:= 4;
if (GetDirection(self) = 1) then k:= 5;
if (GetDirection(self) = 2) then k:= 6;
if (GetDirection(self) = 3) then k:= 7;
if (GetDirection(self) = 4) then k:= 0;
if (GetDirection(self) = 5) then k:= 1;
if (GetDirection(self) = 6) then k:= 2;
if (GetDirection(self) = 7) then k:= 3;
repeat
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
ctime:=now;
UseObject(ObjAtLayer(RHandLayer));
WaitForTarget(2000);
If TargetPresent then TargetToTile(0,GetX(self),GetY(self), GetZ(self));
wait(2000);
k := InJournalBetweenTimes('start', ctime, Now);
if (k <> -1) then
begin
if (t = 1) then
begin
Raw_move(GetDirection(self), true);
t:= t+1;
end
else
begin
Raw_move(Random(7), true);
t:=1;
end;
end
else
begin
Raw_move(k, true);
end;
wait(1000);
WaitConnection(3000);
until (GetX(self) <> x) or (GetY(self) <> y) or dead ;
end;
function timer(var acttimer:integer;actafter:integer):boolean;
begin
result:=false;
acttimer:=acttimer+1;
if acttimer>=actafter then
begin
acttimer:=0;
result:=true;
end;
end;
function Min:integer;
begin
result:=0;
while (connected) do
begin
if (ObjAtLayer(RHandLayer) = 0) then equipt(RHandLayer,pickaxe);
UOSay('oioioi')
for x := -2 to 2 do
begin
for y := -2 to 2 do
begin
wait(1000);
if (weight > MaxWeight) then
begin
wait(1000);
home;
exit;
end;
ctime := Now;
UseObject(ObjAtLayer(RHandLayer));
WaitForTarget(5000);
checksave;
If TargetPresent then TargetToTile(0, GetX(self)+x, GetY(self)+y, GetZ(self));
k:=0
repeat
if (CheckEnemy) then
begin
uosay('.guards')
Raw_move(GetDirection(self), true);
wait(1000);
home;
exit;
end;
checksave;
wait(100);
k:= k+1;
i := InJournalBetweenTimes('stop|anything', ctime, Now);
until (i<>-1) or ( k > 600);
wait(1000);
if (ObjAtLayer(RHandLayer) = 0) then
begin
if (not CheckPickaxe) then begin
result:=1;
exit;
end;
equipt(RHandLayer,pickaxe);
end;
end;
end;
if (Moving = 1) then move;
end;
end;
BEGIN
r:=1;
Ruda[1] := $19B9;
Ruda[2] := $0F30;
Ruda[3] := $0F2D;
Ruda[4] := $0F25;
Ruda[5] := $0EED;
Ruda[6] := $0F21;
Ruda[7] := $0F25;
Ruda[8] := $1BE9;
Enemy[1] := $0191;
Enemy[2] := $0190;
Enemy[3] := $0F0D;
Enemy[4] := $0005;
Enemy[5] := $0006;
ignore(self);
finddistance := 20;
if (not dead) then home;
SetARStatus(true);
while true do
begin
WaitConnection(3000);//надеюсь в инклюдах оно у тебя есть
if (GetX(self) = Xhome) and not dead then
begin
Addtosystemjournal('Home, sweet home');
wait(1000);
MoveItems(backpack, $14ED, $FFFF, trash, 0, 0, 0, 50)
wait(1000);
useobject(sunduk2);
wait(1000);
for k := 1 to 8 do
begin
repeat
findtype(Ruda[k],BackPack);
if (findcount > 0) then MoveItems(backpack, Ruda[k], $FFFF, sunduk2, 0, 0, 0, 50);
wait(100);
checksave;
until findcount = 0;
end;
wait(1000);
useobject(sunduk);
wait(1000);
Hungry(1,sunduk);
wait(1000);
checksave;
findtype($1F4C,sunduk);
if (findcount > 0) then MoveItems(sunduk, $1F4C, $FFFF, RB, 0, 0, 0, 500)
else
begin
Addtosystemjournal('KoH4uJIuCb scrool recall');
exit;
end;
wait(1000);
checksave;
MoveItems(Backpack, $1F4C, $FFFF, sunduk, 0, 0, 0, 500);
wait(1000);
checksave;
wait(1000);
if (not CheckPickaxe) then
begin
findtype($0E85,sunduk);
if findcount > 0 then
MoveItem(FindItem, 5, BackPack, 0, 0, 0)
else
Addtosystemjournal('KoH4uJIuCb Kupku');
checksave;
end;
wait(1000);
disarm;
recall;
end;
if CheckPickaxe and (not dead) then begin
if Min=1 then Home;
end else
begin
if dead then
begin
wait(1000);
uosay('.rescue');
wait(3000);
Addtosystemjournal('y6uJIu!!!');
uosay('.msg flash PALEVOOOOOOOOOOOOooooooOOOOOO');
home;
end;
end;
end;
wait(100);
end;
END.
Не могу понять даже как с помощью журнала проверит ошибку... Подскажите пожалуйста, я в скриптенге дуб дубом...
Скрипт подкоректировал с помощью постов WladL.
Одно из правил "хорошего тона" в программировании - расстановка уровней у блоков кода (в паскале блоки кода отделяются операторами begin...end, а так же repeat...until). Расставь нормально уровни в коде и ты увидишь, что у тебя один из end'ов лишний. Где конкретно косяк и забыл ли ты поставить "begin" или наоборот поставл лишний "end" решать тебе.
Помните – ничто так не защищает ваши зубы 12 часов днем и 12 часов ночью как уважительное отношение к окружающим.
"Многие из вас знакомы с достоинствами программиста. Их всего три, и разумеется это: лень, нетерпеливость и гордыня"© Larry Wall
"Многие из вас знакомы с достоинствами программиста. Их всего три, и разумеется это: лень, нетерпеливость и гордыня"© Larry Wall