Turn off the autoloop via .options (it's faster this way). Stand near the trash barrel and go on!
program Tailoring; {$Include 'all.inc'} const Carpet = $0F9D; Cloth = $1765; var x : Integer; n : TDateTime; procedure ArmsLore; var d, t: TDateTime; begin d:=StrToTime('0:00:11'); if ((now - n) > d) or (n = 0) then begin t := now; FindType($0F51,backpack); if FindCount > 0 then begin WaitTargetType($0F51) end; FindType($0F43,backpack); if FindCount > 0 then begin WaitTargetType($0F43) end; UseSkill('Arms Lore'); WaitJournalLineSystem(t, 'This|tell', 3000); if TargetPresent then CancelTarget; n:=now; end; end; procedure ToTrash(ItemType: Word); var ItemToTrash, Trash : Cardinal; begin FindDistance := 2; Trash := FindType($0E77, ground); if (Count(ItemType) > 0) then begin repeat ItemToTrash := FindType(ItemType,Backpack); MoveItem(ItemToTrash,1,Trash,0,0,0); Wait(400); until (Count(ItemType) = 0); end; end; procedure MakeItem; begin CancelMenu; WaitMenu('What','Carpet'); WaitMenu('make','(2)'); WaitTargetObject(FindType(Cloth,Backpack)); UseType(Carpet, $FFFF); end; Procedure CheckQuantity; label flag; begin flag: FindType(Cloth,Backpack); AddToSystemJournal('Cloth left: ' + IntToStr(FindFullQuantity)); if (FindFullQuantity < 100) then begin FindDistance := 2; FindType(Cloth,Ground); if (FindCount = 0) then begin AddToSystemJournal('No more cloth around'); ArmsLore; goto flag; end; MoveItem(FindItem,10000,Backpack,0,0,0); AddToSystemJournal('Picked up some cloth'); Wait(400); goto flag; end; end; procedure AddItemToContainer(Obj, Cont: Cardinal); begin if (Cont = Backpack) and (GetQuantity(Obj) = 1) then ToTrash(GetType(Obj)); end; Begin SetARStatus(true); SetEventProc(evAddItemToContainer, 'AddItemToContainer'); while (not Dead) and (Connected) do begin Hungry(1,Backpack); Wait(400); for x := 0 to 100 do begin CheckSave; CheckQuantity; MakeItem; Wait(400); end; end; End.