Ни у кого не завалялось скрипика на фишинг что бы на лодочке стоя на месте облавливал себя, потом проплывал на 4-6 тайлов вперед и опять облавливал вокруг и снова. Паралельно сбрасывая рыбу в трюм или сундук?
заранее огромное спс!
Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7
Помогите плз =))
-
- Novice
- Posts: 89
- Joined: 16.06.2008 12:22
- Location: <||TORCHKI||>
- Contact:
Code: Select all
program Fishing;
{$Include 'all.inc'}
const
HatchID = $403F7280; // Сериал трюма
FPoleType = $0DBF; // Тип удочки
BoxOfBags = $0E75; // тип ящика с мешками
EmptyBags = $0E76; // тип пустого мешка
{Сообщения}
Mes1 = 'You pull out';
Mes2 = 'You fish a while, but fail';
Mes3 = 'There are no fish here.';
Mes4 = 'That is too far away.';
Mes5 = 'Try fishing in water.';
Mes6 = 'Вы не смогли выловить';
{Команды кораблем}
Com1 = 'Raise Anchor';
Com2 = 'Drop Anchor';
Com3 = 'Forward';
Com4 = 'Back';
Com5 = 'Stop';
Answer1 = 'Aye';
{цвета магических рыб}
MagicF = $0489; // Magic Fish
GoldenF = $0630; // Golden Fish
SilverF = $0482; // Silver Fish
var
x, y, k, n, d, s, scard, snom, m1, m2, m3, m4, m5, m6 : integer;
ctime : TDateTime;
CurBagID : Cardinal;
CurBoxID : Cardinal;
temp1 : Cardinal;
FishResult : array[1..8] of Cardinal;
SumResult : array[1..10] of Integer;
FlagMagic : Integer;
FoodID : Cardinal;
function GetEmptyBag : Cardinal;
begin
Result := 0;
UseObject(HatchID);
wait(1000);
checksave;
CurBoxID := findtype(BoxOfBags, HatchID);
if CurBoxID = 0 then
begin
Addtosystemjournal( 'Не смог найти ящик с мешками');
exit;
end;
UseObject(CurBoxID);
wait(1000);
checksave;
temp1 := findtype(EmptyBags, CurBoxID);
if temp1 = 0 then
begin
Addtosystemjournal( 'Не смог найти мешок в ящике');
exit;
end;
MoveItem(finditem, 1, HatchID, 0, 0, 0);
Addtosystemjournal( 'Берём пустой мешок');
wait(1000);
checksave;
Result := temp1;
end;
procedure virar;
var TimeInterno : TDateTime;
loop1, loop2 : integer;
begin
TimeInterno := Now;
UOSay('Turn Left');
wait(200);
if (inJournalBetweenTimes('boat|cannot', TimeInterno, Now) >= 0) then //Obstaculo
begin
TimeInterno := Now;
loop1 := 0;
UOSay('Right');
repeat
wait(100)
loop1 := loop1 + 1;
until (inJournalBetweenTimes('boat|cannot|stopped', TimeInterno, Now) >= 0) OR (loop1 >= 50);
if (loop1 < 50) then //Obstaculo a direita.
begin
TimeInterno := Now;
loop2 := 0;
UOSay('Left');
repeat
wait(100)
loop2 := loop2 + 1;
until (inJournalBetweenTimes('boat|cannot|stopped', TimeInterno, Now) >= 0) OR (loop2 >= 50);
if (loop2 < 50) then //Obstaculo a esquerda.
begin
UOSay('Back');
wait(5000);
virar;
end;
end;
end;
end;
procedure mover;
var TimeInterno : TDateTime;
loop : integer;
begin
TimeInterno := Now;
loop := 0;
UOSay('Forward');
Addtosystemjournal('Переплываем на новое место ловли рыбы')
repeat
wait(100)
loop := loop + 1;
until (inJournalBetweenTimes('stopped', TimeInterno, Now) >= 0) OR (loop >= 150);
if (loop < 150) then //Obstaculo a frente.
begin
virar;
mover;
end
else
begin
UOSay('Stop');
wait(200);
end;
end;
begin
for k := 1 to 10 do
SumResult[k] := 0;
FishResult[1] := $09CC; // рыба
FishResult[2] := $09CF; // рыба
FishResult[3] := $09CE; // рыба
FishResult[4] := $09CD; // рыба
FishResult[5] := $14EB; // карты
FishResult[6] := $14EC; // карты
FishResult[7] := $0DCA; // fish net
FishResult[8] := $0DD6; // prize
scard := 0;
CurBagID := GetEmptyBag;
if CurBagID = 0 then exit;
snom := 1;
UseObject(CurBagID);
wait(1000);
checksave;
s := 0;
repeat
// подсчет количества итемов в трюме
findtype($FFFF,HatchID);
if findcount > 0 then s := s + 1;
for k := 1 to 8 do
begin
if (GetType(finditem) = FishResult[7]) then
begin
SumResult[8] := GetQuantity(finditem);
break;
end;
if (GetType(finditem) = FishResult[8]) then
begin
SumResult[9] := GetQuantity(finditem);
break;
end;
if GetType(finditem) = FishResult[k] then SumResult[k] := GetQuantity(finditem);
end;
ignore(finditem);
wait(50);
until findcount = 0;
ignorereset;
repeat
UseObject(HatchID);
wait(1000);
checksave;
FoodID := FindType($097B,backpack);
wait(500)
UseObject(FoodID);
wait(500)
UseObject(FoodID);
for x := -6 to 6 do
begin
for y := -6 to 6 do
begin
// Если схема облова другая - уберите следующую строку:
// if (y < 2) AND (x > -3) AND (x < 3) then continue;
repeat
if scard >= 250 then
begin
// взять новый мешок
CurBagID := GetEmptyBag;
if CurBagID = 0 then exit;
UseObject(CurBagID);
wait(1000);
checksave;
scard := 0;
s := s + 1;
snom := snom + 1;
end;
if TargetPresent then CancelTarget;
waitconnection(3000);
ctime := Now;
UseObject(ObjAtLayerEx(LHandLayer,self));
WaitForTarget(5000);
If TargetPresent then TargetToTile(0, GetX(self)+x, GETY(self)+y, 251);
k := 0;
repeat
wait(500);
k := k + 1;
checksave;
m1 := InJournalBetweenTimes(Mes1, ctime, Now);
m2 := InJournalBetweenTimes(Mes2, ctime, Now);
m3 := InJournalBetweenTimes(Mes3, ctime, Now);
m4 := InJournalBetweenTimes(Mes4, ctime, Now);
m5 := InJournalBetweenTimes(Mes5, ctime, Now);
m6 := InJournalBetweenTimes(Mes6, ctime, Now);
until (k > 20) or (m1<>-1) or (m2<>-1) or (m3<>-1) or (m4<>-1) or (m5<>-1);
if k > 20 then
begin
wait(4000);
k := 0;
ClearJournal;
Addtosystemjournal('Лаг с западанием на ловлю')
end;
if m1 <> -1 then
begin
k := 1;
for n := 1 to 8 do
begin
findtype(FishResult[n],ground);
if finditem = 0 then continue;
d := GetQuantity(finditem);
FlagMagic := 0;
if (n = 7) and (GetColor(finditem) = MagicF) then FlagMagic := 1;
if (n = 8) and (GetColor(finditem) = GoldenF) then FlagMagic := 2;
if (n = 5) OR (n = 6) then
MoveItem(finditem, d, CurBagID, 0, 0, 0)
else
MoveItem(finditem, d, HatchID, 0, 0, 0);
wait(1000);
checksave;
// Перепроверим, переместился ли объект
findtype(FishResult[n],ground);
if finditem > 0 then
begin
// Раз не переместился - значит был реконнект
UseObject(HatchID);
wait(1000);
checksave;
UseObject(CurBagID);
wait(1000);
checksave;
d := GetQuantity(finditem);
if (n = 5) OR (n = 6) then
MoveItem(finditem, d, CurBagID, 0, 0, 0)
else
MoveItem(finditem, d, HatchID, 0, 0, 0);
wait(1000);
checksave;
end;
if d = 0 then d := 1;
if FlagMagic = 1 then SumResult[8] := SumResult[8] + d;
if FlagMagic = 2 then SumResult[9] := SumResult[9] + d;
if FlagMagic = 3 then SumResult[10] := SumResult[10] + d;
if FlagMagic = 0 then SumResult[n] := SumResult[n] + d;
if (n = 5) OR (n = 6) then scard := scard + 1;
// Сообщения о результатах лова:
if (n <= 4) and (FlagMagic = 0) then Addtosystemjournal( inttostr(x) + inttostr(y) + ': сбросил в трюм ' + inttostr(d) + ' рыбы типа ' + inttostr(n) + ' из ' + inttostr(SumResult[n]) + '. В трюме ' + inttostr(s) + ' итемов');
if (n = 5) OR (n = 6) then Addtosystemjournal( inttostr(x) + inttostr(y) + ': сбросил в мешок N' + inttostr(snom) + ' ###карту####. Всего в мешке ' + inttostr(scard) + ' карт');
if (n = 7) then Addtosystemjournal( inttostr(x) + inttostr(y) + ': сбросил в трюм ' + inttostr(d) + ' fish net из ' + inttostr(SumResult[9]) + '. В трюме ' + inttostr(s) + ' итемов');
if (n = 8) then Addtosystemjournal( inttostr(x) + inttostr(y) + ': сбросил в трюм ' + inttostr(d) + ' prize or rate fish из ' + inttostr(SumResult[8]) + '. В трюме ' + inttostr(s) + ' итемов');
if s > 250 then exit;
end;
end;
until (m3<>-1) or (m4<>-1) or (m5<>-1);
end;
end;
ClearJournal;
Mover;
wait(500);
until False;
End.