http://www.uobod.de/help/Help/1/The%20Project.htm
Скачиваем программу по ссылке выше.
Она предназначена для сортировки бодов+ еще много чего может. Полный список возможностей на второй ссылке.
Далее запускаем код который я написал ниже в стелсе, внимательно читаем текст который будет написан слева в клиенте с игрой. а именно: после запуска скрипта активируется таргет, им нужно по очереди указывать нужные вам книги с заказами, после того как вы укажите нужные книги нужно указать на сумку персонажа на папердоле. После этого скрипт начнет обработку всех бодов в выбранных книгах. После обработки книг с бодами в папке со стелсом создаются два файла SBod.txt и LBod.txt. их надо импортировать в программу uobod. File - import - textfile и по очереди укажите сначало SBod.txt затем LBod.txt, ну можно и наоборот. Главное их импортировать. все дальше все интуитивно понятно.
Это все для того чтобы отсортировать например 25 книг за с заказами и увидеть какие большие заказы можно собрать из маленьких в ваших книгах.
P.S. файлы SBod.txt и LBod.txt не удаляются , а дописываются. Так , что если хотите сканировать новый список вам надо вручную удалить их из папки со стелсом.
P.P.S. Stealth v6.+
Code: Select all
Program MyTestGump;
const
LineHeightConst = 32;
NameSBod = 'SBod.txt';
NameLBod = 'LBod.txt';
TypeBookOrder = $2259;
type TPart = record
Part1 :String;
Part2 :String;
Part3 :String;
Part4 :String;
Part5 :String;
Part6 :String;
end;
type TLBOD = record
BodType : String;
Material : String;
Quality : String;
Lbod : String;
Amount : String;
Part1 :String;
Amount1 : String;
Part2 :String;
Amount2 : String;
Part3 :String;
Amount3 : String;
Part4 :String;
Amount4 : String;
Part5 :String;
Amount5 : String;
Part6 :String;
Amount6 : String;
Price : String;
Book : String;
end;
type TSBOD = record
BodType : String;
Material : String;
Quality : String;
Lbod : String;
Part :String;
Amount : String;
Filled :String;
Toolmenu : String;
Price :String;
Book : String;
end;
type TBod = record
BodType : String;
DropButton_Return_Value :Integer;
Item : String;
Quality : String;
Material : String;
Amount : String;
Price : String;
end;
type TLargeBod = record
BodsCount : integer;
Bods : array of TBod;
end;
TBookElem = record
BodType : integer;
SmallBod : TBod;
LargeBod : TLargeBod;
end;
TBodBook = array of TBookElem;
TBooK = array of Cardinal;
var
i,p,y : Integer;
gi : TGumpInfo;
BodBook : TBodBook;
OLBOD : TLBOD;
OSBOD : TSBOD;
MPart : TPart;
ABooK:TBooK;
LBodTemp:string;
Function KolVoBod(BookA:Cardinal):integer;
var
aa : TClilocRec;
bb : TClilocItemRec;
begin
aa := GetToolTipRec(BookA);
bb := aa.Items[3];
result:=(strtoint(bb.Params[0]));
end;
Procedure TargetBook;
var
Book:Cardinal;
begin
ClientPrint('Укажите книгу с бодами.');
While true and not dead do
begin
ClientRequestObjectTarget;
WaitForClientTargetResponse(50000);
if ClientTargetResponsePresent then
Book := ClientTargetResponse.ID;
if Book = BackPack then
begin
ClientPrint('Приступаю к обработке бодов.');
break;
end
else
begin
if GetType(BooK) = TypeBookOrder then
begin
SetLength(ABooK,Length(ABooK) +1 );
ABooK[Length(ABooK)-1]:=Book
ClientPrint('Укажите еще книгу с заказами, или укажите BackPack на папердоле для обработки бодов');
end
else
ClientPrint('Вы не указали книгу с заказми');
end;
end;
end;
Procedure DefaultFindBoock(BookA:Cardinal);
var
a:integer;
j:Boolean;
b : TStringList;
begin
checklag(60000);
for i:=0 to GetGumpsCount-1 do
begin
GetGumpInfo(i, gi);
if (gi.GumpID = $029D) or (gi.GumpID = $029C) then
begin
checklag(60000);
CloseSimpleGump(i);
end;
end;
a := GetGumpsCount;
checklag(60000);
UseObject(BookA);
while a = GetGumpsCount do
Wait(50);
checklag(60000);
a := GetGumpsCount;
for i:=0 to GetGumpsCount-1 do
begin
checklag(60000);
GetGumpInfo(i, gi);
if (gi.GumpID = $029C) then
begin
checklag(60000);
NumGumpButton(i,1);
end;
end;
j:= true;
while j do
begin
for i:=0 to GetGumpsCount-1 do
begin
checklag(60000);
GetGumpInfo(i, gi);
if (gi.GumpID = $029D) then
begin
j:=false;
end
else
wait(50);
end;
end;
for i:=0 to GetGumpsCount-1 do
begin
if (GetGumpID(i) = $029D) then
begin
checklag(60000);
NumGumpButton(i,3);
end;
end;
wait(500);
for i:=0 to GetGumpsCount-1 do
begin
if (GetGumpID(i) = $029D) then
begin
checklag(60000);
NumGumpButton(i,0);
end;
end;
wait(2000);
checklag(60000);
end;
procedure InfoBod;
var
i,k,j : Integer;
GI: TGumpInfo;
CurrLineY : Word;
LargeBod : TLargeBod;
Bod : TBod;
FoundElem : Boolean ;
ClilocG : String;
begin
FoundElem:= False;
if (GetGumpsCount = 0) or (GetGumpID(GetGumpsCount-1) <> $29C) then
Exit;
GetGumpInfo(GetGumpsCount-1,GI);
if Length(GI.XmfHTMLGumpColor) > 0 then
for I := 0 to Length(GI.XmfHTMLGumpColor) - 1 do
begin
ClilocG:=GetClilocById(GI.XmfHTMLGumpColor[i].Cliloc_id);
if ClilocG = 'Drop' then //caption line
begin //title String. Incr it's Y to LineHeightConst and take 1st line
CurrLineY := GI.XmfHTMLGumpColor[i].y + LineHeightConst; //1st line
Break;
end;
end;
if CurrLineY = 0 then
Exit;
while True do
begin
Bod.DropButton_Return_Value := $FFFF;
for k := 0 to Length(GI.GumpButtons) - 1 do
for j:=0 to 35 do
if (GI.GumpButtons[k].y - 2 = CurrLineY) and (GI.GumpButtons[k].x =j ) then
begin
Bod.DropButton_Return_Value := GI.GumpButtons[k].return_value;
Break;
end;
FoundElem := False;
for k := 0 to Length(GI.XmfHTMLGumpColor) - 1 do
if GI.XmfHTMLGumpColor[k].y = CurrLineY then
begin
FoundElem := True;
case GI.XmfHTMLGumpColor[k].x of
40..65 : Bod.BodType := GetClilocByID(GI.XmfHTMLGumpColor[k].Cliloc_id);
66..105 : Bod.Item := GetClilocByID(GI.XmfHTMLGumpColor[k].Cliloc_id);
106..240: Bod.Quality := GetClilocByID(GI.XmfHTMLGumpColor[k].Cliloc_id);
241..320: Bod.Material := GetClilocByID(GI.XmfHTMLGumpColor[k].Cliloc_id);
else
FoundElem := False;
end;
if (LowerCase(GetClilocByID(GI.XmfHTMLGumpColor[k].Cliloc_id)) = 'previous page')
or (LowerCase(GetClilocByID(GI.XmfHTMLGumpColor[k].Cliloc_id)) = 'next page') then
FoundElem := False;
end;
if not FoundElem and (Bod.DropButton_Return_Value = $FFFF) then
Break; //Last Line, Exit;
for k := 0 to Length(GI.GumpText) - 1 do
if GI.GumpText[k].y = CurrLineY then
case GI.GumpText[k].x of
320..425 : Bod.Amount := GI.Text[GI.GumpText[k].text_id];
426..500 : Bod.Price := GI.Text[GI.GumpText[k].text_id];
end;
if Bod.BodType = 'Small' then
begin
if Length(LargeBod.Bods) > 0 then //Large Bod finished, adding it to Book
begin
SetLength(BodBook,Length(BodBook) +1 );
BodBook[Length(BodBook)-1].BodType := 1;
BodBook[Length(BodBook)-1].LargeBod := LargeBod;
SetLength(LargeBod.Bods,0);
LargeBod.BodsCount := 0;
end;
SetLength(BodBook,Length(BodBook) +1 );
BodBook[Length(BodBook)-1].BodType := 0;
BodBook[Length(BodBook)-1].SmallBod := Bod;
end
else
begin
if (Length(LargeBod.Bods) > 0) and (Bod.DropButton_Return_Value < $FFFF) then //Large Bod finished, adding it to Book
begin
SetLength(BodBook,Length(BodBook) +1 );
BodBook[Length(BodBook)-1].BodType := 1;
BodBook[Length(BodBook)-1].LargeBod := LargeBod;
SetLength(LargeBod.Bods,0);
LargeBod.BodsCount := 0;
end;
Inc(LargeBod.BodsCount);
SetLength(LargeBod.Bods,Length(LargeBod.Bods) +1 );
LargeBod.Bods[Length(LargeBod.Bods) - 1] := Bod;
end;
CurrLineY:=CurrLineY+ LineHeightConst;
end;
if (Length(LargeBod.Bods) > 0) then //Large Bod finished, adding it to Book
begin
SetLength(BodBook,Length(BodBook) +1 );
BodBook[Length(BodBook)-1].BodType := 1;
BodBook[Length(BodBook)-1].LargeBod := LargeBod;
end;
end;
function CheckName ( ItemName, CheckString : String) : Boolean;
begin
if BMSearch(1,LowerCase(ItemName),LowerCase(CheckString)) >0 then result:=true
else
result:=false;
end;
function FSizeBod(SizeBod:string):string;
begin
if LowerCase(SizeBod)='small' then
result:='SBod'
else
result:='LBod';
end;
function Material(ItemMaterial:string):string;
begin
if CheckName(ItemMaterial,'leather') then
begin
result:='Plain Leather';
exit;
end;
if CheckName(ItemMaterial,'spined') then
begin
result:='Spined Leather';
exit;
end;
if CheckName(ItemMaterial,'horned') then
begin
result:='Horned Leather';
exit;
end;
if CheckName(ItemMaterial,'barbed') then
begin
result:='Barbed Leather';
exit;
end;
if CheckName(ItemMaterial,'cloth') then
begin
result:='Cloth';
exit;
end;
if CheckName(ItemMaterial,'iron') then
begin
result:='Iron';
exit;
end;
if CheckName(ItemMaterial,'dull') then
begin
result:='Dull';
exit;
end;
if CheckName(ItemMaterial,'dull') then
begin
result:='Dull';
exit;
end;
if CheckName(ItemMaterial,'shadow') then
begin
result:='Shadow';
exit;
end;
if not CheckName(ItemMaterial,'dull') and CheckName(ItemMaterial,'copper') then
begin
result:='Copper';
exit;
end;
if CheckName(ItemMaterial,'bronze') then
begin
result:='Bronze';
exit;
end;
if CheckName(ItemMaterial,'gold') then
begin
result:='Gold';
exit;
end;
if CheckName(ItemMaterial,'agapite') then
begin
result:='Agapite';
exit;
end;
if CheckName(ItemMaterial,'verite') then
begin
result:='Verite';
exit;
end;
if CheckName(ItemMaterial,'valorite') then
begin
result:='Valorite';
exit;
end;
end;
function LBodConv(ItemName,ItemMaterial,SizeBod:string):string;
var
i : Integer;
SL : TStringList;
gbi_item1,gbi_item2:string;
begin
result:='';
SL := TStringList.Create;
StrBreakApart(ItemName, '|', SL);
if SL.Count > 0 then
begin
gbi_item1:=SL.Strings[0];
gbi_item2:=SL.Strings[1];
end;
SL.Free;
if (CheckName(gbi_item1,'female plate') or CheckName(gbi_item1,'bascinet') or CheckName(gbi_item1,'shield') or CheckName(gbi_item1,'buckler')) or (not CheckName(gbi_item1,'bone') and not CheckName(gbi_item1,'plate') and CheckName(gbi_item1,'helm'))then result:='';
if LowerCase(SizeBod) = LowerCase('sbod') then
begin
if (not CheckName(ItemMaterial,'leather')) and (not CheckName(ItemMaterial,'cloth')) then
begin
if (CheckName(gbi_item1,'cutlass') ) or (CheckName(gbi_item1,'katana') ) or (CheckName(gbi_item1,'scimitar') )or (CheckName(gbi_item1,'broad') )or (CheckName(gbi_item1,'longsword') )or (CheckName(gbi_item1,'viking') ) then
begin
result:='Swords';
end;
if CheckName(gbi_item1,'kryss') or CheckName(gbi_item1,'spear') or CheckName(gbi_item1,'war fork')or CheckName(gbi_item1,'dagger') then
begin
result:='Piercing';
end;
if CheckName(gbi_item1,'axe') then
begin
result:='Axes';
end;
if CheckName(gbi_item1,'mace') or CheckName(gbi_item1,'maul')or CheckName(gbi_item1,'hammer') then
begin
result:='Bashing';
end;
if CheckName(gbi_item1,'bard') or CheckName(gbi_item1,'halb')then
begin
result:='Polearms';
end;
if CheckName(gbi_item1,'chainmail')then
begin
result:='Chainmail';
end;
if CheckName(gbi_item1,'ringmail') then
begin
result:='Ringmail';
end;
if CheckName(gbi_item1,'plate') then
begin
result:='Platemail';
end;
end;
if CheckName(ItemMaterial,'leather') or CheckName(ItemMaterial,'cloth') or CheckName(ItemMaterial,'Spined Leather') or CheckName(ItemMaterial,'Horned Leather') then
begin
if CheckName(gbi_item1,'shoes') or CheckName(gbi_item1,'boots') or CheckName(gbi_item1,'sandals') then
begin
result:='Footwear Set';
end;
if (not CheckName(gbi_item1,'female')) and (not CheckName(gbi_item1,'skirt')) and (not CheckName(gbi_item1,'shorts')) and (CheckName(gbi_item1,'leather')) then
begin
result:='Leather Set';
end;
if not CheckName(gbi_item1,'bustier') and CheckName(gbi_item1,'studded') then
begin
result:='Studded Set';
end;
if CheckName(gbi_item1,'female') or CheckName(gbi_item1,'bustier') or ((CheckName(gbi_item1,'skirt') ) and (not CheckName(ItemMaterial,'cloth')) ) or (CheckName(gbi_item1,'shorts')) or (CheckName(gbi_item1,'studded armor')) then
begin
result:='Female Set';
end;
if CheckName(gbi_item1,'Bone') then
begin
result:='Bone AR';
exit;
end;
if CheckName(gbi_item1,'bandana') or CheckName(gbi_item1,'shirt')or (CheckName(gbi_item1,'skirt') and CheckName(ItemMaterial,'cloth')) then
begin
result:='The Gypsy';
end;
if (BMSearch(1,gbi_item1,'skullcap') >0) or (BMSearch(1,gbi_item1,'doublet') >0) or(BMSearch(1,gbi_item1,'kilt') >0) then
begin
result:='The Pirate';
end;
if ((CheckName(gbi_item1,'straw')) and (not CheckName(gbi_item1,'tall'))) or((CheckName(gbi_item1,'tunic')) and (CheckName(ItemMaterial,'cloth') )) or (CheckName(gbi_item1,'long pants')) then
begin
result:='The Farmer';
end;
if CheckName(gbi_item1,'wizard') or CheckName(gbi_item1,'sash') or CheckName(gbi_item1,'robe') then
begin
result:='The Wizard';
end;
if (CheckName(gbi_item1,'floppy') ) or (CheckName(gbi_item1,'plain dress') ) or (CheckName(gbi_item1,'full apron') ) then
begin
result:='Fishergirl';
end;
if CheckName(gbi_item1,'feathered') or CheckName(gbi_item1,'surcoat') or CheckName(gbi_item1,'fancy shirt') or CheckName(gbi_item1,'short pants')then
begin
result:='Town Crier';
exit;
end;
if CheckName(gbi_item1,'bonnet') or CheckName(gbi_item1,'half apron') or CheckName(gbi_item1,'fancy dress') or CheckName(gbi_item1,'short pants')then
begin
result:='The Lady';
end;
if CheckName(gbi_item1,'jester') or CheckName(gbi_item1,'cloak') then
begin
result:='The Jester';
end;
if CheckName(gbi_item1,'tricorne') or ( not CheckName(gbi_item1,'skull')and CheckName(gbi_item1,'cap') and CheckName(ItemMaterial,'cloth')) or CheckName(gbi_item1,'tall straw') or CheckName(gbi_item1,'wide-brim') then
begin
result:='The Hat-Set';
end;
end;
end;
if LowerCase(SizeBod) = LowerCase('lbod') then
begin
if CheckName(gbi_item1,'cutlass') or CheckName(gbi_item1,'katana') or CheckName(gbi_item1,'scimitar') or CheckName(gbi_item1,'broad') or CheckName(gbi_item1,'longsword') or CheckName(gbi_item1,'viking') then
begin
result:='Swords';
end;
if CheckName(gbi_item1,'kryss') or CheckName(gbi_item1,'spear') or CheckName(gbi_item1,'warfork') or CheckName(gbi_item1,'dagger') then
begin
result:='Piercing';
end;
if CheckName(gbi_item1,'axe') then
begin
result:='Axes';
end;
if CheckName(gbi_item1,'mace') or CheckName(gbi_item1,'maul') or CheckName(gbi_item1,'hammer') then
begin
result:='Bashing';
end;
if CheckName(gbi_item1,'bardiche') or CheckName(gbi_item1,'halberd') then
begin
result:='Polearms';
end;
if CheckName(gbi_item1,'chainmail') then
begin
result:='Chainmail';
end;
if CheckName(gbi_item1,'ringmail') then
begin
result:='Ringmail';
end;
if CheckName(gbi_item1,'gorget') and CheckName(gbi_item2,'gloves') then
begin
result:='Studded Set';
end;
if CheckName(gbi_item1,'plate') or CheckName(gbi_item2,'plate') then
begin
result:='Platemail';
end;
if CheckName(gbi_item1,'sandals') and CheckName(gbi_item2,'shoes') then
begin
result:='Footwear Set';
end;
if CheckName(gbi_item1,'gorget') and CheckName(gbi_item2,'leather') then
begin
result:='Leather Set';
end;
if CheckName(gbi_item1,'skirt') and CheckName(gbi_item2,'bustier') then
begin
result:='Female Set';
end;
if CheckName(gbi_item1,'bone') then
begin
result:='Bone AR';
end;
if CheckName(gbi_item1,'bandana') and CheckName(gbi_item2,'shirt') then
begin
result:='The Gypsy';
end;
if CheckName(gbi_item1,'skullcap') and CheckName(gbi_item2,'doublet') then
begin
result:='The Pirate';
end;
if CheckName(gbi_item1,'straw') and CheckName(gbi_item2,'tunic') then
begin
result:='The Farmer';
end;
if CheckName(gbi_item1,'wizard') and CheckName(gbi_item2,'sash') then
begin
result:='The Wizard';
end;
if CheckName(gbi_item1,'floppy') and CheckName(gbi_item2,'apron') then
begin
result:='Fishergirl';
end;
if CheckName(gbi_item1,'feathered') and CheckName(gbi_item2,'surcoat') then
begin
result:='Town Crier';
end;
if CheckName(gbi_item1,'bonnet') and CheckName(gbi_item2,'apron') then
begin
result:='The Lady';
end;
if CheckName(gbi_item1,'jester') and CheckName(gbi_item2,'jester') then
begin
result:='The Jester';
end;
if CheckName(gbi_item1,'tricorne') and CheckName(gbi_item2,'cap') then
begin
result:='The Hat-Set';
end;
end;
end;
function toolcat(ItemName,ItemMaterial:string):string;
begin
if CheckName(ItemName,'platemail') then
begin
result:='Platemail';
exit;
end;
if CheckName(ItemName,'chainmail') then
begin
result:='Chainmail';
exit;
end;
if CheckName(ItemName,'ringmail') then
begin
result:='Ringmail';
exit;
end;
if CheckName(ItemName,'helm') or CheckName(ItemName,'bascinet') then
begin
result:='Helmets';
exit;
end;
if CheckName(ItemName,'shield') or CheckName(ItemName,'buckler') then
begin
result:='Shields';
exit;
end;
if CheckName(ItemName,'axe') then
begin
result:='Axes';
exit;
end;
if CheckName(ItemName,'sword') or CheckName(ItemName,'cutlass') or CheckName(ItemName,'dagger') or CheckName(ItemName,'scimitar') or CheckName(ItemName,'katana') or CheckName(ItemName,'kryss') then
begin
result:='Bladed';
exit;
end;
if CheckName(ItemName,'sword') or CheckName(ItemName,'cutlass') or CheckName(ItemName,'dagger') or CheckName(ItemName,'scimitar') or CheckName(ItemName,'katana') or CheckName(ItemName,'kryss') then
begin
result:='Bladed';
exit;
end;
if CheckName(ItemName,'mace') or CheckName(ItemName,'hammer') or CheckName(ItemName,'maul') then
begin
result:='Bashing';
exit;
end;
if CheckName(ItemName,'bard') or CheckName(ItemName,'halb') or CheckName(ItemName,'war f') then
begin
result:='Polearms';
exit;
end;
if not CheckName(ItemName,'skirt') and not CheckName(ItemName,'shorts') and not CheckName(ItemName,'bustier') and CheckName(ItemName,'leather') then
begin
result:='Leather Armor';
exit;
end;
if not CheckName(ItemName,'bustier') and not CheckName(ItemName,'armor') and CheckName(ItemName,'studded') then
begin
result:='Studded Armor';
exit;
end;
if CheckName(ItemName,'leather shorts') or CheckName(ItemName,'leather skirt')or CheckName(ItemName,'bustier') or CheckName(ItemName,'female leather') or CheckName(ItemName,'studded armor') then
begin
result:='Female Armor';
end;
if CheckName(ItemName,'bone') then
begin
result:='Bone Armor';
exit;
end;
if CheckName(ItemName,'shoes') or CheckName(ItemName,'boots') or CheckName(ItemName,'sandals') then
begin
result:='Footwear';
exit;
end;
if CheckName(ItemName,'hat') or (CheckName(ItemName,'cap') and CheckName(ItemMaterial,'cloth')) or CheckName(ItemName,'bandana') or CheckName(ItemName,'bonnet') then
begin
result:='Hats';
exit;
end;
if CheckName(ItemName,'shirt') or CheckName(ItemName,'dress') or (CheckName(ItemName,'tunic') and CheckName(ItemMaterial,'cloth')) or CheckName(ItemName,'doublet') or CheckName(ItemName,'cloak') or CheckName(ItemName,'robe') or CheckName(ItemName,'surcoat')or CheckName(ItemName,'suit')then
begin
result:='Shirts';
exit;
end;
if CheckName(ItemName,'pants') or CheckName(ItemName,'kilt') or (CheckName(ItemName,'skirt') and CheckName(ItemMaterial,'cloth')) then
begin
result:='Pants';
exit;
end;
if CheckName(ItemName,'apron') or CheckName(ItemName,'sash') then
begin
result:='Miscellaneous';
exit;
end;
end;
procedure PartCreate(SizeBod,lbod,ItemName,ItemMaterial:string);
begin
MPart.Part1:='';
MPart.Part2:='';
MPart.Part3:='';
MPart.Part4:='';
MPart.Part5:='';
MPart.Part6:='';
if SizeBod = 'LBod' then
begin
if LBod = 'Swords' then
begin
MPart.Part1:='Cut';
MPart.Part2:='VSw';
MPart.Part3:='LSw';
MPart.Part4:='Sci';
MPart.Part5:='BSw';
MPart.Part6:='Kat';
exit;
end;
if LBod = 'Piercing' then
begin
MPart.Part1:='Dag';
MPart.Part2:='Kry';
MPart.Part3:='WFo';
MPart.Part4:='SSp';
MPart.Part5:='Spe';
MPart.Part6:='';
exit;
end;
if LBod = 'Axes' then
begin
MPart.Part1:='LBA';
MPart.Part2:='DAx';
MPart.Part3:='BAx';
MPart.Part4:='THA';
MPart.Part5:='Axe';
MPart.Part6:='EAx';
exit;
end;
if LBod = 'Bashing' then
begin
MPart.Part1:='Mac';
MPart.Part2:='Mau';
MPart.Part3:='WMa';
MPart.Part4:='WHa';
MPart.Part5:='HPi';
MPart.Part6:='WAx';
exit;
end;
if LBod = 'Polearms' then
begin
MPart.Part1:='Bar';
MPart.Part2:='Hal';
MPart.Part3:='';
MPart.Part4:='';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'Polearms' then
begin
MPart.Part1:='Bar';
MPart.Part2:='Hal';
MPart.Part3:='';
MPart.Part4:='';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'Chainmail' then
begin
MPart.Part1:='Coi';
MPart.Part2:='Leg';
MPart.Part3:='Tun';
MPart.Part4:='';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'Ringmail' then
begin
MPart.Part1:='Glo';
MPart.Part2:='Sle';
MPart.Part3:='Leg';
MPart.Part4:='Tun';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'Platemail' then
begin
MPart.Part1:='Gor';
MPart.Part2:='Glo';
MPart.Part3:='PHe';
MPart.Part4:='Arm';
MPart.Part5:='Leg';
MPart.Part6:='Tun';
exit;
end;
if LBod = 'Footwear Set' then
begin
MPart.Part1:='San';
MPart.Part2:='Sho';
MPart.Part3:='Boo';
MPart.Part4:='ThB';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'Leather Set' then
begin
MPart.Part1:='Cap';
MPart.Part2:='Gor';
MPart.Part3:='Glo';
MPart.Part4:='Sle';
MPart.Part5:='Leg';
MPart.Part6:='Tun';
exit;
end;
if LBod = 'Studded Set' then
begin
MPart.Part1:='Gor';
MPart.Part2:='Glo';
MPart.Part3:='Sle';
MPart.Part4:='Leg';
MPart.Part5:='Tun';
MPart.Part6:='';
exit;
end;
if LBod = 'Female Set' then
begin
MPart.Part1:='Ski';
MPart.Part2:='Bus';
MPart.Part3:='Sht';
MPart.Part4:='LAr';
MPart.Part5:='SBu';
MPart.Part6:='SAr';
exit;
end;
if LBod = 'Bone AR' then
begin
MPart.Part1:='BHe';
MPart.Part2:='BGl';
MPart.Part3:='BAr';
MPart.Part4:='BLe';
MPart.Part5:='BAo';
MPart.Part6:='';
exit;
end;
if LBod = 'The Gypsy' then
begin
MPart.Part1:='Ban';
MPart.Part2:='Shi';
MPart.Part3:='Ski';
MPart.Part4:='ThB';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LowerCase(LBod) = LowerCase('The Pirate') then
begin
MPart.Part1:='SkC';
MPart.Part2:='Dou';
MPart.Part3:='Kil';
MPart.Part4:='Sho';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'The Farmer' then
begin
MPart.Part1:='StH';
MPart.Part2:='Tun';
MPart.Part3:='LoP';
MPart.Part4:='Boo';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'The Wizard' then
begin
MPart.Part1:='WiH';
MPart.Part2:='BoS';
MPart.Part3:='Rob';
MPart.Part4:='Boo';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'Fishergirl' then
begin
MPart.Part1:='FlH';
MPart.Part2:='FuA';
MPart.Part3:='PlD';
MPart.Part4:='San';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'Town Crier' then
begin
MPart.Part1:='FeH';
MPart.Part2:='Sur';
MPart.Part3:='FaS';
MPart.Part4:='ShP';
MPart.Part5:='ThB';
MPart.Part6:='';
exit;
end;
if LBod = 'The Lady' then
begin
MPart.Part1:='Bon';
MPart.Part2:='HaA';
MPart.Part3:='FaD';
MPart.Part4:='San';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'The Jester' then
begin
MPart.Part1:='JeH';
MPart.Part2:='JeS';
MPart.Part3:='Clo';
MPart.Part4:='Sho';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
if LBod = 'The Hat-Set' then
begin
AddToSystemJournal( '1143 The Hat-Set');
MPart.Part1:='TrH';
MPart.Part2:='Cap';
MPart.Part3:='WBH';
MPart.Part4:='TSH';
MPart.Part5:='';
MPart.Part6:='';
exit;
end;
end;
if SizeBod = 'SBod' then
begin
MPart.Part2:='';
MPart.Part3:='';
MPart.Part4:='';
MPart.Part5:='';
MPart.Part6:='';
if ItemName ='axe' then MPart.Part1:='Axe';
if CheckName(ItemName,'bandana') then MPart.Part1:='Bandana';
if CheckName(ItemName,'bardiche') then MPart.Part1:='Bardiche';
if CheckName(ItemName,'bascinet') then MPart.Part1:='Bascinet';
if CheckName(ItemName,'battle') and not CheckName(ItemName,'large') then MPart.Part1:='Battle Axe';
if CheckName(ItemName,'sash') then MPart.Part1:='Body Sash';
if CheckName(ItemName,'sleeves') then MPart.Part1:='Sleeves';
if CheckName(ItemName,'gorget') then MPart.Part1:='Gorget';
if CheckName(ItemName,'gloves') then MPart.Part1:='Gloves';
if CheckName(ItemName,'arms') then MPart.Part1:='Arms';
if CheckName(ItemName,'legs') then MPart.Part1:='Legs';
if CheckName(ItemName,'tunic') then MPart.Part1:='Tunic';
if CheckName(ItemName,'leggings') then MPart.Part1:='Leggings';
if CheckName(ItemName,'bone') then
begin
if CheckName(ItemName,'armor') then MPart.Part1:='Bone Armor';
if CheckName(ItemName,'arms') then MPart.Part1:='Bone Arms';
if CheckName(ItemName,'gloves') then MPart.Part1:='Bone Gloves';
if CheckName(ItemName,'helm') then MPart.Part1:='Bone Helmet';
if CheckName(ItemName,'leg') then MPart.Part1:='Bone Leggings';
end;
if CheckName(ItemName,'bonnet') then MPart.Part1:='Bonnet';
if ItemName ='boots' then MPart.Part1:='Boots';
if CheckName(ItemName,'broadsword') then MPart.Part1:='Broadsword';
if CheckName(ItemName,'bronze') then MPart.Part1:='Bronze Shield';
if CheckName(ItemName,'buckler') then MPart.Part1:='Buckler';
if ItemName ='cap' then MPart.Part1:='Cap';
if CheckName(ItemName,'cloak') then MPart.Part1:='Cloak';
if CheckName(ItemName,'close') then MPart.Part1:='Close Helmet';
if CheckName(ItemName,'coif') then MPart.Part1:='Chainmail Coif';
if CheckName(ItemName,'cutlass') then MPart.Part1:='Cutlass';
if ItemName ='coif' then MPart.Part1:='Coif';
if ItemName ='dagger' then MPart.Part1:='Dagger';
if CheckName(ItemName,'double') then MPart.Part1:='Double Axe';
if CheckName(ItemName,'doublet') then MPart.Part1:='Doublet';
if CheckName(ItemName,'Executioner') then MPart.Part1:='Executioner''s Axe';
if CheckName(ItemName,'fancy d') then MPart.Part1:='Fancy Dress';
if CheckName(ItemName,'fancy s') then MPart.Part1:='Fancy Shirt';
if CheckName(ItemName,'feathered') then MPart.Part1:='Feathered Hat';
if CheckName(ItemName,'female tu') then MPart.Part1:='Female Tunic';
if CheckName(ItemName,'female pl') then MPart.Part1:='Female Tunic';
if CheckName(ItemName,'floppy') then MPart.Part1:='Floppy Hat';
if CheckName(ItemName,'l apron') then MPart.Part1:='Full Apron';
if CheckName(ItemName,'halberd') then MPart.Part1:='Halberd';
if CheckName(ItemName,'f apron') then MPart.Part1:='Half Apron';
if CheckName(ItemName,'hammer p') then MPart.Part1:='Hammer Pick';
if CheckName(ItemName,'heater') then MPart.Part1:='Heater Shield';
if ItemName ='helmet' then MPart.Part1:='Helmet';
if CheckName(ItemName,'jester h') then MPart.Part1:='Jester Hat';
if CheckName(ItemName,'jester s') then MPart.Part1:='Jester Suit';
if CheckName(ItemName,'katana') then MPart.Part1:='Katana';
if CheckName(ItemName,'kilt') then MPart.Part1:='Kilt';
if CheckName(ItemName,'kryss') then MPart.Part1:='Kryss';
if CheckName(ItemName,'large battle') then MPart.Part1:='Large Battle Axe';
if CheckName(ItemName,'leather') then
begin
if CheckName(ItemName,'armor') then MPart.Part1:='Leather Armor';
if CheckName(ItemName,'bustier') then MPart.Part1:='Leather Bustier';
if CheckName(ItemName,'shorts') then MPart.Part1:='Leather Shorts';
if CheckName(ItemName,'skirt') then MPart.Part1:='Leather Skirt';
if CheckName(ItemName,'cap') then MPart.Part1:='Leather Cap';
end;
if CheckName(ItemName,'long p') then MPart.Part1:='Long Pants';
if CheckName(ItemName,'longsword') then MPart.Part1:='Longsword';
if ItemName ='mace' then MPart.Part1:='Mace';
if ItemName ='maul' then MPart.Part1:='Maul';
if CheckName(ItemName,'metal Kite') then MPart.Part1:='Metal Kite Shield';
if CheckName(ItemName,'metal shield') then MPart.Part1:='Metal Shield';
if CheckName(ItemName,'norse') then MPart.Part1:='Norse Helm';
if CheckName(ItemName,'plain') then MPart.Part1:='Plain Dress';
if CheckName(ItemName,'plate h') then MPart.Part1:='Plate Helm';
if CheckName(ItemName,'wide') then MPart.Part1:='Wide-Brim Hat';
if CheckName(ItemName,'robe') then MPart.Part1:='Robe';
if CheckName(ItemName,'sandals') then MPart.Part1:='Sandals';
if CheckName(ItemName,'scimitar') then MPart.Part1:='Scimitar';
if CheckName(ItemName,'shirt') and not CheckName(ItemName,'fancy') then MPart.Part1:='Shirt';
if CheckName(ItemName,'shoes') then MPart.Part1:='Shoes';
if CheckName(ItemName,'short p') then MPart.Part1:='Short Pants';
if CheckName(ItemName,'spear') then MPart.Part1:='Spear';
if CheckName(ItemName,'short s') then MPart.Part1:='Short Spear';
if CheckName(ItemName,'skirt') and CheckName(ItemMaterial,'cloth') then MPart.Part1:='Skirt';
if CheckName(ItemName,'skullcap') then MPart.Part1:='Skullcap';
if CheckName(ItemName,'straw') then MPart.Part1:='Straw Hat';
if CheckName(ItemName,'studded ar') then MPart.Part1:='Studded female Armor';
if CheckName(ItemName,'tall st') then MPart.Part1:='Tall Straw Hat';
if CheckName(ItemName,'studded bust') then MPart.Part1:='Studded Bustier';
if CheckName(ItemName,'Studded Leggings') then MPart.Part1:='Studded Leggings';
if CheckName(ItemName,'studded female') then MPart.Part1:='Studded female';
if CheckName(ItemName,'surcoat') then MPart.Part1:='Surcoat';
if CheckName(ItemName,'tear kite') then MPart.Part1:='Tear Kite Shield';
if CheckName(ItemName,'thigh') then MPart.Part1:='Thigh Boots';
if CheckName(ItemName,'tricorne') then MPart.Part1:='Tricorne Hat';
if CheckName(ItemName,'two handed') then MPart.Part1:='Two Handed Axe';
if CheckName(ItemName,'viking') then MPart.Part1:='Viking Sword';
if CheckName(ItemName,'war a') then MPart.Part1:='War Axe';
if CheckName(ItemName,'war f') then MPart.Part1:='War Fork';
if CheckName(ItemName,'war h') then MPart.Part1:='War Hammer';
if CheckName(ItemName,'war m') then MPart.Part1:='War Mace';
if CheckName(ItemName,'wizard') then MPart.Part1:='Wizard''s Hat';
end;
end;
Procedure WriteToFile(StringResult,FileName:string);
begin
with TStringList.Create do
try
LoadFromFile(FileName);
Add(StringResult);
SaveToFile(FileName);
finally
free;
end
end;
procedure CreateBodFile;
var
i,m,j,h,p : Integer;
SL : TStringList;
Stream: TFileStream;
begin
if FileExists(NameSBod) then
Stream := TFileStream.Create(NameSBod, fmOpenReadWrite)
else
Stream := TFileStream.Create(NameSBod, fmCreate);
Stream.Free;
if FileExists(NameLBod) then
Stream := TFileStream.Create(NameLBod, fmOpenReadWrite)
else
Stream := TFileStream.Create(NameLBod, fmCreate);
Stream.Free;
for y:=0 to Length(ABooK)-1 do
begin
h:=KolVoBod(ABooK[y]);
m:=0;
DefaultFindBoock(ABooK[y]);
SetLength(BodBook,0);
while h>m do
begin
InfoBod;
if Length(BodBook)>10 then p:=10 else
p:= Length(BodBook);
for j:= 0 to p-1 do
begin
if BodBook[j].BodType=0 then
begin
OSBOD.BodType:='SBod';
OSBOD.Material:=Material(BodBook[j].SmallBod.Material);
OSBOD.Quality:=BodBook[j].SmallBod.Quality;
LBodTemp:=LBodConv(BodBook[j].SmallBod.Item+'|'+'PPPPPP',OSBOD.Material,'SBod');
OSBOD.Lbod:=LBodTemp;
PartCreate('SBod',OSBOD.Lbod,BodBook[j].SmallBod.Item,BodBook[j].SmallBod.Material);
OSBOD.Part:=MPart.Part1;
SL := TStringList.Create;
StrBreakApart(BodBook[j].SmallBod.Amount, ' ', SL);
if SL.Count > 0 then
OSBOD.Amount:=SL.Strings[2];
SL.Free;
OSBOD.Filled:='0';
OSBOD.Toolmenu:=toolcat(BodBook[j].SmallBod.Item,BodBook[j].SmallBod.Material);
OSBOD.Price:='0';
OSBOD.Book:='0';
WriteToFile(OSBOD.BodType+';'+OSBOD.Material+';'+OSBOD.Quality+';'+OSBOD.Lbod+';'+OSBOD.Part+';'+OSBOD.Amount+';'+OSBOD.Filled+';'+OSBOD.Toolmenu+';'+OSBOD.Price+';'+OSBOD.Book+';',NameSBod);
m:=m+1;
end;
if BodBook[j].BodType>0 then
begin
OLBOD.BodType:='LBod';
OLBOD.Material:=Material(BodBook[j].LargeBod.Bods[0].Material);
OLBOD.Quality:=BodBook[j].LargeBod.Bods[0].Quality;
LBodTemp:=LBodConv(BodBook[j].LargeBod.Bods[0].Item+'|'+BodBook[j].LargeBod.Bods[1].Item,OLBOD.Material,'LBod');
OLBOD.Lbod:=LBodTemp;
SL := TStringList.Create;
StrBreakApart(BodBook[j].LargeBod.Bods[0].Amount, ' ', SL);
if SL.Count > 0 then
OLBOD.Amount:=SL.Strings[2];
SL.Free;
PartCreate('LBod',OLBOD.Lbod,'','');
OLBOD.Part1:=MPart.Part1;
OLBOD.Amount1:='0';
OLBOD.Part2:=MPart.Part2;
OLBOD.Amount2:='0';
OLBOD.Part3:=MPart.Part3;
OLBOD.Amount3:='0';
OLBOD.Part4:=MPart.Part4;
OLBOD.Amount4:='0';
OLBOD.Part5:=MPart.Part5;
OLBOD.Amount5:='0';
OLBOD.Part6:=MPart.Part6;
OLBOD.Amount6:='0';
OLBOD.Price:='0';
OLBOD.Book:='0';
WriteToFile(OLBOD.BodType+';'+OLBOD.Material+';'+OLBOD.Quality+';'+OLBOD.Lbod+';'+OLBOD.Amount+';'+ OLBOD.Part1+';'+OLBOD.Amount1+';'+OLBOD.Part2+';'+OLBOD.Amount2+';'+OLBOD.Part3+';'+OLBOD.Amount3+';'+OLBOD.Part4+';'+OLBOD.Amount4+';'+OLBOD.Part5+';'+OLBOD.Amount5+';'+OLBOD.Part6+';'+OLBOD.Amount6+';'+OLBOD.Price+';'+OLBOD.Book+';',NameLBod);
m:=m+1;
end;
end;
AddToSystemJournal('На последней странице было='+inttostr(Length(BodBook))+'Прошло по M='+inttostr(m)+'. Всего бодов='+inttostr(h));
for i:=0 to GetGumpsCount-1 do
begin
if (GetGumpID(i) = $029C) then
begin
checklag(60000);
NumGumpButton(i,3);
end;
end;
wait(2000);
SetLength(BodBook,0);
end;
end;
end;
begin
TargetBook;
CreateBodFile;
end.