Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Cartography for DW

Only working scripts
Post Reply
Alex
Moderator
Moderator
Posts: 351
Joined: 07.04.2005 4:41

Cartography for DW

Post by Alex »

Code: Select all

Program Cartography;
var t:Integer;
trash:cardinal;

{$Include 'all.inc'}

Begin
trash := $500E294F; {Задаем ID треша}
Finddistance := 0; {Ограничиваем рабиус поиска карт}
SetARStatus(true); {Включаем реконектор}
AutoMenu('you','World'); {Задаем авто ответ на меню выбора карты}
UseObject(trash); {Открываем Треш}
While NOT Dead do
begin
if connected then
begin
 for t:=1 to 10 do
 begin
 {Если нарис. карт много скидываем их в треш}
 if (Count($14EC) > 30 then
 MoveItems(BackPack, $14EC, -1, trash, 0, 0, 0, 500);
 if getquantity(findtype($14EB,ground)) > 0 then {Если закончились карты скрипт сделает дисконект и отключит реконектор}
  begin
  CheckSave;
  waittargetground($14EB);
  useskill('Cartography');
  Wait(15000);
  end
  else
  begin
  SetARStatus(false);
  Disconnect;
  end;
 end;
hungry(1,backpack);
end;
end;
End.
Last edited by Alex on 21.09.2005 22:41, edited 2 times in total.
Mightic
Posts: 8
Joined: 17.06.2005 13:15

Post by Mightic »

15:49:23: Compiler: [Error] (111:1): Unexpected end of file
Alex
Moderator
Moderator
Posts: 351
Joined: 07.04.2005 4:41

Post by Alex »

Когда копировал скрипт недовыдилил один ЕНД :D
Пробуй сейчас 8)
Acronym
Novice
Novice
Posts: 114
Joined: 10.05.2005 18:42
Location: Odessa, NDW
Contact:

Post by Acronym »

Code: Select all

Program Cartography;
// multimer*s Cartography_InfMode
// based on Alex source
// NDW: uo.od.ua
// 12*01*2007

var 
t, k, m1, m2 : Integer;
ctime : TDateTime;
// для  procedure statistic
FCart, SCart, StTimer, CurTimer : Integer;

const
AMParam='Sea Chart'; // Задаем параметры меню выбора карты  ... World Map, Sea Chart...
trash=$6020B595;  // Задаем ID треша
Mes1 = 'You are not familiar enough with the area to draw the map';
Mes2 = 'You successfully scribe the map';
blanc_map=$14EB; // тип бланкмапов
maps=$14EC; // тип нарисованных карт

{$Include 'all.inc'}

procedure statistic;
// Вывод статистики
// Формат выводимой информации:
// 12:16:26 [YourCharName]: *** Action Results ***
// 12:16:26 [YourCharName]: Average time for attempt: 16 sec.
// 12:16:26 [YourCharName]: Scribed: 45, is 32% from 140 attempts
// 12:16:26 [YourCharName]: Failures: 95, is 67% from 140 attempts
  begin
    AddToSystemJournal('*** Action Results ***');
    CurTimer := Timer;
    AddToSystemJournal('Average time for attempt: '+IntToStr(((CurTimer-StTimer)/(SCart+FCart))/1000)+' sec.');
    AddToSystemJournal('Scribe: '+IntToStr(SCart)+', is '+IntToStr(SCart*100/(SCart+FCart))+'% from '+IntToStr(SCart+FCart)+' attempts');
    AddToSystemJournal('Failures: '+IntToStr(FCart)+', is '+IntToStr(FCart*100/(SCart+FCart))+'% from '+IntToStr(SCart+FCart)+' attempts');
  end;

Begin 
WaitConnection(3000);
Finddistance := 1; // Ограничиваем радиус поиска карт, trash-a
Hungry(1);
SetARStatus(true); // Включаем реконектор
AutoMenu('you',AMParam);
UseObject(trash);  // Открываем Треш
StTimer := Timer;
While NOT Dead do 
begin 
if Connected then 
begin 
 for t:=1 to 10 do  // цикл для hungry
 begin 
  FindType(maps,backpack); // Поиск нарисованных карт в паке
  if FindCount > 50 then
     MoveItems(backpack,maps,$FFFF,trash,0,0,0,500); // Если нарис. карт много (50) кидаем в треш
  if GetQuantity(FindType(blanc_map,ground)) > 0 then // Работаем если есть бланкмапы
    begin
      CheckSave;
      ctime := Now;
      WaitTargetGround(blanc_map);
      UseSkill('Cartography');
      k := 0;
  		repeat
    		wait(100);
        k := k + 1;
  			CheckSave;
        m1 := InJournalBetweenTimes(Mes1, ctime, Now);
        m2 := InJournalBetweenTimes(Mes2, ctime, Now);
      until (m1<>-1) or (m2<>-1) or (k > 300);
      if (m1<>-1) then // Неудачная попытка +1
      FCart:=FCart+1;
      if (m2<>-1) then // Успешная попытка +1
      SCart:=SCart+1;
      Wait(10000); // (?) примерная задержка Cartography
      end
   else   // Если закончились карты скрипт сделает дисконект и отключит реконектор
      begin
        AddToSystemJournal('Low blanc_map GetQuantity');
        SetARStatus(false);
        Disconnect;
      end;
   end;
   Hungry(1);
   statistic; // можно закоментировать если не нужно
 end;
end; 
End.
Post Reply