искал но не нашел
возможно нету
Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7
каторга дрв
Code: Select all
Program LumberVesper;
{$Include 'all.inc'}
const
hatcher=$0F44;
log_payment_stone=$401258E1;
logs=$1BDD;
Eat=$160A;
l_fizzles='You hack at the tree for a while, but fail to produce any useable wood.';
l_nothing1='There are no logs here to chop.';
l_nothing2='You can''t reach this.';
l_needwait ='You must wait to perform another action';
l_success = 'in your pack.';
l_bad ='Unexpected target info';
l_heavy ='at your feet';
l_far='That is too far away.';
l_elemental ='Ent';
l_see='You have no line of sight to that location';
var
tfta,temp,res_arr:TFoundTilesArray;
TreeTile:array [0..9] of word;
t_x,t_y,rs,i,k,arr_sum: word;
procedure init;
begin
//Tile Tree
TreeTile[0]:=3283;
TreeTile[1]:=3277;
TreeTile[2]:=3293;
TreeTile[3]:=3296;
TreeTile[4]:=3302;
TreeTile[5]:=3299;
TreeTile[6]:=3290;
TreeTile[7]:=3288;
TreeTile[8]:=3286;
TreeTile[9]:=3280;
end;
procedure Wait_Target(time_ms:Cardinal);
var
TempTime,SumTime:Cardinal;
begin
SumTime:=0;
repeat
checksave;
wait(250);
TempTime:=Timer;
SumTime:=SumTime+(Timer-TempTime);
until ((targetpresent) or (dead) or (not connected) or (SumTime>time_ms));
end;
procedure check_war;
begin
if IsWarMode(self) then
begin
UoSay('Guards');
SetWarMode(false);
wait(1000);
UseSkill('Stealth');
wait(1000);
end;
end;
procedure check_hide;
var
ctime: TDateTime;
begin
if IsWarMode(self) then setWarMode(false);
if not isHidden(self) then
repeat
ctime:=now;
UseSkill('Stealth');
repeat
checksave;
wait(350);
until (inJournalBetweenTimes('hidden|hide|wait', ctime, Now)<>-1);
until IsHidden(self);
end;
{ быстрая сортировка }
procedure qs_all(l, r: integer; var it: TFoundTilesArray);
var
i, j: integer;
x, y: TFoundTile;
begin
i:=l; j:=r;
x:=it[(l+r) div 2];
repeat
while (it[i].X+it[i].Y)<(x.X+x.Y) do i := i+1;
while (x.X+x.Y)<(it[j].X+it[j].Y) do j := j-1;
if i<=j then
begin
y := it[i];
it[i] := it[j];
it[j]:= y;
i := i+1; j := j-1;
end;
until i>j;
if l<j then qs_all(l, j, it);
if l<r then qs_all(i, r, it);
end;
procedure qs_X(l, r: integer; var it: TFoundTilesArray);
var
i, j: integer;
x, y: TFoundTile;
begin
i:=l; j:=r;
x:=it[(l+r) div 2];
repeat
while it[i].X<x.X do i := i+1;
while x.X<it[j].X do j := j-1;
if i<=j then
begin
y := it[i];
it[i]:= it[j];
it[j]:= y;
i := i+1; j := j-1;
end;
until i>j;
if l<j then qs_X(l, j, it);
if l<r then qs_X(i, r, it);
end;
procedure QuickSort(var item:TFoundTilesArray; count:integer);
begin
qs_all(0,count-1, item);
qs_X(0,count-1, item);
end; { конец быстрой сортировки }
procedure equip_tool(type_of_tool:word;layer:Byte);
begin
if (GetType(ObjAtLayer(layer))<>type_of_tool) then
begin
if layer=RhandLayer then unequip(RhandLayer)else unequip(LhandLayer);
wait(250);
if layer=RhandLayer then equipt(RhandLayer,type_of_tool);
if layer=LhandLayer then equipt(LhandLayer,type_of_tool);
end;
repeat
wait(500);
checksave;
until (GetType(ObjAtLayer(layer))=type_of_tool);
end;
procedure Chop(f_tile:TFoundTile);
var
ctime : TDateTime;
iter_max:integer;
next_lumb,lumb_result,wait_lumb: string;
fizzles:word;
begin
wait_lumb:=l_fizzles+'|'+l_needwait;
next_lumb:=l_nothing1+'|'+l_nothing2+'|'+l_far+'|'+l_see;;
lumb_result:=wait_lumb+'|'+next_lumb+'|'+l_success+'|'+l_elemental+'|'+l_bad+'|'+l_heavy;
fizzles:=0;
repeat
equip_tool(hatcher,LhandLayer);
if TargetPresent then CancelTarget;
iter_max:=0;
UseObject(ObjAtLayer(LhandLayer));
Wait_Target(5000);
ctime := Now;
TargetToTile(f_tile.Tile,f_tile.X,f_tile.Y,f_tile.Z);
repeat
iter_max:=iter_max+1;
wait(1000);
checksave;
check_war;
until ((InJournalBetweenTimes(lumb_result, ctime, Now)<>-1) or (iter_max>50));
if (InJournalBetweenTimes(l_fizzles, ctime, Now)<>-1) then fizzles:=fizzles+1;
if (InJournalBetweenTimes('OOPS !!! It isn''t a tree, it''s an Ent!!!|is attacking you|Vas Corp Por|notice', ctime, Now)<>-1) then
begin
UOSay('guards');
wait(2000);
UOSay('guards');
alarm;
end;
until ((InJournalBetweenTimes(next_lumb, ctime, Now)<>-1) or (fizzles>15));
end;
procedure unload;
var
i:integer;
begin
ClearBadLocationList;
MoveXY(1316,949,false,1,false);
UseObject(log_payment_stone);
end;
Begin
SetArStatus(true);
init;
// поиск деревьев и составление массива
arr_sum:=0;
for i:=0 to 9 do
begin
rs:=GetStaticTilesArray(1304,887,1332,937,1,TreeTile[i],tfta);
if rs>0 then
for k:=0 to rs-1 do temp[arr_sum+k]:=tfta[k];
arr_sum:=arr_sum+rs;
end;
QuickSort(temp,arr_sum);
AddToSystemJournal('найдено деревьев: '+IntToStr(arr_sum));
// рубка по составленному массиву
check_hide;
while not dead do
for i:=0 to arr_sum-1 do
begin
ClearBadLocationList;
MoveXY(temp[i].X,temp[i].Y,false,1,false);
check_hide;
chop(temp[i]);
if Weight>=730 then
begin
t_x:=GetX(self);
t_y:=GetY(self);
unload;
ClearBadLocationList;
MoveXY(t_x,t_y,false,0,false);
end;
end;
End.
скрипт старый, дали за флуд) скрипт немного был кривовват))
hatcher - очевидно тип топора
log_payment_stone - очевидно требует id
хотя проще переделать этот скриптhttp://stealth.od.ua/forum/viewtopic.php?t=1679 там немного надо изменений, разгрузка и координапты изменить, только и всего.
hatcher - очевидно тип топора
log_payment_stone - очевидно требует id
хотя проще переделать этот скриптhttp://stealth.od.ua/forum/viewtopic.php?t=1679 там немного надо изменений, разгрузка и координапты изменить, только и всего.