Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7
хилинг на НДВ
-
- Posts: 2
- Joined: 03.07.2008 8:32
хилинг на НДВ
Дайте кто-то пожалуйсто скрипт просто что бы чар хилялся при Н количестве хп и хавал на шард НДВ
Code: Select all
Program Heal_Train;
{$Include 'all.inc'}
var
ctime : TDateTime;
k : integer;
max_hp : integer;
const
Bint=$0E21;
BlBint=$0E20;
HowMinBandages = 20;
WaterID=$4025BACC;
Cursa1=$4029A2F5;
Cursa2=$40408AE2;
// =======
//
// СКРИПТ НА прокачку хилинга
//
// Поставить пременные WaterID = миска с водой, Cursa[12] = 2 курсованные вещи в паке
//
// =======
procedure report(Comment : string);
begin
addtosystemjournal(Comment+' str:'+floattostr(Str)+' hp:'+floattostr(GetHP(Self)));
end;
procedure CheckBandages;
// моет грязные бинты (если есть), добирает из мешка чистые (если мало)
VAR tmpid : cardinal;
i : integer;
begin
WaitConnection(3000);
if Count(Bint) >= HowMinBandages then exit;
// проверим грязные и помоем
findtype(BlBint,backpack);
while (FindCount > 0) do
begin
WaitConnection(3000);
checksave;
useobject(FindItem);
waitfortarget(5000);
if TargetPresent then TargetToObject(WaterID);
wait(1000);
findtype(BlBint,backpack);
end;
WaitConnection(3000);
if Count(Bint) >= HowMinBandages then exit;
// бинты вымыты и их все равно меньше минимума
if FindType(Bint, Ground) = 0 then
begin
AddToSystemjournal('Warning: Кончились бинты, подложите в мешок');
repeat
wait(1000);
waitconnection(3000);
Findtype(Bint, Ground);
until finditem <> 0;
end;
i := 200;
tmpid := finditem;
if GetQuantity(tmpid) < 200 then i := GetQuantity(tmpid);
Grab(tmpid, i);
wait(1000);
checksave;
end;
procedure FullhealSelf;
Begin
FindDistance:=2;
CheckBandages;
if (Count(Bint) = 0) then
begin
report('ищим бенты');
// доберем бинтов и сбросим кровавые
FindType(Bint, Ground);
if (FindCount > 0) then
begin
Grab(finditem,200);
wait(1000);
end
else
begin
addtosystemjournal('Не нашел бинтов! Подложите на пол!');
repeat
wait(500)
FindType(Bint, Ground);
until (FindCount > 0);
Grab(finditem,200);
wait(1000);
end;
end;
// лечимся до восстановления здоровья
while (GetHP(Self) < Str) and (Count(Bint) > 0) do
begin
report('лечимся');
FindType(Bint, Backpack);
if TargetPresent then CancelTarget;
ctime := Now;
UseObject(FindItem);
WaitForTarget(5000);
If TargetPresent then TargetToObject(Self);
k := 0;
repeat
wait(100);
k := k + 1;
if k=50 then CheckLag;
until (InJournalBetweenTimes('You put the bloody bandage|barely|not need you to heal', ctime, Now)<>-1) or (k > 50);
Wait(600);
CheckLag;
end;
end;
Begin
grab(Cursa1,0);
Wait(600);
grab(Cursa2,0);
Wait(600);
CheckLag;
max_hp := Str;
while not Dead do begin
if GetHP(Self) <= (max_hp-2) then begin
CheckLag;
grab(Cursa1,0);
Wait(600);
grab(Cursa2,0);
Wait(600);
CheckLag;
FullhealSelf;
end;
Wait(600);
max_hp := Str;
CheckLag;
useobject(Cursa1);
useobject(Cursa2);
report('курсуем');
while GetHP(Self) > (max_hp-2) do begin
Wait(1000);
end;
end;
End.