Code: Select all
procedure stack(tpe : word);
begin
findtype(tpe,backpack);
if findCount>0 then DragItem(finditem, 0);
findtype(tpe,ground);
if findCount>0 then DropItem(finditem,0,0,0);
end;
вот также стрижка овец..
Code: Select all
program Ovtca;
var i,count : integer;
procedure Hungry(NeededLevel : Integer);
var HArray : array [0..10] of String;
CurrentLevel : Integer;
HasError : Boolean;
TimeSayHungry : TDateTime;
FoodID : Cardinal;
i,c,difference : Integer;
begin
findtype($097B,0);
FoodID := FindItem; {You must SET FoodID!}
if (NeededLevel < 0) or (NeededLevel > 10) then Exit;
HArray[0] := 'You are absolutely stuffed!';
HArray[1] := 'You are stuffed';
HArray[2] := 'hungry at all';
HArray[3] := 'You are a little hungry';
HArray[4] := 'You are somewhat hungry';
HArray[5] := 'You are REALLY hungry';
HArray[6] := 'Your stomash hurts';
HArray[7] := 'Your stomash hurts and you feel dizzy';
HArray[8] := 'You are starving';
HArray[9] := 'You are almost dying of hunger';
HArray[10] := 'You are DYING of hunger...';
HasError := true;
TimeSayHungry := Now;
UOSay('.hungry');
wait(100);
i:=0;
while i < 100 do
begin
for c := 0 to 10 do
if InJournalBetweenTimes(HArray[c],TimeSayHungry,Now) >= 0 then
begin
CurrentLevel := c;
HasError := false;
i := 100;
end;
wait(100);
i := i + 1;
end;
if HasError then
begin
AddToSystemJournal('Error with Hungry: Lag? No connect? Something else?');
Exit;
end;
difference := CurrentLevel - NeededLevel;
if difference > 0 then for i := 1 to difference do
begin
UseObject(FoodID);
wait(2000);
end;
end;
procedure IsCurMessages;
var D : TDateTime;
begin
{5 minutes in DateTime = 5 / 1440 = 0.00347}
D := Now - (0.00347);
InJournalBetweenTimes(CharName + ': I am already performing another action.',D,Now);
if LineCount > 5 then
begin
AddToSystemJournal('Error with target. Disconnected');
Disconnect;
end;
end;
procedure stack(tpe : word);
begin
findtype(tpe,backpack);
if findCount>0 then DragItem(finditem, 0);
AddToSystemJournal(IntToStr(findcount));
findtype(tpe,ground);
if findCount>0 then DropItem(finditem,0,0,0);
AddToSystemJournal(IntToStr(findcount));
end;
begin
SetARStatus(true);
while True do
begin
findtype($00CF,0);
while findcount>0 do
begin
findtype($00CF,0);
WaitTargetObject(finditem);
useobject($795D7688);
wait(5000);
end;
stack($0DF8);
wait(300000);
IsCurMessages;
hungry(0);
end;
End.