Простой скрипт, хелп
Posted: 25.01.2012 13:24
Какнибудь можно сделать вот такой скрипт:
ТаргетНекст
ЛастОбжект
ЛастТаргет
ТаргетНекст
ЛастОбжект
ЛастТаргет
Альтернативный клиент Ultima Online
https://stealth.od.ua/forum/
Code: Select all
Program a;
var
use_type, target_type : word;
use_id, target_id :cardinal;
Begin
use_type := $1234;
target_type := $5678;
use_id := FindType(use_type, Ground);
target_id := FindType(target_type, Ground);
if (use_id > 0) and (target_id > 0) then begin
WaitTargetObject(target_id);
UseObject(use_id);
end;
Wait(3000);
End.
Ошибка вылетает:Alex wrote:Code: Select all
Program a; const use_type = $1234; target_type = $5678; var use_id, target_id :cardinal; Begin use_id = FindType(use_type, Ground); target_id = FindType(target_type, Ground); if use_id > 0 and target_id > 0 then begin WaitTargetObject(target_id); UseObject(use_id); end; Wait(3000); End.
Теперь вот такая ошибка:Vizit0r wrote:use_id = FindType(use_type, Ground);
target_id = FindType(target_type, Ground);
не = а := должно быть
Огромное спасибо, всё заработало. А как сделать чтобы скрипт не выключался, а то он делате это действаие один раз, а потом скрипт отключается.Vizit0r wrote:if (use_id > 0) and (target_id > 0) then