the monster's body is not open, but stealth find somethine in body and can not pick it, system message is "you can not pick that up", fuction InJournalBetweenTimes's value is 0.
Code: Select all
Program New;
var
body : integer;
Startime:TdateTime;
const
cut_weapon = $4080CEB8 ;
BankCard = $4021B635 ;
bankbox = $40700F2E ;
monster1 = $0024 ;
monster2 = $0023 ;
body_type = $2006 ;
procedure equip_weapon;
begin
if ObjAtLayer(lhandlayer)=0 then Equip(LhandLayer,cut_weapon);
end;
procedure cut_body;
begin
equip_weapon;
FindDistance:=2;
repeat
findtype(body_type,ground);
useobject(cut_weapon);
WaitForTarget(1000);
TargetToObject(finditem);
Ignore(finditem);
until findtype(body_type,ground) = 0
ignorereset;
ClearJournal;
repeat
useobject(findtype(body_type,ground));
body := finditem;
wait(1000);
useobject(BankCard);
wait(1000);
Startime:=now;
repeat
findtype($FFFF,body);
MoveItem(finditem,FindQuantity,bankbox,0,0,0);
wait(1000);
until ( findtype($FFFF,body)=0 ) or ( InJournalBetweenTimes('can not pick',Startime,Now)>0 )
ignore(body);
FindDistance:=2;
if findtype(monster1,Ground)>0 then cast('Wither');
until findtype(body_type,ground)=0
ignorereset;
end;
procedure killmonster;
Label Kill;
begin
Kill:
FindDistance:=10;
if findtype(monster1,Ground)>0 then begin
Attack(finditem);
FindDistance:=2;
if findtype(monster1,Ground)>0 then cast('Wither');
wait(2000);
//addtosystemjournal(getname(finditem));
goto Kill
end;
if findtype(monster2,Ground)>0 then begin
Attack(finditem);
FindDistance:=2;
if findtype(monster1,Ground)>0 then cast('Wither');
cast('Wither');
wait(2000);
goto Kill
end;
wait(1000);
end;
//==================Main=================
begin
while true do begin
movexy(5484,567,true,0,true);
movexy(5452,525,true,0,true);
killmonster;
cut_body;
movexy(5411,533,true,0,true);
killmonster;
cut_body;
movexy(5408,571,true,0,true);
killmonster;
cut_body;
movexy(5410,608,true,0,true);
killmonster;
cut_body;
movexy(5388,619,true,0,true);
killmonster;
cut_body;
movexy(5436,587,true,0,true);
killmonster;
cut_body;
movexy(5468,608,true,0,true);
killmonster;
cut_body;
movexy(5503,595,true,0,true);
killmonster;
cut_body;
end;
end.