Page 1 of 1

Test Taming on Stealth 5.0+

Posted: 30.04.2013 19:43
by shinma
NOT FOR STEALTH 4.+ and old.
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.

Re: Test Taming on Stealth 5.0+

Posted: 02.05.2013 9:24
by Ray
where can i download 5.0?

Re: Test Taming on Stealth 5.0+

Posted: 02.05.2013 16:46
by chrisok1
i dont think its out yet, ray what kind of scripting do you do for stealth?

Re: Test Taming on Stealth 5.0+

Posted: 02.05.2013 17:25
by Ray
i'm working on the Heartwood quest ... :oops:

Re: Test Taming on Stealth 5.0+

Posted: 02.05.2013 18:43
by Crome696
Version is in progress. Version 5 were on a good stage but due some major changes it will takes longer. Not Sure if it will be released in Version 5 or in Version 6 then.
Version 6 also will offer Scripting API for native Languanges :)
I currently preparing class for Import all into .Net. So i will write scripts in future in .Net

Re: Test Taming on Stealth 5.0+

Posted: 02.05.2013 21:22
by chrisok1
Crome, is there a rar file with all the includes? i cant find one and i need one for "debug"

Re: Test Taming on Stealth 5.0+

Posted: 03.05.2013 14:58
by Crome696
chrisok1 wrote:Crome, is there a rar file with all the includes? i cant find one and i need one for "debug"
explain it with more details? all scripts on this website? all Units of this Website?

I don´t believe it exist and i dont used any line of code yet from this website ( exclude stealth :P )

Re: Test Taming on Stealth 5.0+

Posted: 03.05.2013 17:25
by chrisok1
I got an answer from vizit0r, the include files are files included by the author of the script

Re: Test Taming on Stealth 5.0+

Posted: 04.05.2013 6:08
by Vizit0r
i never say so, don't put your minds as my answer.

all standart includes here - http://stealth.od.ua/forum/viewtopic.php?f=3&t=152