Настройка скрипта
BulkSource=$4026A6A9; // ID книги (Bulk Order Books) с пустыми бодами.
BulkDestination=$400B6822; // ID книги в которую слаживать готовые боды
SalvageBag=$40301995; // Мешочек для переработки вещей в ткань или кожу. Продаётся у провизионера. Также в паке должны лежать ножницы.
Restock=$40087344; // Контейнер в банке в котором лежат ресурсы (ткань, кожа, металл).
BODType=$2258; // Тип бода.
TailorToolsType=$0F9D; // Тип тейлор тулзы.
TinkerToolsType=$1EB8; // Тип тинкер тулзы.
IngotsType=$1BF2; // Тип металла.
IngotsCount=80; // Количество металла которое должно быть в паке
IngotsColor=$0000; // Цвет металла.
TKNumFirst=8; // Кнопка отвечающая за пункт Tools в меню тинкера.
TKNumSecond=23; // Кнопка которая делает тинкер тулзу.
TKTailorNumSecond=44; // Кнопка которая делает тейлор тулзу.
WaitTime=500; // Время задержки.
WaitLag=10000; // Время паузы при лаге.
WaitCycles=7; // Количество циклов.
BulkDestination=$400B6822; // ID книги в которую слаживать готовые боды
SalvageBag=$40301995; // Мешочек для переработки вещей в ткань или кожу. Продаётся у провизионера. Также в паке должны лежать ножницы.
Restock=$40087344; // Контейнер в банке в котором лежат ресурсы (ткань, кожа, металл).
BODType=$2258; // Тип бода.
TailorToolsType=$0F9D; // Тип тейлор тулзы.
TinkerToolsType=$1EB8; // Тип тинкер тулзы.
IngotsType=$1BF2; // Тип металла.
IngotsCount=80; // Количество металла которое должно быть в паке
IngotsColor=$0000; // Цвет металла.
TKNumFirst=8; // Кнопка отвечающая за пункт Tools в меню тинкера.
TKNumSecond=23; // Кнопка которая делает тинкер тулзу.
TKTailorNumSecond=44; // Кнопка которая делает тейлор тулзу.
WaitTime=500; // Время задержки.
WaitLag=10000; // Время паузы при лаге.
WaitCycles=7; // Количество циклов.
Small_Bods_Filler
Code: Select all
Program Small_Bods_Filler;
{
Autor: Half-Life;
Description: Скрипт для заполнения мелких тейлор бодов для RunUO. Сделан под банк (ресурсы он берёт из контейнера в банке). Делает боды из ткани и кожи (обычной или цветной). Есть проверка на ексеп. Не делает армор из костей.
UOStealthClientVersion: 6.2.1;
Warning! Будьте бдительны! - Администрация многих игровых серверов враждебно относится к использованию стелс клиента на своих серверах. Заподозрив вас в использовании стелс клиента и других неправославных программ они начинают сатанеть и в порыве слепой ярости могут попасть по вам Банхаммером;
}
const
BulkSource=$4026A6A9;
BulkDestination=$400B6822;
SalvageBag=$40301995;
Restock=$40087344;
BODType=$2258;
TailorToolsType=$0F9D;
TinkerToolsType=$1EB8;
IngotsType=$1BF2;
IngotsCount=80;
IngotsColor=$0000;
TKNumFirst=8;
TKNumSecond=23;
TKTailorNumSecond=44;
WaitTime=500;
WaitLag=10000;
WaitCycles=7;
var
ResourseTypes,LeatherColors:array of Word;
Exceptional,Leather,Spined,Horned,Barbed:Boolean;
Amount,Count,i:Byte;
BOD,ItemType,TailorTool,TinkerTool:Cardinal;
Item:String;
NumF,NumS:Integer;
Hats,Shirts:array[1..13] of array[0..2] of word;
Pants:array[1..4] of array[0..2] of word;
Miscellaneous:array[1..3] of array[0..2] of word;
Footwear:array[1..2] of array[0..2] of word;
LeatherArmor,FemaleArmor:array[1..6] of array[0..2] of word;
StuddedArmor:array[1..5] of array[0..2] of word;
procedure CheckBOD;
var
Text:String;
gumpInfo:TGumpInfo;
i:Byte;
begin
if Dead or not Connected then Exit;
Text:=GetCliloc(BulkSource);
AddToSystemJournal(Text);
if Pos('Deeds in book: 0',Text)>1 then begin
AddToSystemJournal('Закончились боды');
Halt;
end;
UseObject(BulkSource);
Wait(WaitTime);
CheckLag(WaitLag);
If GetGumpID(GetGumpsCount-1)<>$54F555DF then begin
CheckBOD;
end
else begin
GetGumpInfo(GetGumpsCount-1, gumpInfo);
end;
i:=length(gumpInfo.XmfHTMLGumpColor);
if i=12 then begin
while IsGump do CloseSimpleGump(GetGumpsCount-1);
AddToSystemJournal('Закончились боды');
Halt;
end;
end;
procedure SearchBOD;
begin
if Dead or not Connected then Exit;
FindType(BODType, backpack);
if (finditem<>0) then
begin
BOD:=FindItem;
end
else begin
CheckBOD;
UseObject(BulkSource);
Wait(250);
CheckLag(WaitLag);
If GetGumpID(GetGumpsCount-1)<>$54F555DF then SearchBOD;
Waitgump('5');
Wait(500);
while IsGump do CloseSimpleGump(GetGumpsCount-1);
FindType(BODType, backpack);
BOD:=FindItem;
end;
end;
procedure DropResourse(Resourse:Word);
begin
if Dead or not Connected then Exit;
FindType(Resourse, backpack);
if (FindQuantity > 1) then begin
MoveItem(FindItem,FindFullQuantity,Restock,0,0,0);
CheckLag(WaitLag);
end;
end;
procedure SalvageItems;
var
i:Byte;
begin
if Dead or not Connected then Exit;
while IsGump do CloseSimpleGump(GetGumpsCount-1);
FindType(ItemType, backpack);
While FindCount <> 0 do begin
while IsGump do CloseSimpleGump(GetGumpsCount-1);
MoveItem(finditem,1,SalvageBag,0,0,0);
Wait(WaitTime);
CheckLag(WaitLag);
FindType(ItemType, backpack);
RequestContextMenu(SalvageBag);
SetContextMenuHook(SalvageBag, 1);
CheckLag(WaitLag);
end;
for i:=0 to Length(ResourseTypes)-1 do begin
DropResourse(ResourseTypes[i]);
end;
end;
procedure GetBODInfo;
var
GumpInfo:TGumpInfo;
Exep,Text:String;
CountOfString:Byte;
begin
if Dead or not Connected then Exit;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
UseObject(BOD);
Wait(WaitTime);
CheckLag(WaitLag);
If GetGumpID(GetGumpsCount-1)=$5AFBD742 then begin
GetGumpInfo(GetGumpsCount-1, gumpInfo);
Wait(WaitTime);
CheckLag(WaitLag);
CountOfString:=Length(gumpInfo.XmfHTMLGumpColor);
Amount:=StrToInt(gumpInfo.Text[gumpInfo.GumpText[0].text_id]);
Count:=StrToInt(gumpInfo.Text[gumpInfo.GumpText[1].text_id]);
Amount:=Amount-Count;
Item:=GetClilocById(gumpInfo.XmfHTMLGumpColor[4].Cliloc_id);
if (Amount=0) then begin
MoveItem(BOD,1,BulkDestination,0,0,0);
Wait(WaitTime);
CheckLag(WaitLag);
while IsGump do CloseSimpleGump(GetGumpsCount-1);
AddToSystemJournal('Бод '+Item+' выполнен');
SalvageItems;
SearchBOD;
end;
AddToSystemJournal('Надо сделать '+IntToStr(Amount)+' '+Item);
Exep:=GetClilocById(gumpInfo.XmfHTMLGumpColor[6].Cliloc_id);
If Exep='All items must be exceptional.' then Exceptional:=True;
if CountOfString>7 then begin
Text:=GetClilocById(gumpInfo.XmfHTMLGumpColor[7].Cliloc_id);
If Text='All items must be made with spined leather.' then Spined:=True;
If Text='All items must be made with horned leather.' then Horned:=True;
If Text='All items must be made with barbed leather.' then Barbed:=True;
end;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
Wait(500);
Exit;
end;
GetBODInfo;
end;
procedure GetItemInfo;
begin
if Dead or not Connected then Exit;
if Item = 'skullcap' then begin
ItemType:=Hats[1][0];
NumF:=Hats[1][1];
NumS:=Hats[1][2];
Exit;
end;
if Item = 'bandana' then begin
ItemType:=Hats[2][0];
NumF:=Hats[2][1];
NumS:=Hats[2][2];
Exit;
end;
if Item = 'floppy hat' then begin
ItemType:=Hats[3][0];
NumF:=Hats[3][1];
NumS:=Hats[3][2];
Exit;
end;
if Item = 'cap' then begin
ItemType:=Hats[4][0];
NumF:=Hats[4][1];
NumS:=Hats[4][2];
Exit;
end;
if Item = 'wide-brim hat' then begin
ItemType:=Hats[5][0];
NumF:=Hats[5][1];
NumS:=Hats[5][2];
Exit;
end;
if Item = 'straw hat' then begin
ItemType:=Hats[6][0];
NumF:=Hats[6][1];
NumS:=Hats[6][2];
Exit;
end;
if Item = 'tall straw hat' then begin
ItemType:=Hats[7][0];
NumF:=Hats[7][1];
NumS:=Hats[7][2];
Exit;
end;
if Item = 'wizard''s hat' then begin
ItemType:=Hats[8][0];
NumF:=Hats[8][1];
NumS:=Hats[8][2];
Exit;
end;
if Item = 'bonnet' then begin
ItemType:=Hats[9][0];
NumF:=Hats[9][1];
NumS:=Hats[9][2];
Exit;
end;
if Item = 'feathered hat' then begin
ItemType:=Hats[10][0];
NumF:=Hats[10][1];
NumS:=Hats[10][2];
Exit;
end;
if Item = 'tricorne hat' then begin
ItemType:=Hats[11][0];
NumF:=Hats[11][1];
NumS:=Hats[11][2];
Exit;
end;
if Item = 'jester hat' then begin
ItemType:=Hats[12][0];
NumF:=Hats[12][1];
NumS:=Hats[12][2];
Exit;
end;
if Item = 'flower garland' then begin
ItemType:=Hats[13][0];
NumF:=Hats[13][1];
NumS:=Hats[13][2];
Exit;
end;
if Item = 'doublet' then begin
ItemType:=Shirts[1][0];
NumF:=Shirts[1][1];
NumS:=Shirts[1][2];
Exit;
end;
if Item = 'shirt' then begin
ItemType:=Shirts[2][0];
NumF:=Shirts[2][1];
NumS:=Shirts[2][2];
Exit;
end;
if Item = 'fancy shirt' then begin
ItemType:=Shirts[3][0];
NumF:=Shirts[3][1];
NumS:=Shirts[3][2];
Exit;
end;
if Item = 'tunic' then begin
ItemType:=Shirts[4][0];
NumF:=Shirts[4][1];
NumS:=Shirts[4][2];
Exit;
end;
if Item = 'surcoat' then begin
ItemType:=Shirts[5][0];
NumF:=Shirts[5][1];
NumS:=Shirts[5][2];
Exit;
end;
if Item = 'plain dress' then begin
ItemType:=Shirts[6][0];
NumF:=Shirts[6][1];
NumS:=Shirts[6][2];
Exit;
end;
if Item = 'fancy dress' then begin
ItemType:=Shirts[7][0];
NumF:=Shirts[7][1];
NumS:=Shirts[7][2];
Exit;
end;
if Item = 'cloak' then begin
ItemType:=Shirts[8][0];
NumF:=Shirts[8][1];
NumS:=Shirts[8][2];
Exit;
end;
if Item = 'robe' then begin
ItemType:=Shirts[9][0];
NumF:=Shirts[9][1];
NumS:=Shirts[9][2];
Exit;
end;
if Item = 'jester suit' then begin
ItemType:=Shirts[10][0];
NumF:=Shirts[10][1];
NumS:=Shirts[10][2];
Exit;
end;
if Item = 'fur cape' then begin
ItemType:=Shirts[11][0];
NumF:=Shirts[11][1];
NumS:=Shirts[11][2];
Exit;
end;
if Item = 'gilded dress' then begin
ItemType:=Shirts[12][0];
NumF:=Shirts[12][1];
NumS:=Shirts[12][2];
Exit;
end;
if Item = 'formal shirt' then begin
ItemType:=Shirts[13][0];
NumF:=Shirts[13][1];
NumS:=Shirts[13][2];
Exit;
end;
if Item = 'short pants' then begin
ItemType:=Pants[1][0];
NumF:=Pants[1][1];
NumS:=Pants[1][2];
Exit;
end;
if Item = 'long pants' then begin
ItemType:=Pants[2][0];
NumF:=Pants[2][1];
NumS:=Pants[2][2];
Exit;
end;
if Item = 'kilt' then begin
ItemType:=Pants[3][0];
NumF:=Pants[3][1];
NumS:=Pants[3][2];
Exit;
end;
if Item = 'skirt' then begin
ItemType:=Pants[4][0];
NumF:=Pants[4][1];
NumS:=Pants[4][2];
Exit;
end;
if Item = 'body sash' then begin
ItemType:=Miscellaneous[1][0];
NumF:=Miscellaneous[1][1];
NumS:=Miscellaneous[1][2];
Exit;
end;
if Item = 'half apron' then begin
ItemType:=Miscellaneous[2][0];
NumF:=Miscellaneous[2][1];
NumS:=Miscellaneous[2][2];
Exit;
end;
if Item = 'full apron' then begin
ItemType:=Miscellaneous[3][0];
NumF:=Miscellaneous[3][1];
NumS:=Miscellaneous[3][2];
Exit;
end;
if Item = 'fur boots' then begin
ItemType:=Footwear[1][0];
NumF:=Footwear[1][1];
NumS:=Footwear[1][2];
Exit;
end;
if Item = 'thigh boots' then begin
ItemType:=Footwear[2][0];
NumF:=Footwear[2][1];
NumS:=Footwear[2][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather gorget' then begin
ItemType:=LeatherArmor[1][0];
NumF:=LeatherArmor[1][1];
NumS:=LeatherArmor[1][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather cap' then begin
ItemType:=LeatherArmor[2][0];
NumF:=LeatherArmor[2][1];
NumS:=LeatherArmor[2][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather gloves' then begin
ItemType:=LeatherArmor[3][0];
NumF:=LeatherArmor[3][1];
NumS:=LeatherArmor[3][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather sleeves' then begin
ItemType:=LeatherArmor[4][0];
NumF:=LeatherArmor[4][1];
NumS:=LeatherArmor[4][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather leggings' then begin
ItemType:=LeatherArmor[5][0];
NumF:=LeatherArmor[5][1];
NumS:=LeatherArmor[5][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather tunic' then begin
ItemType:=LeatherArmor[6][0];
NumF:=LeatherArmor[6][1];
NumS:=LeatherArmor[6][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'studded gorget' then begin
ItemType:=StuddedArmor[1][0];
NumF:=StuddedArmor[1][1];
NumS:=StuddedArmor[1][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'studded gloves' then begin
ItemType:=StuddedArmor[2][0];
NumF:=StuddedArmor[2][1];
NumS:=StuddedArmor[2][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'studded sleeves' then begin
ItemType:=StuddedArmor[3][0];
NumF:=StuddedArmor[3][1];
NumS:=StuddedArmor[3][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'studded leggings' then begin
ItemType:=StuddedArmor[4][0];
NumF:=StuddedArmor[4][1];
NumS:=StuddedArmor[4][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'studded tunic' then begin
ItemType:=StuddedArmor[5][0];
NumF:=StuddedArmor[5][1];
NumS:=StuddedArmor[5][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather shorts' then begin
ItemType:=FemaleaRmor[1][0];
NumF:=FemaleaRmor[1][1];
NumS:=FemaleaRmor[1][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather skirt' then begin
ItemType:=FemaleaRmor[2][0];
NumF:=FemaleaRmor[2][1];
NumS:=FemaleaRmor[2][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'leather bustier' then begin
ItemType:=FemaleaRmor[3][0];
NumF:=FemaleaRmor[3][1];
NumS:=FemaleaRmor[3][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'studded bustier' then begin
ItemType:=FemaleaRmor[4][0];
NumF:=FemaleaRmor[4][1];
NumS:=FemaleaRmor[4][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'female leather armor' then begin
ItemType:=FemaleaRmor[5][0];
NumF:=FemaleaRmor[5][1];
NumS:=FemaleaRmor[5][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
if Item = 'studded armor' then begin
ItemType:=FemaleaRmor[6][0];
NumF:=FemaleaRmor[6][1];
NumS:=FemaleaRmor[6][2];
if not (Spined or Horned or Barbed) then Leather:=True;
Exit;
end;
end;
procedure Combine;
var
StartTime:TDateTime;
begin
if Dead or not Connected then Exit;
ClearJournal;
StartTime:=Now;
FindType(ItemType, backpack);
if FindCount <> 0 then begin
If TargetPresent then CancelTarget;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
UseObject(BOD);
Wait(WaitTime);
CheckLag(WaitLag);
If GetGumpID(GetGumpsCount-1)<>$5AFBD742 then Combine;
Waitgump('2');
While InJournalBetweenTimes('The maximum amount of', StartTime, Now) < 0 do begin
FindType(ItemType, backpack);
If GetGumpID(GetGumpsCount-1)<>$5AFBD742 then begin
While IsGump do CloseSimpleGump(GetGumpsCount-1);
UseObject(BOD);
end;
if not TargetPresent then Waitgump('2');
WaitTargetObject(finditem);
Wait(100);
FindType(ItemType, backpack);
end;
if TargetPresent then CancelTarget;
Wait(250);
end;
while IsGump do CloseSimpleGump(GetGumpsCount-1);
Wait(250);
MoveItem(BOD,1,BulkDestination,0,0,0);
Wait(WaitTime);
CheckLag(WaitLag);
while IsGump do CloseSimpleGump(GetGumpsCount-1);
AddToSystemJournal('Бод '+Item+' выполнен');
end;
procedure GiveResourse;
var
Color:Word;
Name:String;
begin
if Dead or not Connected then Exit;
if not (Leather or Spined or Horned or Barbed) then begin
FindType(ResourseTypes[1], Restock);
if (FindFullQuantity>500) then begin
Grab(FindItem,500);
Wait(WaitTime);
FindType(ResourseTypes[1], backpack);
if FindFullQuantity < 500 then begin
FindType(ResourseTypes[1], Restock);
Grab(FindItem,500);
Wait(WaitTime);
end;
Exit;
end;
FindType(ResourseTypes[0], Restock);
if (FindFullQuantity>500) then begin
Grab(FindItem,500);
Wait(WaitTime);
FindType(ResourseTypes[1], backpack);
if FindFullQuantity < 500 then begin
FindType(ResourseTypes[1], Restock);
Grab(FindItem,500);
Wait(WaitTime);
end;
Exit;
end
else begin
AddToSystemJournal('Закончилась ткань.');
Halt;
end;
end;
if Leather then begin
Color:=LeatherColors[0];
Name:='Leather';
end;
if Spined then begin
Color:=LeatherColors[1];
Name:='Spined';
end;
if Horned then begin
Color:=LeatherColors[2];
Name:='Horned';
end;
if Barbed then begin
Color:=LeatherColors[3];
Name:='Barbed';
end;
FindTypeEx(ResourseTypes[2],Color,Restock,false);
if (FindFullQuantity>300) then begin
Grab(FindItem,300);
Wait(WaitTime);
Exit;
end
else begin
AddToSystemJournal('Закончилась '+Name+' кожа');
Halt;
end;
end;
procedure CheckIngots;
var
Count:Integer;
begin
if Dead or not Connected then Exit;
FindTypeEx(IngotsType, IngotsColor, Backpack, false);
Count:=FindQuantity;
if Count<IngotsCount then begin
wait(1500);
FindTypeEx(IngotsType, IngotsColor, Restock, false);
Grab(FindItem, IngotsCount-Count);
end;
end;
function CheckTailorTool:Boolean;
begin
if Dead or not Connected then Exit;
CheckLag(WaitLag);
FindType(TailorToolsType, Backpack);
TailorTool:=FindItem;
Result:=FindCount > 0;
end;
function CheckTinkerTool:Boolean;
begin
if Dead or not Connected then Exit;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
CheckLag(WaitLag);
FindType(TinkerToolsType, Backpack);
TinkerTool:=FindItem;
Result:=FindCount > 1;
end;
procedure CreateTKTools;
begin
CheckIngots;
while not CheckTinkerTool do begin
If not IsGump then UseObject(TinkerTool);
WaitGump(INtToStr(TKNumSecond));
Wait(1000);
end;
end;
function CreateTailorTools: Boolean;
begin
if Dead or not Connected then Exit;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
if not CheckTinkerTool then begin
CreateTKTools;
end;
CheckIngots;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
UseObject(TinkerTool);
Wait(WaitTime);
WaitGump(IntToStr(TKNumFirst));
Wait(WaitTime);
CheckLag(WaitLag);
while not CheckTailorTool do begin
if Dead or not Connected then Exit;
If not IsGump then begin
UseObject(TinkerTool);
Wait(WaitTime);
Continue;
end;
WaitGump(IntToStr(TKTailorNumSecond));
Wait(1000);
end;
CloseSimpleGump(GetGumpsCount-1);
Result:=CheckTailorTool;
end;
procedure CheckExep;
var
Text:String;
begin
if Dead or not Connected then Exit;
FindType(ItemType, Backpack);
while FindCount>0 do begin
if Dead or not Connected then Exit;
Text:=AnsiLowerCase(GetCliloc(FindItem));
CheckLag(WaitLag);
if Text='' then Continue;
if Pos('exceptional',Text)<1 then begin
MoveItem(finditem,1,SalvageBag,0,0,0);
Wait(WaitTime*2);
RequestContextMenu(SalvageBag);
SetContextMenuHook(SalvageBag, 1);
Wait(WaitTime);
CheckLag(WaitLag);
end;
Ignore(finditem);
FindType(ItemType, Backpack);
end;
IgnoreReset;
end;
procedure ChooseLeather;
begin
if Dead or not Connected then Exit;
If Leather then begin
WaitGump('7');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
WaitGump('6');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
end;
If Spined then begin
WaitGump('7');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
WaitGump('13');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
end;
If Horned then begin
WaitGump('7');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
WaitGump('20');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
end;
If Barbed then begin
WaitGump('7');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
WaitGump('27');
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then Wait(WaitTime);
end;
end;
procedure CraftItem;
var
Res: Boolean;
i:Byte;
begin
if Dead or not Connected then Exit;
AddToSystemJournal('Начинаю делать бод '+Item+' надо сделать '+IntToStr(Amount)+' вещей');
FindType(ItemType, Backpack);
if FindCount >= Amount then begin
for i:=0 to Length(ResourseTypes)-1 do begin
DropResourse(ResourseTypes[i]);
end;
Exit;
end;
while not CheckTailorTool do begin
CreateTailorTools;
end;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
UseObject(TailorTool);
Wait(WaitTime);
CheckLag(WaitLag);
If not IsGump or (GetGumpID(GetGumpsCount-1)<>$38920ABD) then CraftItem;
ChooseLeather;
Wait(WaitTime);
CheckLag(WaitLag);
WaitGump(IntToStr(NumF));
while not Res do begin
if Dead or not Connected then Exit;
If not IsGump then UseObject(TailorTool);
WaitGump(IntToStr(NumS));
Wait(1500);
CheckLag(WaitLag);
while not CheckTailorTool do begin
CreateTailorTools;
Wait(WaitTime);
UseObject(FindItem);
end;
if Exceptional then CheckExep;
FindType(ItemType, Backpack);
AddToSystemJournal('Сделано '+IntToStr(FindCount)+' вещей из '+IntToStr(Amount));
if FindCount >= Amount then Res:=True;
end;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
Wait(100);
for i:=0 to Length(ResourseTypes)-1 do begin
DropResourse(ResourseTypes[i]);
end;
end;
procedure CheckConnect;
var
StartTime:TDateTime;
begin
if Connected then Exit;
while not Connected do begin
Connect();
Wait(10000);
end;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
StartTime:=Now;
UOSay('bank');
Wait(WaitTime*2);
CheckLag(WaitLag);
if (InJournalBetweenTimes('Bank container has',StartTime,Now)=-1) then CheckConnect;
UseObject(Restock);
Wait(WaitTime);
CheckLag(WaitLag);
end;
procedure SetBooleanFalse;
begin
if Dead or not Connected then Exit;
Exceptional:=False;
Leather:=False;
Spined:=False;
Horned:=False;
Barbed:=False;
end;
begin
CheckConnect;
UOSay('bank');
Wait(WaitTime*2);
CheckLag(WaitLag);
UseObject(Restock);
Wait(WaitTime);
CheckLag(WaitLag);
ResourseTypes:=[$1766,$1767,$1081];
LeatherColors:=[$0000,$08AC,$0845,$0851];
for i:=0 to Length(ResourseTypes)-1 do begin
DropResourse(ResourseTypes[i]);
end;
Hats[1][0]:=$1544;Hats[1][1]:=1;Hats[1][2]:=2;
Hats[2][0]:=$1540;Hats[2][1]:=1;Hats[2][2]:=9;
Hats[3][0]:=$1713;Hats[3][1]:=1;Hats[3][2]:=16;
Hats[4][0]:=$1715;Hats[4][1]:=1;Hats[4][2]:=23;
Hats[5][0]:=$1714;Hats[5][1]:=1;Hats[5][2]:=30;
Hats[6][0]:=$1717;Hats[6][1]:=1;Hats[6][2]:=37;
Hats[7][0]:=$1716;Hats[7][1]:=1;Hats[7][2]:=44;
Hats[8][0]:=$1718;Hats[8][1]:=1;Hats[8][2]:=51;
Hats[9][0]:=$1719;Hats[9][1]:=1;Hats[9][2]:=58;
Hats[10][0]:=$171A;Hats[10][1]:=1;Hats[10][2]:=65;
Hats[11][0]:=$171B;Hats[11][1]:=1;Hats[11][2]:=72;
Hats[12][0]:=$171C;Hats[12][1]:=1;Hats[12][2]:=79;
Hats[13][0]:=$2306;Hats[13][1]:=1;Hats[13][2]:=86;
Shirts[1][0]:=$1F7B;Shirts[1][1]:=8;Shirts[1][2]:=2;
Shirts[2][0]:=$1517;Shirts[2][1]:=8;Shirts[2][2]:=9;
Shirts[3][0]:=$1EFD;Shirts[3][1]:=8;Shirts[3][2]:=16;
Shirts[4][0]:=$1FA1;Shirts[4][1]:=8;Shirts[4][2]:=23;
Shirts[5][0]:=$1FFD;Shirts[5][1]:=8;Shirts[5][2]:=30;
Shirts[6][0]:=$1F01;Shirts[6][1]:=8;Shirts[6][2]:=37;
Shirts[7][0]:=$1F00;Shirts[7][1]:=8;Shirts[7][2]:=44;
Shirts[8][0]:=$1515;Shirts[8][1]:=8;Shirts[8][2]:=51;
Shirts[9][0]:=$1F03;Shirts[9][1]:=8;Shirts[9][2]:=58;
Shirts[10][0]:=$1F9F;Shirts[10][1]:=8;Shirts[10][2]:=65;
Shirts[11][0]:=$230A;Shirts[11][1]:=8;Shirts[11][2]:=72;
Shirts[12][0]:=$230E;Shirts[12][1]:=8;Shirts[12][2]:=79;
Shirts[13][0]:=$2310;Shirts[13][1]:=8;Shirts[13][2]:=86;
Pants[1][0]:=$152E;Pants[1][1]:=15;Pants[1][2]:=2;
Pants[2][0]:=$1539;Pants[2][1]:=15;Pants[2][2]:=9;
Pants[3][0]:=$1537;Pants[3][1]:=15;Pants[3][2]:=16;
Pants[4][0]:=$1516;Pants[4][1]:=15;Pants[4][2]:=23;
Miscellaneous[1][0]:=$1541;Miscellaneous[1][1]:=22;Miscellaneous[1][2]:=2;
Miscellaneous[2][0]:=$153B;Miscellaneous[2][1]:=22;Miscellaneous[2][2]:=9;
Miscellaneous[3][0]:=$153D;Miscellaneous[3][1]:=22;Miscellaneous[3][2]:=16;
Footwear[1][0]:=$2307;Footwear[1][1]:=29;Footwear[1][2]:=2;
Footwear[2][0]:=$1711;Footwear[2][1]:=29;Footwear[2][2]:=44;
LeatherArmor[1][0]:=$13C7;LeatherArmor[1][1]:=36;LeatherArmor[1][2]:=23;
LeatherArmor[2][0]:=$1DB9;LeatherArmor[2][1]:=36;LeatherArmor[2][2]:=30;
LeatherArmor[3][0]:=$13C6;LeatherArmor[3][1]:=36;LeatherArmor[3][2]:=37;
LeatherArmor[4][0]:=$13CD;LeatherArmor[4][1]:=36;LeatherArmor[4][2]:=44;
LeatherArmor[5][0]:=$13CB;LeatherArmor[5][1]:=36;LeatherArmor[5][2]:=51;
LeatherArmor[6][0]:=$13CC;LeatherArmor[6][1]:=36;LeatherArmor[6][2]:=58;
StuddedArmor[1][0]:=$13D6;StuddedArmor[1][1]:=43;StuddedArmor[1][2]:=2;
StuddedArmor[2][0]:=$13D5;StuddedArmor[2][1]:=43;StuddedArmor[2][2]:=9;
StuddedArmor[3][0]:=$13DC;StuddedArmor[3][1]:=43;StuddedArmor[3][2]:=16;
StuddedArmor[4][0]:=$13DA;StuddedArmor[4][1]:=43;StuddedArmor[4][2]:=23;
StuddedArmor[5][0]:=$13DB;StuddedArmor[5][1]:=43;StuddedArmor[5][2]:=30;
FemaleArmor[1][0]:=$1C00;FemaleArmor[1][1]:=50;FemaleArmor[1][2]:=2;
FemaleArmor[2][0]:=$1C08;FemaleArmor[2][1]:=50;FemaleArmor[2][2]:=9;
FemaleArmor[3][0]:=$1C0A;FemaleArmor[3][1]:=50;FemaleArmor[3][2]:=16;
FemaleArmor[4][0]:=$1C0C;FemaleArmor[4][1]:=50;FemaleArmor[4][2]:=23;
FemaleArmor[5][0]:=$1C06;FemaleArmor[5][1]:=50;FemaleArmor[5][2]:=30;
FemaleArmor[6][0]:=$1C02;FemaleArmor[6][1]:=50;FemaleArmor[6][2]:=37;
while True do begin
if Dead then Halt;
CheckConnect;
SetBooleanFalse;
SearchBOD;
GetBODInfo;
GetItemInfo;
GiveResourse;
CraftItem;
Combine;
SalvageItems;
end;
end.