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

Help!!!

тут можно задать вопрос по скриптингу
Post Reply
Sony
Posts: 3
Joined: 22.11.2005 21:57

Help!!!

Post by Sony »

Code: Select all

Program Ar4ery; 
var t: Integer; 
{$Include 'checksave.inc'}  //CheckSave 
{$Include 'hungry.inc'}     //Hungry(1,ground); 
Begin 
SetARStatus(true);{Aee??aai ?aeiiiaeoi?} 
Hungry(1,backpack);{I?iaa?yai aieia(aoaao eooaou ai ninoiyiey stuffed)} 
while true do {Caoeeeeaaai ne?eio} 
 begin 
  if Connected then 
  begin 
    for t:= 0 to 30 do 
    begin 
attack($00D8A2BA)
wait(1000)
finddistance:=0;
findtype($0F3F,backpack);
if findcount<3320 then
begin
finddistance:=2;
grab(findtype($0F3F,ground),30);
finddistance:=0;
end;
    Hungry(1,backpack); 
begin 
checksave; 
If ObjAtLayer(LhandLayer) <= 0 Then Equip(LhandLayer,findtype($13B2,ground));  
end; 
End.
Это скрипт на арчери, немогу найти ошибку, исправьте плиз!
Miralex
Developer
Developer
Posts: 656
Joined: 11.03.2005 19:12
Contact:

Post by Miralex »

А что он делает? Или не делает?
Может на что-то ругается?
Sony
Posts: 3
Joined: 22.11.2005 21:57

Post by Sony »

Miralex wrote:А что он делает? Или не делает?
Может на что-то ругается?

Code: Select all

23:13:14: Compiling
23:13:14: Compiler: [Error] (ar4eri.txt at 29:4):  Identifier expected
23:13:14: Compiling failed
23:13:14: Script ar4eri.txt stoped successfuly
Antarius
Neophyte
Neophyte
Posts: 45
Joined: 24.06.2005 20:03

Post by Antarius »

Вот держи, чуток передлал. Еду, стрелы/болты, луки/арбалеты положи рядом в радиусе 2 клеток.

Code: Select all

Program Archery;
var t: Integer;
tweapon : word;
{$Include 'all.inc'}

procedure weaponckeck;
begin
if (not dead) and (connected) then begin
if (getquantity(findtype(tweapon,ground)) > 0) and (gettype(ObjAtLayer(LhandLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Weapon Change, осталось '+inttostr(findcount));
UnEquip(LHandLayer);
wait(500);
Equip(LhandLayer,finditem);
end;
Wait(3000);
end;
end; 

Begin
finddistance:=2;
SetARStatus(true);
Hungry(1,ground);
tweapon := $13B2;
while not Dead do
 begin
  waitconnection(3000);
    for t:= 0 to 100 do
    begin
attack($00D8A2BA);
wait(1000);
findtype($0F3F,backpack);
if FindQuantity<100 then
begin
grab(findtype($0F3F,ground),300);
wait(1000);
end;
wait(9000);
end;
Hungry(1,ground);
checksave;
weaponckeck;
end;
End. 
Sony
Posts: 3
Joined: 22.11.2005 21:57

Post by Sony »

Antarius wrote:Вот держи, чуток передлал. Еду, стрелы/болты, луки/арбалеты положи рядом в радиусе 2 клеток.

Code: Select all

Program Archery;
var t: Integer;
tweapon : word;
{$Include 'all.inc'}

procedure weaponckeck;
begin
if (not dead) and (connected) then begin
if (getquantity(findtype(tweapon,ground)) > 0) and (gettype(ObjAtLayer(LhandLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Weapon Change, осталось '+inttostr(findcount));
UnEquip(LHandLayer);
wait(500);
Equip(LhandLayer,finditem);
end;
Wait(3000);
end;
end; 

Begin
finddistance:=2;
SetARStatus(true);
Hungry(1,ground);
tweapon := $13B2;
while not Dead do
 begin
  waitconnection(3000);
    for t:= 0 to 100 do
    begin
attack($00D8A2BA);
wait(1000);
findtype($0F3F,backpack);
if FindQuantity<100 then
begin
grab(findtype($0F3F,ground),300);
wait(1000);
end;
wait(9000);
end;
Hungry(1,ground);
checksave;
weaponckeck;
end;
End. 
Примного благодарен я вам сударь, за то что помогли в нелёгкую минуту!
Mightic
Posts: 8
Joined: 17.06.2005 13:15

Post by Mightic »

Кто-нибудь мог бы всунуть в этот скрипт проверку на хп противника, снимание лука, допустим при <50% здоровья и одевание при >50%?
Alex
Moderator
Moderator
Posts: 351
Joined: 07.04.2005 4:41

Post by Alex »

if HP < 50 then unequip(LHandLayer,BOWObj);


и наоборот equip() если > 50
Post Reply