Code: Select all
Compiling
Compiled succesfully
Weapon Change, найдено 1
Neck Change, найдено 1
Ring Change, найдено 1
Resself. Enter
Weapon Change, найдено 0
Neck Change, найдено 0
Ring Change, найдено 0
Resself. Exit
Вот сам скрипт(в задумке скрипт должен быть на резист
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Code: Select all
Program xxxxxxx;
var
t:integer;
enemy1,enemy2:cardinal;
tweapon,tropjetka,tkolco:word;
{$Include 'all.inc'}
procedure FullDisconnect;
begin
SetARStatus(false);
Disconnect;
end;
procedure weaponckeck;
begin
Finddistance:=1;
if (not dead) and (connected) then begin
checksave;
if (getquantity(findtype(tweapon,ground)) > 0) and (gettype(ObjAtLayer(RhandLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Weapon Change, найдено '+inttostr(findcount));
UnEquip(RHandLayer);
wait(500);
Equip(RhandLayer,finditem);
end;
Wait(3000);
checksave;
if (getquantity(findtype(tropjetka,ground)) > 0) and (gettype(ObjAtLayer(NeckLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Neck Change, найдено '+inttostr(findcount));
UnEquip(NeckLayer);
wait(500);
Equip(NeckLayer,finditem);
end;
checksave;
if (getquantity(findtype(tkolco,ground)) > 0) and (gettype(ObjAtLayer(RingLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Ring Change, найдено '+inttostr(findcount));
UnEquip(RingLayer);
wait(500);
Equip(RingLayer,finditem);
end;
end;
end;
procedure resself;
begin
AddToSystemJournal('Resself. Enter');
WaitConnection(3000);
checksave;
UOSay('.forgivethee');
Wait(1000);
WaitGump('1');
setwarmode(true);
while dead do wait(1000);
if findtype($2006,ground) > 0 then begin
if targetpresent then canceltarget;
waittargetobject(finditem);
useobject(findtype($0F51,backpack));
wait(1000);
end;
hungry(1,ground);
weaponckeck;
Wait(30000);
UOSay('Thank');
AddToSystemJournal('Resself. Exit');
end;
Begin
SetARStatus(true);
Finddistance:=1;
{--------------------------------------}
ENEMY1 := $013AB4F0;
ENEMY2 := $01357DF4;
tweapon := $13B5;
tropjetka := $1088;
tkolco := $108A;
{--------------------------------------}
while true do begin
if connected then begin
for t:=1 to 5 do begin
WaitConnection(2000);
if dead then begin
resself;
end;
attack(enemy1);
attack(enemy2);
checksave;
wait(3000);
end;
hungry(1,ground);
end;
Wait(100);
end;
End.