кто что сможет упростить? покритиковать? подсказать?
(GetSkillValue не работает, посему паузы и кол-во шагов от велечины скилов реализовать нет возможности)
var sTime : TDateTime; - в основном скрипте
Code: Select all
procedure Hide; // Прячемся
// ======================
// You have hidden yourself well 501240 // cliloc# 0xA5F8
// You fail to hide. 501241 // cliloc# 0xA5F9
// You must wait a few moments to use another skill. 500118 // cliloc# 0xA196
// ======================
begin
while not Hidden do
begin
if TargetPresent then CancelTarget;
if isWarMode(Self) = true Then SetWarMode(false);
sTime := Now;
AddToSystemJournal('Прячусь');
UseSkill('Hiding');
wait(500);
If (InJournalBetweenTimes('cliloc# 0xA196',sTime,Now)<>-1) Then Continue;
repeat
wait(100);
checksave;
until (InJournalBetweenTimes('cliloc# 0xA5F8|cliloc# 0xA5F9',sTime,Now)<>-1);
end;
wait(500);
end;
Code: Select all
procedure Stealth; // Невидимость
// ======================
// You begin to move quietly. // 502730 // cliloc# 0xABCA
// You fail in your attempt to move unnoticed. 502731 // cliloc# 0xABCB
// You must hide first 502725 // cliloc# 0xABC5
// You are not hidden well enough. Become better at hiding. 502726 // cliloc# 0xABC6
// ======================
begin
if not Hidden then
begin
While not Hidden Do
begin
AddToSystemJournal('Прячусь St 1');
UseSkill('Hiding');
wait(1000);
If (InJournalBetweenTimes('cliloc# 0xA196',sTime,Now)<>-1) Then Continue;
repeat
wait(500);
checksave;
// CheckDead;
until (InJournalBetweenTimes('cliloc# 0xA5F8|cliloc# 0xA5F9',sTime,Now)<>-1);
end;
wait(5000);
end;
if Hidden then
begin
sTime := Now;
While not (InJournalBetweenTimes('cliloc# 0xABCA',sTime,Now)<>-1) Do
begin
AddToSystemJournal('Включаю Стелс');
UseSkill('Stealth');
wait(1000);
If (InJournalBetweenTimes('cliloc# 0xABC5|cliloc# 0xABC6',sTime,Now)<>-1) or (not Hidden) Then
begin
While not Hidden Do
begin
AddToSystemJournal('Прячусь St 0');
UseSkill('Hiding');
wait(1000);
If (InJournalBetweenTimes('cliloc# 0xA196',sTime,Now)<>-1) Then Continue;
repeat
wait(500);
checksave;
// CheckDead;
until (InJournalBetweenTimes('cliloc# 0xA5F8|cliloc# 0xA5F9',sTime,Now)<>-1);
end;
wait(5000);
end;
If (InJournalBetweenTimes('cliloc# 0xA196',sTime,Now)<>-1) Then Continue;
repeat
wait(500);
checksave;
// CheckDead;
until (InJournalBetweenTimes('cliloc# 0xABCA|cliloc# 0xABCB',sTime,Now)<>-1);
end;
end;
wait(500);
end;
из-за постоянных - надо подождать ('cliloc# 0xA196')...