script onli stealth 5.0+ test
Скрипт для тестового стелса. По одной просьбе. Не работает на стелсах старее 5 ой версии.
Code: Select all
program taming;
const
Iam=$00009E75 ; //My ID
var
FindTarget: cardinal;
Infotool:cardinal;
//h,i,j:integer;
k:Boolean;
ctime: TDateTime;
//TameTarget:cardinal;
procedure init;
begin
finddistance := 50;
FindVertical := 5;
k:=true;
end;
procedure TamePet(Infotool:cardinal);
var
jj:integer;
begin
jj:=PetsCurrent;
AddToSystemJournal('1');
if (PetsCurrent>0) then Uosay('all come');
newmovexy(GetX(Infotool),GetY(Infotool),True,1,false);
repeat
newmovexy(GetX(Infotool),GetY(Infotool),True,1,false);
ctime:=now;
If TargetPresent Then CancelTarget;
useskill('Animal Taming');
WaitTargetObject(Infotool);
repeat
AddToSystemJournal('2');
wait(1000);
newmovexy(GetX(Infotool),GetY(Infotool),True,1,false);
until dead or (inJournalBetweenTimes('You fail to tame|seems to accept you as master|That wasn''t even challenging|That is too far away|That creature cannot be tamed|no chance of taming|You seem to anger the beast|Someone else is already taming this|animal looks tame already|The animal is too angry to continue taming|do not have a clear path to the animal you are taming|too many followers to tame| cannot be tamed', ctime, Now)>0)or (GetX(Infotool)=0) or not k;
AddToSystemJournal('3');
until dead or (inJournalBetweenTimes('seems to accept you as master|That wasn''t even challenging|That creature cannot be tamed|no chance of taming|animal looks tame already|The animal is too angry to continue taming|do not have a clear path to the animal you are taming|too many followers to tame|cannot be tamed', ctime, Now)>0) or (GetX(Infotool)=0) or not k;
AddToSystemJournal('4');
//|You seem to anger the beast
if (PetsCurrent>0) then Uosay('all come');
{ while GetName(Infotool) <> '123' do
begin
RenameMobile(Infotool,'123') ;
wait(500);
AddToSystemJournal('Имя = '+GetName(Infotool));
end; }
//AddToSystemJournal('2');
If TargetPresent Then CancelTarget;
{ while (PetsCurrent>jj) and k do
begin
RequestContextMenu(Infotool);
wait(500);
SetContextMenuHook(Infotool,9);
WaitGump('2');
wait(500);
end;
If TargetPresent Then CancelTarget; }
Uosay('Следующий');
end;
procedure Unicode_Speech_stop(text,SenderName : String; SenderID : Cardinal);
begin
if (text='start') then
k:=true;
end;
procedure Unicode_Speech(text,SenderName : String; SenderID : Cardinal);
begin
AddToSystemJournal('Event! Unicode Speech: SenderID = $'+ IntToHex(SenderID,8) + ' ; SenderName = ' + SenderName + '; SenderText : ' + text);
if (text='stop') then
begin
k:=false;
while not k do
begin
uosay('fdgvbsdfbgvfd');
wait(1000);
end;
end;
{)If TargetPresent Then CancelTarget;
CancelWaitTarget;
FindTarget:=$00009E75;
TargetToObject(self);
If TargetPresent Then CancelTarget;
CancelWaitTarget;
FindTarget:=$00009E75;
TargetToObject(self);
end;
if (text='start') then
k:=true; }
end;
begin
init;
IgnoreReset;
FindTarget:=Iam;
SetEventProc(evUnicodeSpeech,'Unicode_Speech');
SetEventProc(evUnicodeSpeech,'Unicode_Speech_stop');
while not dead do
begin
CancelWaitTarget;
If TargetPresent Then CancelTarget;
ClientRequestObjectTarget;
wait(4000);
WaitForClientTargetResponse(1000);
if ClientTargetResponsePresent then
begin
Infotool:=ClientTargetResponse.ID;
while (FindTarget <> Infotool) and k and (Infotool<>0) and (GetX(Infotool)<>0)and (GetHP(Infotool)>0)do
begin
AddToSystemJournal('Жертва: '+GetName(Infotool)+'.ID: '+inttohex(Infotool,8)+'.Х: '+inttostr(GetX(Infotool))+'.Y: '+inttostr(GetY(Infotool))+'.Z:'+inttostr(GetZ(Infotool))+'. дистанция: ' +inttostr(GetDistance(Infotool)));
FindTarget:=Infotool;
TamePet(FindTarget);
ignore(FindTarget);
CancelTarget;
end;
end;
while k = false do wait(100);
end;
end.