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

подскажите с Ламбер NDW

тут можно задать вопрос по скриптингу
Nightwolf
Neophyte
Neophyte
Posts: 22
Joined: 29.11.2005 18:27
Location: Одесса
Contact:

подскажите с Ламбер NDW

Post by Nightwolf »

Code: Select all

Program LumberJacking; 
{$Include 'all.inc'} 
type LumberR = record 
   tile:word; 
   px,py,pz:integer; 
   end; 
Var LumberP: array [0..16] of LumberR; 
a,d,e : byte; 
ItemCount,b:Integer; 
Const; 
eda = $097B; 
nearX = 2532; 
nearY = 435; 
onboadx = 2535; 
onboady = 433; 
onboadz = -2; 
Trap = $5DC3421E; 
maxweight = 185; 
logType = $1BDD; 
AxeType = $0F43; 
AxeGump = '3907'; 
TinkGump = '7865'; 
Tinktype = $1EB9; 
CopperType = $1BF2; 

{$Include 'all.inc'} 

procedure checkdead; 
Begin 
if Dead then 
begin 
AddToSystemJournal('?a? ia?oa. A?aiy nia?oe: '+TimeToStr(now)+' (c)Aieoi? O?aieeiooaei'); 
FullDisconnect; 
end 
End; 



Procedure GetLumberTiles(s:String;WPos:Integer); 
begin 
   s := s + ' '; 
   LumberP[WPos].tile:=StrToInt(Copy(s,1,Pos(' ',s)-1)); 
   Delete(s,1,Pos(' ',s)); 
   LumberP[WPos].px:=StrToInt(Copy(s,1,Pos(' ',s)-1)); 
   Delete(s,1,Pos(' ',s)); 
   LumberP[WPos].py:=StrToInt(Copy(s,1,Pos(' ',s)-1)); 
   Delete(s,1,Pos(' ',s)); 
   LumberP[WPos].pz:=StrToInt(Copy(s,1,Pos(' ',s)-1)); 
   Delete(s,1,Pos(' ',s)); 
end; 

Procedure GetCoord; 
var 
   List:TStringList; 
   b:integer; 
begin 
   List:=TStringList.Create; 
   List.LoadFromFile('C:\Downloads\Stealth_v1.0 (RC 3)\Scripts\Include\ltiles.txt'); 
   for b := 0 to List.Count-1 do 
      GetLumberTiles(List.strings[b],b); 
   ItemCount:=b; 
end; 

procedure hodilka(x,y,prec : integer; runflag : boolean); 
   // x,y - eii?aeiaou, a eioi?ua eaai 
   // prec - oi?iinou iiaoiaa 
   // runflag - aa?aou eee eaoe 
   // v. 1.04 (n) Edred, ne?eio ii?oe?iaai n ei?aeoa 
   // i?eaeiaeuiay aa?ney Yoko n ai?aaioeie AGRS e Edred. 
   var ld, ldc, dx, dy, mx, my : Integer; 
   begin 
        ld := 0;   ldc := 0;   d := 0;     e := 2; 
   AddToSystemJournal('e ooo Inoaia iiianeiii'); 
     while true do 
        begin 
         dx := GetX(self) - x; if dx < 0 then dx := 0 - dx; 
         dy := GetY(self) - y; if dy < 0 then dy := 0 - dy; 
         if dy > dx then dx := dy; 
         if dx <= prec then exit; 
         mx := GetX(self); my := GetY(self); 
         dx := mx - x; if dx < 0 then dx := 0 - dx; 
         dy := my - y; if dy < 0 then dy := 0 - dy; 
         if dy > dx then dx := dy; 
         if dx <= prec then exit; 
         if ld = dx then begin 
            ldc := ldc + 1; 
           if ldc > 4 then begin 
             addtosystemjournal( 'GotoXY: Cannot reach location!' ); 
             a := 0 
             repeat 
             Raw_Move(d,runflag); 
             a := a+1 
             until a = e 
             d := d + 2; 
             If d = 8 then d:=0 e:= e+1 ldc :=0 
              end; 
         end 
         else ld := dx; 
         waitconnection(5000); 
         if mx = x then begin 
            if my = y then exit; 
            // North 
            if my > y then begin Raw_Move(0,runflag); continue; end; 
            // South 
            Raw_Move(4,runflag); continue; 
         end; 
         if mx < x then begin 
            // Northeast 
            if my > y then begin Raw_Move(1,runflag); continue; end; 
            // East 
            if my = y then begin Raw_Move(2,runflag); continue; end; 
            // Southeast 
            Raw_Move(3,runflag); continue; 
         end; 
         // Southwest 
         if my < y then begin Raw_Move(5,runflag); continue; end; 
         // West 
         if my = y then begin Raw_Move(6,runflag); continue; end; 
         // Nortwest 
         Raw_Move(7,runflag); continue; 
      end; 
   end; 


procedure checkcoord; 
begin 
CheckSave; 
checkdead; 
begin 
if (GetZ(self) = OnBoadZ) then  begin 
AddToSystemJournal('iiaoiaei e o?aio') 
hodilka(OnBoadX,OnBoadY,0, true); 
wait(3000); 
{if (GetX(self) = OnBoadX) and (GetY(self) = OnBoadY) then  begin 
AddToSystemJournal('noiaei ia aa?aa')} 
repeat 
UseObject(Trap); 
wait(1000); 
hodilka(nearX,nearY,0, true); 
until (GetX(self) = nearX) and (GetY(self) = nearY); 
AddToSystemJournal('Noia ia aa?aa caaa?oai oniaoii'); 
end 
end 
end; 


procedure CheckAxe; 
Begin 
AddToSystemJournal('I?iaa?yai eino?oiaio'); 
WaitConnection(3000); 
CheckSave; 
if (Count(AxeType) < 2) then 
begin 
begin 
FindType(Tinktype,ground); 
if FindCount < 2 then 
begin 
UseObject(FindType(TinkType,ground)); 
WaitTargetobject(findtype(CopperType,ground)); 
WaitGump(TinkGump) 
wait(500); 
WaitJournalLine(Now, 'You create|destroy|You put', 30000); 
Drophere(FindType(TinkType,backpack)); 
end 
else 
begin 
repeat 
WaitConnection(3000); 
CheckSave; 
checkdead; 
FindType(CopperType,ground); 
if FindCount > 0 then 
begin 
UseObject(FindType(TinkType,ground)); 
WaitTargetobject(findtype(CopperType,ground)); 
WaitGump(AxeGump); 
wait(500); 
WaitJournalLine(Now, 'You create|destroy|You put', 30000); 

end 
else 
begin 
AddToSystemJournal('Ia iaeaai Copper, ia iiao naaeaou ee?ie!!!'); 
FullDisconnect; 
end 
until Count(AxeType) >= 2 
end 

end 

FindType(TinkType,ground); 
Addtosystemjournal('Ooecia ia caiea '+intToStr(findfullquantity)+'!'); 
FindType(CopperType,ground); 
Addtosystemjournal('Iaoaeea ia caiea '+intToStr(findfullquantity)+'!'); 
end 
End; 



procedure DropLog; 
var g : integer; 
logCol : Array [0..16] of Word; 
Begin 
finddistance := 2; 
CheckSave; 
AddToSystemJournal('aua?anuaa? aa?aai a eiaeo'); 
logCol[0] := $0000; // normum 
logCol[1] := $000B; // elkris 
logCol[2] := $0362; // jade 
logCol[3] := $010D; // oak 
logCol[4] := $0094; // karund 
logCol[5] := $01B0; // leshram 
logCol[6] := $01A2; // turmalit 
logCol[7] := $0026; // emerint 
logCol[8] := $00CB; // legrand 
logCol[9] := $094A; // solmur 
logCol[10] := $092B; // kleor 
logCol[11] := $0931; // logradum 
logCol[12] := $093F; // vialonit 
logCol[13] := $0074; // stardust 
logCol[14] := $09EF; // pironil 
logCol[15] := $006F; // mystic 
logCol[16] := $0119; // elvin 
for g := 0 to 16 do 
begin 
CheckSave; 
FindTypeEx(logType,logCol[g],backpack,true); 
if FindCount > 0 then 
begin 
stack(logType,logCol[g]); 
wait(500); 
end 
end 
findtype (eda,ground); 
Addtosystemjournal('Aau ia caiea '+intToStr(findfullquantity)+'!'); 
hungry (1,ground); 
End; 

procedure GotoOnBoad; 
{Aica?ao e eiaea} 
Begin 
CheckSave; 
checkdead; 
hodilka( nearX, nearY, 0,true); 
  repeat 
  UseObject(Trap); 
  wait(1000); 
  until (GetX(self) = OnBoadX) and (GetY(self) = OnBoadY); 
CheckAxe; 
End; 

procedure CheckEquip; 
{I?iaa?ea yeeie?iaee} 
   Var EquipAxe : Cardinal; 
 Begin 
 AddToSystemJournal('i?iaa?ea oiii?a'); 
  if GetType(ObjAtLayer(LhandLayer)) <> AxeType then 
     begin 
      Disarm; 
      wait(1000); 
      FindType(AxeType, backpack); 
      if findCount < 2 then 
       begin 
       GotoOnBoad; 
       end 
        else 
       begin 
       EquipAxe := finditem; 
       Equip(LhandLayer, EquipAxe); 
       end 
      end 
 checkdead; 
 End; 

Function Lumber(tile:Word;x,y,z:Integer):boolean; 
{?oaea aa?aaa} 
 begin 
 CheckEquip; 
 WaitTargetTile(tile,x,y,z); 
 UseObject(ObjAtLayer(LhandLayer)); 
 WaitJournalLine(now,'enough|how to use|broke|stop|can''t see|far away', 60000); 
 End; 


procedure checkweight; 
{I?iaa?ea aana} 
begin 
if (Weight > MaxWeight) then  begin 
AddToSystemJournal('Ia?aai?'); 
GotoOnBoad; 
DropLog; 
end 
checkcoord; 
end; 

{Eieoeaeecaoey ne?eioa} 
BEGIN 
SetArStatus(true); 
getcoord; 
ClearJournal; 
AddToSystemJournal('ne?eio caiouai'); 
While (not Dead) do 
 begin 
 for b :=0 to 16 do 
 begin 
  WaitConnection(3000); 
  CheckSave; 
  CheckDead; 
  CheckCoord; 
  CheckWeight; 

   begin 
    Addtosystemjournal('Eao a oi?eo '+intToStr(LumberP[b].px)+', '+intToStr(LumberP[b].py)+'!'); 
    hodilka(LumberP[b].px,LumberP[b].py,1,true); 
    Addtosystemjournal('Tree number '+intToStr(b)+'!'); 
    Lumber(LumberP[b].tile,LumberP[b].px,LumberP[b].py,LumberP[b].pz); 
   end 

  end 
  end 
end.
20:56:01 [Slipknot]: Script lumberjacking.txt stoped successfuly
20:57:17 [Slipknot]: Compiling
20:57:17 [Slipknot]: Compiler: [Error] (lumberjacking.txt at 10:6): Identifier expected
20:57:17 [Slipknot]: Compiling failed
20:57:17 [Slipknot]: Script lumberjacking.txt stoped successfuly
йа хз в чем трабла :( :arrow:
В моём доме буит играть музыка, но я её не услышу %(
CFA
Developer
Developer
Posts: 492
Joined: 20.04.2006 6:03
Contact:

Re: подскажите с Ламбер NDW

Post by CFA »

всего навсего надо взглянуть на 10 строку, как сказано в ошибке и подумать что там не так.
ItemCount,b:Integer;
Const;
eda = $097B;
Nightwolf
Neophyte
Neophyte
Posts: 22
Joined: 29.11.2005 18:27
Location: Одесса
Contact:

Post by Nightwolf »

Code: Select all

35:22 [Slipknot]: Compiling
18:35:22 [Slipknot]: Compiler: [Error] (checksave.inc at 1:11):  Duplicate identifier 'CHECKSAVE'
18:35:22 [Slipknot]: Compiling failed
18:35:22 [Slipknot]: Script lumberjacking.txt stoped successfuly
убрал точкузапятую после конст, теперь вот это выдает :(
В моём доме буит играть музыка, но я её не услышу %(
Acronym
Novice
Novice
Posts: 114
Joined: 10.05.2005 18:42
Location: Odessa, NDW
Contact:

Post by Acronym »

aka Trickster [YGG]
current version: 1.0 [RC3]
Shinoby
Posts: 3
Joined: 01.04.2008 17:51

Post by Shinoby »

Не ну вы гоните! Что сложно сказать где ошибка, что б парень знал на будушее?!
Исправь на

eda := $097B;

2 точки перед равно присваивают значение переменной, а если просто = то сравнивает.
CFA
Developer
Developer
Posts: 492
Joined: 20.04.2006 6:03
Contact:

Post by CFA »

в случае с константами используется =, а не := тут все правильно. у него 2 раза всетречается {$include 'all.inc'} что в итоге и дает "Duplicate identifier 'CHECKSAVE'"
Acronym
Novice
Novice
Posts: 114
Joined: 10.05.2005 18:42
Location: Odessa, NDW
Contact:

Post by Acronym »

Shinoby wrote: Не ну вы гоните! Что сложно сказать где ошибка, что б парень знал на будушее?!
Mr. Darlok, kак раз для того чтобы знал на будущее и были даны ссылки.


PS: накорми человека рыбой и он будет сыт один день, научи его ловить рыбу и он будет сыт каждый день...
aka Trickster [YGG]
current version: 1.0 [RC3]
Nightwolf
Neophyte
Neophyte
Posts: 22
Joined: 29.11.2005 18:27
Location: Одесса
Contact:

Post by Nightwolf »

хехе пасиб, разобрался.. йа не такой потеряный;) просто 2 года не играл... :P
В моём доме буит играть музыка, но я её не услышу %(
Nightwolf
Neophyte
Neophyte
Posts: 22
Joined: 29.11.2005 18:27
Location: Одесса
Contact:

d

Post by Nightwolf »

тысяча чертей..
нашел новое место для ламба, поставил лодку, все как полагается.. переделал скрипт и тут ошибка:

Code: Select all

21:24:56 [Freak]: Compiler: [Hint] (lamberjacking.txt at 378:10):  Variable 'Result' never used
21:24:56 [Freak]: Compiled succesfully
21:24:56 [Freak]: Out Of Range at 42.218
21:24:56 [Freak]: Script lamberjacking.txt stoped successfuly
что бы это могло бы быть? -(
пдскажите плиз


скрипт забыл://

Code: Select all

Program LumberJacking;
type LumberR = record
  tile:word;
  px,py,pz:integer;
  end;
Var LumberP: array [0..38] of LumberR;
ItemCount,b:Integer;
Const
eda = $097B;
nearX = 3321;
nearY = 472;
onboadx = 3318;
onboady = 472;
onboadz = -2;
Trap = $5F94813D;
maxweight = 315;
logType = $1BDD;
AxeType = $0F43;
AxeGump = '3907';
TinkGump = '7865';
Tinktype = $1EB9;
CopperType = $1BF2;

{$Include 'all.inc'}

procedure CheckDead;
var SayTimer : Cardinal;
begin
SayTimer := 0;
WaitConnection(3000);
CheckSave;
if Dead then



begin
SetWarMode(true);
WaitGump('1');
wait(2000);
while (Dead) do
   begin
   //uosay('.forgivethee')
   WaitGump('1');
   if Timer > (SayTimer + (5 * 60 * 1000)) then
       begin
       UOSay('.c I''m was killed');
       SayTimer := Timer;
       SetWarMode(true);
       end;
   Wait (1000);
   end;
WaitConnection(3000);
CheckSave;
CheckTargetError(5, 2);
WaitConnection(3000);
CheckSave;
Hungry(1,ground);
end
end;

procedure moving(x,y,prec : integer; runflag : boolean);
  // x,y - координаты, в которые идем
  // prec - точность подхода
  // runflag - бежать или идти
  // v. 1.04 (с) Edred, скрипт портирован с инжекта
  // оригинальная версия Yoko с доработкой AGRS и Edred.
  var ld, ldc, dx, dy, mx, my,a,d,e : Integer;
  begin
       ld := 0;   ldc := 0;   d := 0;     e := 2;
  AddToSystemJournal('Поехали... ');
    while true do
       begin
        dx := GetX(self) - x; if dx < 0 then dx := 0 - dx;
        dy := GetY(self) - y; if dy < 0 then dy := 0 - dy;
        if dy > dx then dx := dy;
        if dx <= prec then exit;
        mx := GetX(self); my := GetY(self);
        dx := mx - x; if dx < 0 then dx := 0 - dx;
        dy := my - y; if dy < 0 then dy := 0 - dy;
        if dy > dx then dx := dy;
        if dx <= prec then exit;
        if ld = dx then begin
           ldc := ldc + 1;
          if ldc > 4 then begin
            addtosystemjournal( 'GotoXY: Дерево мешает!' );
            a := 0
            repeat
            Raw_Move(d,runflag);
            a := a+1
            until a = e
            d := d + 2;
            If d = 8 then d:=0 e:= e+1 ldc :=0
             end;
        end
        else ld := dx;
        waitconnection(5000);
        if mx = x then begin
           if my = y then exit;
           // North
           if my > y then begin Raw_Move(0,runflag); continue; end;
           // South
           Raw_Move(4,runflag); continue;
        end;
        if mx < x then begin
           // Northeast
           if my > y then begin Raw_Move(1,runflag); continue; end;
           // East
           if my = y then begin Raw_Move(2,runflag); continue; end;
           // Southeast
           Raw_Move(3,runflag); continue;
        end;
        // Southwest
        if my < y then begin Raw_Move(5,runflag); continue; end;
        // West
        if my = y then begin Raw_Move(6,runflag); continue; end;
        // Nortwest
        Raw_Move(7,runflag); continue;
     end;
  end;

Procedure Kill(Enemy:Cardinal);
var
  RTime:Cardinal;
begin

  UOSay('.guards')
  RTime:=Timer;
  While (GetDistance(Enemy)<15) and (Timer < (RTime + (10 *1000))) do
  begin
     if life <80 then
        UOSay('Heal');
     Wait(1000);
  end;

end;

Procedure DangerCheak;
var
  Enemy:array[1..100] of Cardinal;
  i:Integer;
begin
finddistance:=20;
  Enemy[1] := $0010;
  Enemy[2] := $0096;
  Enemy[3] := $000C; //гв
  Enemy[4] := $031F; //Драгон дура
  Ignore(Self);
  for i:=1 to 4 do
  begin
     FindType(Enemy[i],ground);
     if FindCount>0 then
        Kill(FindItem);
  end;
  finddistance:=2;
end;

Procedure GetLumberTiles(s:String;WPos:Integer);
begin
  s := s + ' ';
  LumberP[WPos].tile:=StrToInt(Copy(s,1,Pos(' ',s)-1));
  Delete(s,1,Pos(' ',s));
  LumberP[WPos].px:=StrToInt(Copy(s,1,Pos(' ',s)-1));
  Delete(s,1,Pos(' ',s));
  LumberP[WPos].py:=StrToInt(Copy(s,1,Pos(' ',s)-1));
  Delete(s,1,Pos(' ',s));
  LumberP[WPos].pz:=StrToInt(Copy(s,1,Pos(' ',s)-1));
  Delete(s,1,Pos(' ',s));
end;

Procedure GetCoord;
var
  List:TStringList;
  b:integer;
begin
  List:=TStringList.Create;
  List.LoadFromFile('C:\Downloads\Stealth_v1.0 (RC 3)\Scripts\Include\ttt.txt');
  for b := 0 to List.Count-1 do
     GetLumberTiles(List.strings[b],b);
  ItemCount:=b;
end;

procedure checkcoord;
begin
CheckSave;
checkdead;
DangerCheak;
begin
if (GetZ(self) = OnBoadZ) then  begin
AddToSystemJournal('подходим к трапу')
moving(OnBoadX,OnBoadY,0, true);
wait(3000);
{if (GetX(self) = OnBoadX) and (GetY(self) = OnBoadY) then  begin
AddToSystemJournal('сходим на берег')}
repeat
UseObject(Trap);
wait(1000);
moving(nearX,nearY,0, true);
until (GetX(self) = nearX) and (GetY(self) = nearY);
AddToSystemJournal('Сход на берег завершен успешно');
end
end
end;


procedure CheckAxe;
Begin
AddToSystemJournal('Проверяем инструмент');
WaitConnection(4000);
CheckSave;
DangerCheak;
if (Count(AxeType) < 2) then
begin
begin
FindType(Tinktype,ground);
if FindCount < 2 then
begin
UseObject(FindType(TinkType,ground));
WaitTargetobject(findtype(CopperType,ground));
WaitGump(TinkGump)
wait(500);
WaitJournalLine(Now, 'You create|destroy|You put', 30000);
Drophere(FindType(TinkType,backpack));
end
else
begin
repeat
WaitConnection(4000);
CheckSave;
DangerCheak;
checkdead;
FindType(CopperType,ground);
if FindCount > 0 then
begin
UseObject(FindType(TinkType,ground));
WaitTargetobject(findtype(CopperType,ground));
WaitGump(AxeGump);
wait(500);
WaitJournalLine(Now, 'You create|destroy|You put', 30000);

end
else
begin
AddToSystemJournal('Не найден Copper, не могу сделать кирок!!!');
Disconnect;
end
until Count(AxeType) >= 2
end

end

FindType(TinkType,ground);
Addtosystemjournal('Тулзов на земле '+intToStr(findfullquantity)+'!');
FindType(CopperType,ground);
Addtosystemjournal('Металла на земле '+intToStr(findfullquantity)+'!');
end
End;


procedure DropTreshLog;
var f : integer;
logCol : Array [0..20] of Word;
Begin
finddistance := 2;
CheckSave;
DangerCheak;
logCol[1] := $0000; // normum
logCol[2] := $0362; // jade
logCol[3] := $010D; // oak
logCol[4] := $0094; // karund
logCol[5] := $01B0; // leshram
logCol[6] := $01A2; // turmalit
logCol[7] := $0026; // emerint
logCol[8] := $00CB; // legrand
logCol[9] := $094A; // solmur
logCol[10] := $092B; // kleor
logCol[11] := $0931; // logradum
logCol[12] := $093F; // vialonit
logCol[13] := $0074; // stardust
logCol[14] := $09EF; // mystic
logCol[15] := $006F; // pironil
logCol[16] := $0119; // elvin
logCol[17] := $000B; // elkris

for f := 1 to 17 do
begin
CheckSave;
DangerCheak;
FindTypeEx(logType,logCol[f],backpack,true);
if FindCount > 0 then
begin
stack(logType,logCol[f]);
wait(1000);
end
end
End;

procedure DropLog;
var g : integer;
logCol : Array [1..17] of Word;
Begin
IgnoreReset;
finddistance := 2;
CheckSave;
AddToSystemJournal('выбрасываю дерево в лодку');
logCol[1] := $0000; // normum
logCol[2] := $0362; // jade
logCol[3] := $010D; // oak
logCol[4] := $0094; // karund
logCol[5] := $01B0; // leshram
logCol[6] := $01A2; // turmalit
logCol[7] := $0026; // emerint
logCol[8] := $00CB; // legrand
logCol[9] := $094A; // solmur
logCol[10] := $092B; // kleor
logCol[11] := $0931; // logradum
logCol[12] := $093F; // vialonit
logCol[13] := $0074; // stardust
logCol[14] := $09EF; // pironil
logCol[15] := $006F; // mystic
logCol[16] := $0119; // elvin
logCol[17] := $000B; // elkris


for g := 1 to 17 do
begin
CheckSave;
DangerCheak;
FindTypeEx(logType,logCol[g],backpack,true);
if FindCount > 0 then
begin
stack(logType,logCol[g]);
wait(500);
end
end
findtype (eda,ground);
Addtosystemjournal('Еды на земле '+intToStr(findfullquantity)+'!');
hungry (1,ground);
End;

procedure GotoOnBoad;
{Возврат к лодке}
Begin
CheckSave;
checkdead;
DangerCheak;
moving( nearX, nearY, 0,true);
 repeat
 UseObject(Trap);
 wait(2000);
 until (GetX(self) = OnBoadX) and (GetY(self) = OnBoadY);
 DropLog;
CheckAxe;
End;

procedure CheckEquip;
{Проверка экипировки}
  Var EquipAxe : Cardinal;
Begin
AddToSystemJournal('проверка топора');
 if GetType(ObjAtLayer(LhandLayer)) <> AxeType then
    begin
     Disarm;
     wait(1000);
     FindType(AxeType, backpack);
     if findCount < 2 then
      begin
      GotoOnBoad;
      end
       else
      begin
      EquipAxe := finditem;
      Equip(LhandLayer, EquipAxe);
      end
     end
checkdead;
End;

Function Lumber(tile:Word;x,y,z:Integer):boolean;
{Рубка дерева}
begin
DangerCheak;
CheckEquip;
WaitTargetTile(tile,x,y,z);
UseObject(ObjAtLayer(LhandLayer));
WaitJournalLine(now,'enough|how to use|broke|stop|can''t see|far away', 60000);
End;


procedure checkweight;
{Проверка веса}
begin
DangerCheak;
if (Weight > MaxWeight) then  begin
AddToSystemJournal('Перебор');
GotoOnBoad;
end
checkcoord;
end;

{Инициализация скрипта}
BEGIN
SetArStatus(true);
getcoord;
ClearJournal;
AddToSystemJournal('скрипт запущен');
While true do
begin
for b :=0 to 14 do
begin
 WaitConnection(3000);
 CheckSave;
 DangerCheak;
 CheckDead;
   CheckCoord;
 CheckWeight;

  begin
   Addtosystemjournal('Иду в точку '+intToStr(LumberP[b].px)+', '+intToStr(LumberP[b].py)+'!');
   moving(LumberP[b].px,LumberP[b].py,1,true);
   Addtosystemjournal('Tree number '+intToStr(b)+'!');
   Lumber(LumberP[b].tile,LumberP[b].px,LumberP[b].py,LumberP[b].pz);
  end

 end
 end
end.

В моём доме буит играть музыка, но я её не услышу %(
Nightwolf
Neophyte
Neophyte
Posts: 22
Joined: 29.11.2005 18:27
Location: Одесса
Contact:

Post by Nightwolf »

Code: Select all

Function Lumber(tile:Word;x,y,z:Integer):boolean; 
Вроде в этои строке трабл, я пытался ее заменить на "Procedure" ... оно выбило уже другую ошибку.. плинъ( :x
В моём доме буит играть музыка, но я её не услышу %(
Vladimirus
Neophyte
Neophyte
Posts: 17
Joined: 12.11.2006 10:07
Contact:

Post by Vladimirus »

настоятельно рекомендую почитать форум ндв и перестать задавать дурацкие вопросы, которые были уже разжеваны там туеву кучу раз.
Nightwolf
Neophyte
Neophyte
Posts: 22
Joined: 29.11.2005 18:27
Location: Одесса
Contact:

Post by Nightwolf »

тебя никто не просил комментирывать мои вопросы, следи за своими.
В моём доме буит играть музыка, но я её не услышу %(
Vladimirus
Neophyte
Neophyte
Posts: 17
Joined: 12.11.2006 10:07
Contact:

Post by Vladimirus »

тебя никто не просил брать мой скрипт и пользоваться им.
P.s. если не хочешь глупых ответов -не задавай глупых вопросов.
Nightwolf
Neophyte
Neophyte
Posts: 22
Joined: 29.11.2005 18:27
Location: Одесса
Contact:

Post by Nightwolf »

с чего это ты взял, что скрипт твои? :lol:
В моём доме буит играть музыка, но я её не услышу %(
Edred
Moderator
Moderator
Posts: 559
Joined: 28.03.2006 21:29

Post by Edred »

Nightwolf
Настоятельно рекомендую вести себя повежливее со всеми участниками форума. Это ты просишь о помощи, это тебе нужен совет. Принцип "этого пошлем, а у этого попросим помощи" здесь врядли прокатит. Наиболее вероятной реакцией будет всеобщий игнор твоих просьб.
Nightwolf wrote:тебя никто не просил комментирывать мои вопросы, следи за своими.
Он тебе сделал совершенно справедливое замечание, потому как буквально пару дней назад я в одной из соседних тем на точно такой же вопрос подробнейше ответил. Это, естественно, не считая того, что такой вопрос задавали здесь уже раз 200.
Post Reply