Test Taming on Stealth 5.0+

Only working scripts
Post Reply
shinma
Expert
Expert
Posts: 505
Joined: 28.04.2011 12:05
Contact:

Test Taming on Stealth 5.0+

Post 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.
--->>>ПОИСК ПО ФОРУМУ, НАЧНИ С НЕГО!!!<<<---
--->>>Search the forum, start with him!!!<<<---
95% Ваших вопросов уже кем-то написаны и решены.
Ray
Neophyte
Neophyte
Posts: 28
Joined: 04.05.2012 7:13

Re: Test Taming on Stealth 5.0+

Post by Ray »

where can i download 5.0?
chrisok1
Neophyte
Neophyte
Posts: 13
Joined: 01.04.2013 23:08

Re: Test Taming on Stealth 5.0+

Post by chrisok1 »

i dont think its out yet, ray what kind of scripting do you do for stealth?
Ray
Neophyte
Neophyte
Posts: 28
Joined: 04.05.2012 7:13

Re: Test Taming on Stealth 5.0+

Post by Ray »

i'm working on the Heartwood quest ... :oops:
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: Test Taming on Stealth 5.0+

Post 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
Stealth Development Team & Support
chrisok1
Neophyte
Neophyte
Posts: 13
Joined: 01.04.2013 23:08

Re: Test Taming on Stealth 5.0+

Post by chrisok1 »

Crome, is there a rar file with all the includes? i cant find one and i need one for "debug"
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: Test Taming on Stealth 5.0+

Post 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 )
Stealth Development Team & Support
chrisok1
Neophyte
Neophyte
Posts: 13
Joined: 01.04.2013 23:08

Re: Test Taming on Stealth 5.0+

Post by chrisok1 »

I got an answer from vizit0r, the include files are files included by the author of the script
User avatar
Vizit0r
Developer
Developer
Posts: 3955
Joined: 24.03.2005 17:05
Contact:

Re: Test Taming on Stealth 5.0+

Post 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
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Post Reply