Вопрос у меня относительно проблемы манинга.
Скрипт
Code: Select all
Program Mining;
type MiningR = record
tile:word;
px,py,pz:integer;
end;
Var MiningP: array [0..1855] of MiningR; // это количество ваших тайлов, которое нужно изменить в зависимости от ваших тайлов
ItemCount,b:Integer;
Const
Forge = $40D38DC8; // АЙДИ ПЛАВИЛКИ
pointX = 2560; //координаты возле плавилки(прямо возле неё, ИНАЧЕ НЕ ВИДИТ)
pointY = 477;// координаты возле плавилки
eda = $097B;
point1X = 2558; //координаты перед шахтой
point1Y = 501; // координаты перед шахтой
point2X = 2560; // координаты внутри шахты - примерно 2-3 шага от входа
point2Y = 496; // координаты внутри шахты - примерно 2-3 шага от входа
//point3X = 2531; // 2 координаты чуть дальше от лодки
//point3Y = 464; // 2 координаты чуть дальше от лодки
nearX = 2532; //координаты возле лодки
nearY = 461; // координаты возле лодки
onboadx = 2535; //координаты на лодке
onboady = 460; //координаты на лодке
onboadz = -2; //координаты на лодке
Trap = $4396AF67;
waightlimit = 200; // максимальный лимит веса
OreType = $19B9;
PickType = $0E85;
PickGump = '3717';
Tinktype = $1EBC;
CopperType = $1BF2;
{$Include 'all.inc'}
Procedure GetMiningTiles(s:String;WPos:Integer);
begin
s := s + ' ';
MiningP[WPos].tile:=StrToInt(Copy(s,1,Pos(' ',s)-1));
Delete(s,1,Pos(' ',s));
MiningP[WPos].px:=StrToInt(Copy(s,1,Pos(' ',s)-1));
Delete(s,1,Pos(' ',s));
MiningP[WPos].py:=StrToInt(Copy(s,1,Pos(' ',s)-1));
Delete(s,1,Pos(' ',s));
MiningP[WPos].pz:=StrToInt(Copy(s,1,Pos(' ',s)-1));
Delete(s,1,Pos(' ',s));
end;
Procedure GetCoord;
var
List:TStringList;
b:integer;
begin
List:=TStringList.Create;
List.LoadFromFile('D:\UO\Zulu Hotel Europe\!ZHE_Stealth\minocTiles.txt');//тут прописывается путь к файлу с тайлами)
for b := 0 to List.Count-1 do
GetMiningTiles(List.strings[b],b);
ItemCount:=b;
end;
Procedure autoloops;
begin
UoSay('.autoloop 5')//меняем значение сколько копает раз)))
wait(1000)
end;
procedure checkcoord;
begin
CheckSave;
checkdead;
if (GetZ(self) = onboadz) then
begin
repeat
UseObject(Trap);
wait(500);
Raw_Move(6, True);
Raw_Move(6, True);
wait(500);
until (GetZ(self) <> onboadz);
AddToSystemJournal('Сошел на берег успешно!');
NewMoveXY(point1X,point1Y, True, 0, True);
if (GetX(self) = point1X) then
begin
NewMoveXY(point2X,point2Y, True, 0, True);
// if (GetX(self) = point2X) then
// begin
// NewMoveXY(point3X,point3Y, True, 0, True);
// end;
end;
end;
end;
procedure CheckCooper;
begin
FindType(CopperType, Backpack);
if (FindFullQuantity < 10) then
begin
FindTypeEx(CopperType,$0602,Ground,true);
MoveItem(finditem, 25, backpack, 0,0,0);
wait(1000);
end;
end;
Procedure make_item;
Begin
CancelMenu;
WaitMenu('What', 'Deadly Tools');
WaitMenu('make', 'Pickaxe');
if TargetPresent then CancelTarget;
WaitTargetType(CopperType);
usetype(Tinktype,$ffff);
end;
procedure CheckPick;
begin
CheckSave;
checkdead;
CheckCooper;
if (Count(PickType) < 1) then
begin
repeat
ClearJournal;
make_item;
WaitGump(PickGump);
WaitTargetobject(findtype(CopperType, ground));
UseObject(FindType(TinkType, ground));
WaitJournalLine(Now, 'You create|destroy|You put', 30000);
wait(500);
until (Count(PickType) >= 1);
end;
end;
procedure DropOre;
var g : integer;
OreCol : Array [0..17] of Word;
Begin
finddistance := 3;
CheckSave;
AddToSystemJournal('Сбрасываем руду');
oreCol[0] := $0602; // Copper Ore
oreCol[1] := $0000; // Iron Ore
oreCol[2] := $0482; // Steel Ore
oreCol[3] := $045E; // Anra Ore
oreCol[4] := $07D6; // Valurite Ore
oreCol[5] := $0852; // Old Britain Ore
oreCol[6] := $04EA; // Lavarock Ore
oreCol[7] := $04AB; // Black Dwarf Ore
oreCol[8] := $07F8; // Spectral Ore
oreCol[9] := $0948; // Shadow Ore
oreCol[10] := $095F; // Azurite Ore
oreCol[11] := $0A09; // Icerock Ore
oreCol[12] := $094C; // Doom Ore
oreCol[13] := $0A3D; // Blue Steel Ore
oreCol[14] := $04B0; // Dark Ruby Ore
oreCol[15] := $0487; // Crystallite Ore
oreCol[16] := $094F; // Onyx Ore
oreCol[17] := $0947; // Mithril Ore
for g := 0 to 17 do
begin
CheckSave;
FindTypeEx(CopperType,oreCol[g],backpack,true);
if FindCount > 0 then
begin
stack(CopperType,oreCol[g]);
wait(1000);
end;
end;
hungry (1,ground);
wait(500);
Addtosystemjournal('=========================================');
FindType(CopperType,ground);
Addtosystemjournal('Всего металла на лодке - '+intToStr(findfullquantity));
FindTypeEx(CopperType,$0602,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Copper Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0000,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Iron Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0482,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Steel Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$045E,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Anra Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$07D6,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Valurite Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0852,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Old Britain Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$04EA,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Lavarock Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$04AB,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Black Dwarf Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$07F8,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Spectral Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0948,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Shadow Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$095F,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Azurite Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0A09,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Icerock Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$094C,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Doom Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0A3D,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Blue Steel Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$04B0,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Dark Ruby Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0487,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Crystallite Ore - '+intToStr(findfullquantity));
end;
if FindCount > 0 then
begin
Addtosystemjournal('Onyx Ore - '+intToStr(findfullquantity));
end;
FindTypeEx(CopperType,$0947,ground,False);
if FindCount > 0 then
begin
Addtosystemjournal('Mithril Ore - '+intToStr(findfullquantity));
end;
FindType(TinkType,ground);
Addtosystemjournal('Тулзов на лодке - '+intToStr(findfullquantity));
FindType(eda,ground);
Addtosystemjournal('Еды осталось - '+intToStr(findfullquantity));
Addtosystemjournal('=========================================');
End;
Procedure gen;
begin
UoSay('.autoloop 5')//не меняем,иначе кирок сделает до утра;-)
wait(1000)
end;
procedure smelting;
begin
if (Count(OreType) <> 0) then
begin
repeat
WaitTargetObject(Forge);
UseObject(FindType(OreType,Backpack));
WaitJournalLine(Now, 'You create|destroy', 10000);
wait(500);
until (Count(OreType) = 0);
gen;
end;
end;
procedure GotoOnBoad;
begin
CheckSave;
checkdead;
NewMoveXY(pointX,pointY,true,0,True);
smelting;
NewMoveXY(point1X,point1Y, True, 0, True);
NewMoveXY(point2X,point2Y, True, 0, True);
NewMoveXY(nearX,nearY, True, 0, True);
wait(500);
repeat
UseObject(Trap);
wait(1000);
until (GetX(self) = OnBoadX) and (GetY(self) = OnBoadY);
wait(500);
Hungry(1,ground);
DropOre;
CheckPick;
checkcoord;
end;
procedure checktools;
begin
FindType(PickType, Backpack);
if (FindCount < 1) then
begin
GotoOnBoad;
end;
end;
procedure CheckEquip;
Var EquipPick : Cardinal;
begin
if (GetType(ObjAtLayer(RhandLayer)) <> PickType) then
begin
Disarm;
wait(500);
checktools;
FindType(PickType, Backpack);
EquipPick := finditem;
Equip(RhandLayer, EquipPick);
end;
end;
function Mining(tile:Word;x,y,z:Integer):boolean;
begin
CheckSave;
checkdead;
WaitTargetTile(tile,x,y,z);
UseObject(ObjAtLayer(RhandLayer));
WaitJournalLine(Now, 'no more ore|You must be near a forge!|broke|stop mining|cannot see|far away|cannot mine|what is this?!', 30000);
checktools;
end;
procedure checkweight;
begin
if (Weight > waightlimit) then
begin
GotoOnBoad;
end;
end;
Begin
SetArStatus(true);
checkdead;
getcoord;
autoloops;
ClearJournal;
AddToSystemJournal('Скрипт успешно стартовал.');
While (not Dead) do
begin
for b :=0 to 1855 do //если хотите чтобы ваш скрипт не останавливался пишите количество ваших тайлов
begin
CheckSave;
CheckDead;
CheckCoord;
CheckWeight;
NewMoveXY(MiningP[b].px,MiningP[b].py, True, 1, True);
Addtosystemjournal('Tile number '+intToStr(b)+'!');
CheckEquip;
Mining(MiningP[b].tile,MiningP[b].px,MiningP[b].py,MiningP[b].pz);
Wait(500);
end;
end;
End.
Системный журнал
Code: Select all
22:32:28:098 [Craft]: Compiling
22:32:28:108 [Craft]: Compiler: [Error] (mining2.sc at 38:4): "end" expected but "wait" found ;
Error line is: " Delete(s,1,Pos(' ',s)); "
22:32:28:113 [Craft]: Compiling failed
22:32:28:113 [Craft]: Script mining2.sc stopped successfuly
Первый раз с таким сталкиваюсь, не понимаю в чем проблема и как ее лечить. Прошу вашей помощи.
С уважением.