Stealth Client Forum Forum Index Stealth Client Forum
( Return to main )
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Скрипт на персонажа-грушу (DRW)

 
Post new topic   Reply to topic    Stealth Client Forum Forum Index -> Scripts
View previous topic :: View next topic  
Author Message
dukeduke
Neophyte
Neophyte


Joined: 23 Aug 2008
Posts: 10

PostPosted: Sat Aug 23, 2008 14:06    Post subject: Скрипт на персонажа-грушу (DRW) Reply with quote

Простой скриптик на персонажа, на котором мона качать других персонажей:
Code:

Program Healing;

{$Include 'all.inc'}

const
Eat=$09bb; {тип еды}
Washbasin=$403116db; {мойка} 
bloodbandages=$0E20;  {кровавые бинты, тип}
CharHP=177; {количество здоровья у персонажа груши}
ElBow=$404aa15e; {ельвин лук}
BoxSunduk=$4037064e; {сундук для безопасного хранения ельвин лука}

var
Str1,str2,str3,str4,str5:String;
bandages:cardinal;

BEGIN
AddToSystemJournal('СКРИПТ ЗАГРУЖЕН!');
bandages:=FindType($0E21,backpack);
Str1:='You bandage';
Str2:='You put ';
Str3:='You sucessfully ';
Str4:='Do you ';
Str5:='You must wait to perform another action';
WaitConnection(5000);

While not Dead do
   begin
   If Life >= CharHP then
   begin
      MoveItem(ElBow,1,Backpack,0,0,0);
      Wait(800);
      UseObject(ElBow);
      Wait(3000);
      UOSay('go');
      SetWarMode(true);
      While Life > (CharHP - 100) do Wait(100);
   end;
   UOSay('stay');
   SetWarMode(false);
   MoveItem(ElBow,1,BoxSunduk,0,0,0);
   While HP < CharHP do
   Begin
      AddToSystemJournal('Лечимся');
      SetWarMode(false);
      UseObject(bandages);
      SetWarMode(false);
      WaitTargetSelf;
      SetWarMode(false);
      While (InJournal(str1)<0) and (InJournal(str2)<0) and (InJournal(str3)<0) and (InJournal(str4)<0) and (InJournal(str5)<0) do wait(500);
      SetWarMode(false);
      Wait(2500);
      SetWarMode(false);
   end;
   Wait(100);
   SetWarMode(false);
   FindType(bloodbandages,backpack);
   SetWarMode(false);
   if FindCount >= 1 then
   begin
      wait(100);
      SetWarMode(false);
      AddToSystemJournal('Начинаю мыть бинты');
      SetWarMode(false);
      UseObject(finditem);
      SetWarMode(false);
      WaitForTarget(5000);
      SetWarMode(false);
      if TargetPresent then TargetToObject(Washbasin);
      SetWarMode(false);
      wait(100);
      SetWarMode(false);
      AddToSystemJournal('Вымыл бинты');
      SetWarMode(false);

      FindType(Eat,backpack);
      SetWarMode(false);
      if FindCount >= 1 then
      begin
         SetWarMode(false);
         AddToSystemJournal('кушаем');
         SetWarMode(false);
         UseObject(finditem);
         SetWarMode(false);
      end else
         SetWarMode(false);
         AddToSystemJournal('нечего кушать');
   end else
      SetWarMode(false);
      AddToSystemJournal('Нечего мыть');
   end;
END.

_________________
I'M
Back to top
View user's profile Send private message Send e-mail
dukeduke
Neophyte
Neophyte


Joined: 23 Aug 2008
Posts: 10

PostPosted: Sat Aug 23, 2008 14:10    Post subject: Reply with quote

Кароче так - у персонажа-груши должно быть в бекпаке бинтов уйма, мойка, жрачка! А у того кто качается должен быть скрипт на го\стей спаринг, иногда при плохом конекте скрипт глючит!
_________________
I'M
Back to top
View user's profile Send private message Send e-mail
Beren
Neophyte
Neophyte


Joined: 08 Sep 2008
Posts: 40

PostPosted: Mon Sep 08, 2008 3:12    Post subject: Reply with quote

У меня несколько иной скрипт. Рабочий, правда не знаю на счёт того, убивал ли я когда-нибудь куклу, возможно ведь, что просто потом воскрешал)))

Code:
Program Dummy;

const
 Enemy=$000C8B01; // ID противника
 EnemyType=$0190; // Тип противника
 Weapons=$4037BE9B;// ID оружия
 clean_bandages = $0E21;// Тип чистых бинтов
 bloody_bandages =$0E20;// Тип кровавых бинтов
 a_wash_basin =$1008;// Тип чашки для мытья бинтов
 EatType=$160A;// Тип еды
 lim_iter=300;// Максимальное количество итераций;
 Min_Damage=11; // Минимально допустимое кол-во условных пунктов жизни противника

var
 TempDamage: integer; // жизнь противника в условных единицах
 Body:Cardinal; // для поиска противника
 iter: integer; // условие выхода из цикла
 
{$Include 'all.inc'}

function to_out(do_iter:boolean):boolean;
begin
   if do_iter then iter:=iter+1;
   Body:= FindType(EnemyType,Ground);
   if (((not connected) and (Body=0)) or ((iter>lim_iter) and do_iter)) then
    begin
      Result:= true;
      iter:=0;
    end
      else   Result:= false;
end;

procedure Wash;
begin
 UseObject(FindType(bloody_bandages,Backpack));
 repeat
  wait(100);
  checksave;
 until ((targetpresent) or to_out(true));
WaitTargetObject(FindType(a_wash_basin,Backpack));
end;

procedure Heal;
var
 ctime : TDateTime; 
begin
 SetWarMode(false);
 repeat
  ctime := Now;
  checksave;
  UseObject(FindType(clean_bandages,Backpack));
  repeat
   wait(250);
   checksave;
  until ((targetpresent) or to_out(true));
  WaitTargetObject(Enemy);
  repeat
   wait(100);
   checksave;
  until (((InJournalBetweenTimes('You put the bloody bandage in your pack.|You apply the bandages, but they barely help.|does not need you to

heal or cure him.|You can''t use another bandage yet!', ctime, Now))<>-1) or to_out(true));
  wait(250);
 until (((InJournalBetweenTimes('does not need you to heal or cure him.', ctime, Now))<>-1) or to_out(true));
wait(250);
Wash;
end;

Begin
FindDistance:=1;
iter:=0;
clearjournal;
while not Dead do
 begin
  if Connected then
   begin
    checksave;
    Equip(RhandLayer,Weapons);
    UseObject(FindType(EatType,Backpack));
    Attack(Enemy);
     repeat
       TempDamage:=GetHP(Enemy);
       checksave;
       wait(100);
     until ((TempDamage<Min_Damage) or to_out(false));
     iter:=0;
     Heal;
   end;
  end;
End.
Back to top
View user's profile Send private message
-Bulevif-



Joined: 11 Aug 2008
Posts: 5

PostPosted: Wed Oct 15, 2008 18:51    Post subject: Re: Скрипт на персонажа-грушу (DRW) Reply with quote

спс за скриптик Smile
Back to top
View user's profile Send private message
Maruk
Neophyte
Neophyte


Joined: 05 Nov 2009
Posts: 19

PostPosted: Mon Nov 09, 2009 19:51    Post subject: Reply with quote

18:50:58 [myst]: Compiling
18:50:58 [myst]: Compiler: [Error] (спаринг3.sc at 60:34): tbtString error
18:50:58 [myst]: Compiler: [Error] (спаринг3.sc at 60:34): Syntax error
18:50:58 [myst]: Compiling failed
18:50:58 [myst]: Script спаринг3.sc stopped successfuly
Вот такая батва
Back to top
View user's profile Send private message
WladL
Apprentice
Apprentice


Joined: 27 Jul 2009
Posts: 242
Location: DRW

PostPosted: Tue Nov 10, 2009 1:53    Post subject: Reply with quote

Code:
  until (((InJournalBetweenTimes('You put the bloody bandage in your pack.|You apply the bandages, but they barely help.|does not need you to
heal or cure him.|You can''t use another bandage yet!', ctime, Now))<>-1) or to_out(true));

замени на
Code:
  until (((InJournalBetweenTimes('bloody|barely|does not need|bandage yet', ctime, Now))<>-1) or to_out(true));

_________________
"Как хочешь ты трудись;
Но приобресть не льстись
Ни благодарности, ни славы,
Коль нет в твоих трудах ни пользы, ни забавы. (с) С.Крылов."
Back to top
View user's profile Send private message Visit poster's website
Faxford
Neophyte
Neophyte


Joined: 21 Aug 2009
Posts: 10

PostPosted: Wed Mar 10, 2010 21:08    Post subject: Reply with quote

Exclamation
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Stealth Client Forum Forum Index -> Scripts All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group


Тюнинг и аксессуары. Тюнинг внедорожников: магазин 4х4 в Одессе. Интернет магазин "AMAX".
Также, на правах рекламы: школьный сайт: school-work.net и еще один: 4kid.biz.


Рейтинг@Mail.ru