Page 1 of 1
Help!!!
Posted: 23.11.2005 21:58
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.
Это скрипт на арчери, немогу найти ошибку, исправьте плиз!
Posted: 23.11.2005 23:11
by Miralex
А что он делает? Или не делает?
Может на что-то ругается?
Posted: 23.11.2005 23:13
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
Posted: 23.11.2005 23:16
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.
Posted: 23.11.2005 23:24
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.
Примного благодарен я вам сударь, за то что помогли в нелёгкую минуту!
Posted: 19.07.2006 23:12
by Mightic
Кто-нибудь мог бы всунуть в этот скрипт проверку на хп противника, снимание лука, допустим при <50% здоровья и одевание при >50%?
Posted: 21.07.2006 17:33
by Alex
if HP < 50 then unequip(LHandLayer,BOWObj);
и наоборот equip() если > 50