Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Multisell logger v1.1 RaRus (HF5)
- 1. Create multisell folder on drive C://.
- 2. Open any multisell shop, this programm will save it to your pc.
- }
- var
- i,j,list,production_item,production_count,ingredient_item,ingredient_count,size, finished: int64;
- product_size, ingredient_size, pro, ing: integer;
- Data: TMemo;
- Form1: TForm;
- procedure init;
- begin
- Form1 := TForm.Create(nil);
- Form1.Caption := '';
- Form1.BorderStyle := bsSizeable;
- Form1.Width:=1000;
- Form1.Height:=700;
- Data:=TMemo.Create(Form1);
- Data.Parent:=Form1;
- Data.Width:=1000;
- Data.Height:=700;
- Data.Left:=0;
- Data.Top:=0;
- end;
- procedure Free;
- begin
- Data.Free;
- Form1.Free;
- end;
- procedure CreatureSay(s:string);
- begin
- buf:=#$4A;
- WriteD(1);
- WriteD(0);
- WriteS('SYS');
- WriteD(-1);
- WriteS(s);
- SendToClient;
- end;
- begin
- if FromServer and (pck[1]=#$D0)then
- begin
- i:=2;
- list:=ReadD(i);
- inc(i,4);
- finished:=ReadD(i);
- inc(i,4);
- size:=ReadD(i);
- for j:=1 to size do begin
- Data.lines.add(' <item>');
- inc(i,31);
- product_size:=ReadH(i);
- ingredient_size:=ReadH(i);
- for pro:=1 to product_size do begin
- production_item:=ReadD(i);
- inc(i,6);
- production_count:=ReadQ(i);
- inc(i,26);
- Data.lines.add(' <production id="'+inttostr(production_item)+'" count="'+inttostr(production_count)+'"/>');
- end;
- for ing:=1 to ingredient_size do begin
- ingredient_item:=ReadD(i);
- inc(i,2);
- ingredient_count:=ReadQ(i);
- CreatureSay('ingredient_count: '+inttostr(ingredient_count));
- inc(i,26);
- Data.lines.add(' <ingredient id="'+inttostr(ingredient_item)+'" count="'+inttostr(ingredient_count)+'"/>');
- end;
- Data.lines.add(' </item>');
- end;
- if (finished = 1) then begin
- CreatureSay('multisell id: '+inttostr(list)+' saved!');
- Data.lines.savetofile('C:\multisell\'+inttostr(list)+'.xml');
- Data.lines.clear;
- end;
- end;
- end.
Add Comment
Please, Sign In to add comment