Показать сообщение отдельно
Старый 17.01.2008, 13:40   #170
Рыцарь
 
Аватар для VORON
 
Регистрация: 06.08.2007
Сообщений: 209
Сказал Спасибо: 6
Имеет 67 спасибок в 34 сообщенях
VORON пока неопределено
По умолчанию

MKS, ну как как... нормально.. то что дестр ХП жрет немереноо- факт.. но лить их 1 фиг надо.. от того что пререправим на фиксированное значение- меньше лиль не прийдется...

Добавлено спустя 8 минут 4 секунды:
Код:
var
Bot1X,Bot1Y,Bot1Z,Bot2X,Bot2Y,Bot2Z:string;
rnd:integer;

NameKom,NameBot1,NameBot2:string;

MaxHPKom,MaxHPBot1,MaxHPBot2:integer;
MaxMPKom,MaxMPBot1,MaxMPBot2:integer;

CurHPKom,CurMPKom,CurHPbot1,CurMPbot1,CurHPbot2,CurMPbot2:integer;

IDKomandos,IDbot1,IDbot2:string;
ChekIdKom,ChekIdBot1,ChekIdBot2:boolean;

timer1: TTimer; //баф БОТ1
timer2: TTimer; //баф БОТ2
timer3: TTimer; //для создания пати
tick1,tick2,tick3:integer;

i:integer;
tempD:integer;
tempS:String;

//*********************БУФ ШЕ******************************************************************
procedure OnTimer1(Sender: TObject);
begin
//    buf:=hstr('2F 2C 04 00 00 00 00 00 00 00'); //па
//    buf:=hstr('2F 10 04 00 00 00 00 00 00 00');  //пд
//    buf:=hstr('2F 35 04 00 00 00 00 00 00 00');  //фокус
//    buf:=hstr('2F B4 04 00 00 00 00 00 00 00');  //вв
//    buf:=hstr('2F 0B 04 00 00 00 00 00 00 00');  //ментал
//    buf:=hstr('2F A5 04 00 00 00 00 00 00 00');  //резист к ветру
//    buf:=hstr('2F D8 04 00 00 00 00 00 00 00'); //гвиданс-акураси
//    buf:=hstr('2F DA 04 00 00 00 00 00 00 00'); //деф виспер- сила крита
//               2F 36 04 00 00 00 00 00 00 00  кон
//               2F 23 04 00 00 00 00 00 00 00  емповер
//               2F F4 04 00 00 00 00 00 00 00  вамп

//буф командира (ШЕ)
  if tick1=1 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F F4 04 00 00 00 00 00 00 00'); //вамп
    SendToServerEX(NameBot1);
   end;

  if tick1=2 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 2C 04 00 00 00 00 00 00 00'); //па
    SendToServerEX(NameBot1);
   end;

  if tick1=3 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 10 04 00 00 00 00 00 00 00');  //пд
    SendToServerEX(NameBot1);
   end;

  if tick1=4 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F B4 04 00 00 00 00 00 00 00');  //вв
    SendToServerEX(NameBot1);
   end;

  if tick1=5 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 35 04 00 00 00 00 00 00 00');  //фокус
    SendToServerEX(NameBot1);
   end;

  if tick1=6 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F DA 04 00 00 00 00 00 00 00'); //деф виспер- сила крита
    SendToServerEX(NameBot1);
   end;

  if tick1=7 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 0B 04 00 00 00 00 00 00 00');  //ментал
    SendToServerEX(NameBot1);
   end;

  if tick1=8 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F A5 04 00 00 00 00 00 00 00');  //резист к ветру
    SendToServerEX(NameBot1);
   end;

  if tick1=9 then
   begin
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F D8 04 00 00 00 00 00 00 00'); //гвиданс-акураси
    SendToServerEX(NameBot1);
   end;


//буф ШЕ (ШЕ)
  if tick1=10 then
   begin
    buf:=hstr('04') + IDBot1 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 10 04 00 00 00 00 00 00 00'); //щит
    SendToServerEX(NameBot1);
   end;

  if tick1=11 then
   begin
    buf:=hstr('04') + IDbot1 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F B4 04 00 00 00 00 00 00 00'); //вв
    SendToServerEX(NameBot1);
   end;

  if tick1=12 then
   begin
    buf:=hstr('04') + IDBot1 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 36 04 00 00 00 00 00 00 00');  //кон
    SendToServerEX(NameBot1);
   end;

  if tick1=13 then
   begin
    buf:=hstr('04') + IDBot1 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 23 04 00 00 00 00 00 00 00');  //емп
    SendToServerEX(NameBot1);
   end;

  if tick1=14 then
   begin
    buf:=hstr('04') + IDBot1 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 0B 04 00 00 00 00 00 00 00');  //ментал
    SendToServerEX(NameBot1);
   end;

  if tick1=15 then
   begin
    buf:=hstr('04') + IDBot1 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F A5 04 00 00 00 00 00 00 00');  //резист к ветру
    SendToServerEX(NameBot1);
   end;

//буф ПП (ШЕ)
  if tick1=16 then
   begin
    buf:=hstr('04') + IDBot2 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F 23 04 00 00 00 00 00 00 00');  //емп
    SendToServerEX(NameBot1);
   end;

  if tick1=17 then
   begin
    buf:=hstr('04') + IDBot2 + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('2F A5 04 00 00 00 00 00 00 00');  //резист к ветру
    SendToServerEX(NameBot1);
   end;


tick1:=tick1+1;

if tick1=18 then
 begin
 tick1:=1;
 timer1.enabled:=false;
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
 end;
end;

//*********************БУФ ПП******************************************************************
//список бафов:
//2F 0B 04 00 00 00 00 00 00 00  ментал
//2F 10 04 00 00 00 00 00 00 00  щит
//2F 2C 04 00 00 00 00 00 00 00  па
//2F 35 04 00 00 00 00 00 00 00  фокус
//2F 36 04 00 00 00 00 00 00 00  кон
//2F 3D 04 00 00 00 00 00 00 00  акумен
//2F A7 04 00 00 00 00 00 00 00  резист к огню
//2F B4 04 00 00 00 00 00 00 00  вв
//2F 26 04 00 00 00 00 00 00 00  берс
//2F 14 04 00 00 00 00 00 00 00  ХП реген
//2F 3E 04 00 00 00 00 00 00 00  хаст
//2F 15 04 00 00 00 00 00 00 00  блесс ХП
//2F 0C 04 00 00 00 00 00 00 00  маджик барьер
//

procedure OnTimer2(Sender: TObject);
begin
//буф командира (ПП)
  if tick2=1 then
   begin
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 3E 04 00 00 00 00 00 00 00'); //хаст
    SendToServerEX(NameBot2);
   end;

  if tick2=2 then
   begin
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 15 04 00 00 00 00 00 00 00'); //блес ХП
    SendToServerEX(NameBot2);
   end;

  if tick2=3 then
   begin
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 0C 04 00 00 00 00 00 00 00'); //маджик барьер
    SendToServerEX(NameBot2);
   end;

  if tick2=4 then
   begin
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 3D 04 00 00 00 00 00 00 00'); //акумен
    SendToServerEX(NameBot2);
   end;

  if tick2=5 then
   begin
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F A7 04 00 00 00 00 00 00 00'); //резист к огню
    SendToServerEX(NameBot2);
   end;

  if tick2=6 then
   begin
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 26 04 00 00 00 00 00 00 00'); //берс
    SendToServerEX(NameBot2);
   end;

  if tick2=7 then
   begin
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 14 04 00 00 00 00 00 00 00'); //реген ХП
    SendToServerEX(NameBot2);
   end;

//баф ШЕ (ПП)
  if tick2=8 then
   begin
    buf:=hstr('04') + IDbot1 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 15 04 00 00 00 00 00 00 00'); //блесс ХП
    SendToServerEX(NameBot2);
   end;

  if tick2=9 then
   begin
    buf:=hstr('04') + IDbot1 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 0C 04 00 00 00 00 00 00 00'); //маджик барьер
    SendToServerEX(NameBot2);
   end;

  if tick2=10 then
   begin
    buf:=hstr('04') + IDbot1 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 3D 04 00 00 00 00 00 00 00'); //акумен
    SendToServerEX(NameBot2);
   end;

  if tick2=11 then
   begin
    buf:=hstr('04') + IDbot1 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F A7 04 00 00 00 00 00 00 00'); //резист к огню
    SendToServerEX(NameBot2);
   end;

//баф ПП (ПП)
  if tick2=12 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 15 04 00 00 00 00 00 00 00');  //блесс ХП
    SendToServerEX(NameBot2);
   end;

  if tick2=13 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 0C 04 00 00 00 00 00 00 00');  //маджик барьер
    SendToServerEX(NameBot2);
   end;

  if tick2=14 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 10 04 00 00 00 00 00 00 00');  //пд
    SendToServerEX(NameBot2);
   end;

  if tick2=15 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 3D 04 00 00 00 00 00 00 00'); //акумен
    SendToServerEX(NameBot2);
   end;

  if tick2=16 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F B4 04 00 00 00 00 00 00 00');  //вв
    SendToServerEX(NameBot2);
   end;

  if tick2=17 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F A7 04 00 00 00 00 00 00 00');  //резист к огню
    SendToServerEX(NameBot2);
   end;

  if tick2=18 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 36 04 00 00 00 00 00 00 00');  //кон
    SendToServerEX(NameBot2);
   end;

  if tick2=19 then
   begin
    buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('2F 0B 04 00 00 00 00 00 00 00');  //ментал
    SendToServerEX(NameBot2);
   end;

tick2:=tick2+1;

if tick2=20 then
 begin
 tick2:=1;
 timer2.enabled:=false;
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot2);
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot2);
 end;
end;

//****************************РАЗДАЧА ПРИГЛАШЕНИЙ НА ВСТУПЛЕНИЕ В ПАТИ*******************
//*********************А ТАКЖЕ ПОСЫЛКА ТЕКСТА Я1 Я2 Я3 для захвата ИДешников************
procedure OnTimer3(Sender: TObject);
begin

if tick3 = 1 then
 begin
      buf:=hstr('2B');
      SendToServerEX(NameKom);
      SendToServerEX(NameBot1);
      SendToServerEX(NameBot2);
 end;

if tick3 = 2 then
 begin
 buf:=hstr('29');
 writeS(namebot1);
 buf:=buf + hstr('00 00 00 00');
 SendToServerEX(NameKom);
 end;

if tick3 = 3 then
 begin
 buf:=hstr('29');
 writeS(namebot2);
 buf:=buf + hstr('00 00 00 00');
 SendToServerEX(NameKom);
 end;

if tick3 = 4 then
if (IDKomandos = '') or (IDBot1 = '') or (IDBot2 = '') then
 begin
 buf:=hstr('38');
 writes('я1');
 buf:=buf +  hstr('03 00 00 00'); ///9- али  //  3-пати  // 01 - общий
 sendtoserverex(NameKom);

 buf:=hstr('38');
 writes('я2');
 buf:=buf +  hstr('03 00 00 00'); ///9- али  //  3-пати  // 01 - общий
 sendtoserverex(NameBot1);

 buf:=hstr('38');
 writes('я3');
 buf:=buf +  hstr('03 00 00 00'); ///9- али  //  3-пати  // 01 - общий
 sendtoserverex(NameBot2);
 end;

tick3:=tick3+1;

if tick3=5 then
 begin
 tick3:=1;
 timer3.enabled:=false;
 end;

end;

//*************************БЕЖИМ ЗА ЛИДЕРОМ*******************************************
//процедура заставляет бежать ботов за лидером
procedure BotBeg;
begin
//проверяем условие чтоб координаты ботов небыли равными '' и ИД был перехвачен
if  IDKomandos <> '' then
    begin
    //выделяем командира, эмулируя щелчек мыши
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);
    //бежим за командиром эмулируя повторный щелчек мыши по таргету
    buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
    SendToServerEX(NameBot1);

    //выделяем командира, эмулируя щелчек мыши
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    //бежим за командиром эмулируя повторный щелчек мыши по таргету
    buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
    SendToServerEX(NameBot2);
    end;
end;


procedure Init; //Вызывается при включении скрипта
begin
NameKom:='ник- командоса';
NameBot1:='ник ШЕ;
NameBot2:='ник ПП';

CurHPKom:=15000;
CurHPBot1:=15000;
CurHPBot2:=15000;

CurMPKom:=15000;
CurMPBot1:=15000;
CurMPBot2:=15000;

MaxHPKom:=10;
MaxHPBot1:=10;
MaxHPBot2:=10;

ChekIDKom:=false;
ChekIDBot1:=false;
ChekIDBot2:=false;

tick1:=1;
tick2:=1;
tick3:=1;

  timer1:=TTimer.Create(nil);
  timer1.OnTimer:=@OnTimer1; //
  timer1.enabled:=false; //
  timer1.interval:=4000;

  timer2:=TTimer.Create(nil);
  timer2.OnTimer:=@OnTimer2; //
  timer2.enabled:=false; //
  timer2.interval:=4000;

  timer3:=TTimer.Create(nil);
  timer3.OnTimer:=@OnTimer3; //
  timer3.enabled:=false; //
  timer3.interval:=1000;

end;

procedure Free; //Вызывается при выключении скрипта
begin
timer1.Free;
timer2.Free;
timer3.Free;
end;

//основная часть скрипта
//вызывается при приходе каждого пакета если скрипт включен
begin
if pck='' then exit;

//******************************АВТОСОГЛАШЕНИЕ НА ВСТУПЛЕНИЕ В ПАТИ************************
//******************************ПРИ УСЛОВИИ ЧТО ПАТИ ДАЕТ- КОМАНДИР************************
if FromServer and (ConnectName=NameBot1) and (pck[1]=#$39) then
if ReadS(2)=NameKom then
 begin
 buf:=hstr('2A 01 00 00 00');
 sendtoserverex(NameBot1);
 end;

if FromServer and (ConnectName=NameBot2) and (pck[1]=#$39) then
if ReadS(2)=NameKom then
 begin
 buf:=hstr('2A 01 00 00 00');
 sendtoserverex(NameBot2);
 end;

//******************************БЛОК ДЛЯ ЗАПОМИНАНИЯ ИДЕШНИКОВ БОТОВ***********************
//******************************ОТЛАВЛИВАЕМ Я1 Я2 Я3***************************************
if FromServer and (ConnectName=NameKom) and (pck[1]=#$4A) then
  begin
  i:=10;
  tempS:=readS(i);

     if tempS=NameKom then
     begin
     tempS:=ReadS(i);
        if tempS='я1' then
        begin
        IDKomandos:=pck[2]+pck[3]+pck[4]+pck[5];
        end;
     end;
  end;

if FromServer and (ConnectName=NameBot1) and (pck[1]=#$4A) then
  begin
  i:=10;
  tempS:=readS(i);
     if tempS=NameBot1 then
     begin
     tempS:=ReadS(i);
        if tempS='я2' then
        begin
        IDBot1:=pck[2]+pck[3]+pck[4]+pck[5];
        end;
     end;
  end;

if FromServer and (ConnectName=NameBot2) and (pck[1]=#$4A) then
  begin
  i:=10;
  tempS:=readS(i);
     if tempS=NameBot2 then
     begin
     tempS:=ReadS(i);
        if tempS='я3' then
        begin
        IDBot2:=pck[2]+pck[3]+pck[4]+pck[5];
        end;
     end;
  end;
//*******************ЗАХВАТ КООРДИНАТ***************************************************
//если принят пакет от клиента с кординатами бота то
  if FromClient and (ConnectName=NameBot1) and (pck[1]=#$48) then
    begin
//запоминаем координаты
    Bot1X:= pck[2] + pck[3] + pck[4] + pck[5];
    Bot1Y:= pck[6] + pck[7] + pck[8] + pck[9];
    Bot1Z:= pck[10] + pck[11] + pck[12] + pck[13];
    end;

//если принят пакет от клиента с кординатами бота то
  if FromClient and (ConnectName=NameBot2) and (pck[1]=#$48) then
    begin
//запоминаем координаты
    Bot2X:= pck[2] + pck[3] + pck[4] + pck[5];
    Bot2Y:= pck[6] + pck[7] + pck[8] + pck[9];
    Bot2Z:= pck[10] + pck[11] + pck[12] + pck[13];
    end;

//********************ОСТСЛЕЖИВАЕМ ТРУПАКИ********************************************************
//если кто то умер.. пакет DIE.. то хилить его ненадо...
//нефиг трупы хилить...
  if FromServer and (pck[1]=#$06) then
  if (pck[2]+pck[3]+pck[4]+pck[5] = IDKomandos) then CurHPKom:=15000;

  if FromServer and (pck[1]=#$06) then
  if (pck[2]+pck[3]+pck[4]+pck[5] = IDBot1) then CurHPBot1:=15000;

  if FromServer and (pck[1]=#$06) then
  if (pck[2]+pck[3]+pck[4]+pck[5] = IDBot2) then CurHPBot2:=15000;

//*************************УЗНАЕМ ЛИМИТЫ ХП и МП***********************************************
//из пакета UserInfo который приходит во время бафа и не только

//КОМАНДИР
  if FromServer and (pck[1]=#$04) and (ConnectName = NameKom) then
  begin
  i:=22;
  tempS:=readS(i);
  i:=i+48;
  MaxHPKom:=readD(i);
  CurHPKOM:=readD(i);
  MaxMPKom:=readD(i);
  CurMPKOM:=readD(i);
  end;

//1-й бот
  if FromServer and (pck[1]=#$04) and (ConnectName = NameBot1) then
  begin
  i:=22;
  tempS:=readS(i);
  i:=i+48;
  MaxHPBot1:=readD(i);
  CurHPBot1:=readD(i);
  MaxMPBot1:=readD(i);
  CurMPBot1:=readD(i);
  end;

//2-й бот
  if FromServer and (pck[1]=#$04) and (ConnectName = NameBot2) then
  begin
  i:=22;
  tempS:=readS(i);
  i:=i+48;
  MaxHPBot2:=readD(i);
  CurHPBot2:=readD(i);
  MaxMPBot2:=readD(i);
  CurMPBot2:=readD(i);
  end;

//*************************СЛЕДИМ ЗА ХП и МП******************************************
//следим за ХП КОМАНДИРА
  if FromServer and (pck[1]=#$0e) and (ConnectName = NameKom)  then
  if (pck[2] + pck[3] + pck[4] + pck[5] = IDKomandos) and (pck[6]=#$04) then
  begin
    CurHPKom:=(ord(pck[15]) * 256 + ord(pck[14]));

     if (CurHPKom < round(MaxHPKom*0.6)) then
     if (tick1 = 1) then
     begin
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
      buf:=hstr('2F F7 03 00 00 00 00 00 00 00');
      SendToServerEX(NameBot1);
      delay(500);
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
     end;

     if (CurHPKom < round(MaxHPKom*0.8)) then
     if (tick2 = 1) then
     begin
      buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
      buf:=hstr('2F F7 03 00 00 00 00 00 00 00');
      SendToServerEX(NameBot2);
      delay(500);
      buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
     end;

  end;

//следим за МП КОМАНДИРА
  if FromServer and (pck[1]=#$0e) and (ConnectName = NameKom)  then
  if (pck[2] + pck[3] + pck[4] + pck[5] = IDKomandos) and (pck[6]=#$02) then
  begin
    CurMPKom:=(ord(pck[15]) * 256 + ord(pck[14]));

    RND:=round(random*100);

     if (CurMPKom < round(MaxMPKom*0.8)) and (rnd<15)  then
     if (tick1 = 1) then
     begin
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
      buf:=hstr('2F F5 03 00 00 00 00 00 00 00');
      SendToServerEX(NameBot1);
      delay(500);
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
     end;
  end;


//следим за ХП у БОТ1
  if FromServer and (pck[1]=#$0e) and (ConnectName = NameBot1)  then
  if (pck[2] + pck[3] + pck[4] + pck[5] = IDbot1) and (pck[6]=#$04) then
  begin
    CurHPbot1:=(ord(pck[15]) * 256 + ord(pck[14]));

     if (CurHPbot1 < round(MaxHPBot1*0.8)) then
     if (tick1 = 1) then
     begin
      buf:=hstr('04') + IDbot1 + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
      buf:=hstr('2F F7 03 00 00 00 00 00 00 00');
      SendToServerEX(NameBot1);
      delay(500);
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
     end;

     if (CurHPbot1 < round(MaxHPBot1*0.6)) then
     if (tick1 = 1) then
     begin
      buf:=hstr('04') + IDbot1 + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
      buf:=hstr('2F F7 03 00 00 00 00 00 00 00');
      SendToServerEX(NameBot2);
      delay(500);
      buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
      buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
     end;

  end;

//следим за ХП у БОТ2
  if FromServer and (pck[1]=#$0e) and (ConnectName = NameBot2)  then
  if (pck[2] + pck[3] + pck[4] + pck[5] = IDbot2) and (pck[6]=#$04) then
  begin
    CurHPbot2:=(ord(pck[15]) * 256 + ord(pck[14]));

     if (CurHPbot2 < round(MaxHPBot2*0.8)) then
     if (tick2 = 1) then
     begin
      buf:=hstr('04') + IDbot2 + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
      buf:=hstr('2F F7 03 00 00 00 00 00 00 00');
      SendToServerEX(NameBot2);
      delay(500);
      buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
      buf:=hstr('04') + IDKomandos + Bot2X + Bot2Y + Bot2Z + hstr('00');
      SendToServerEX(NameBot2);
     end;

     if (CurHPbot2 < round(MaxHPBot2*0.6)) then
     if (tick2 = 1) then
     begin
      buf:=hstr('04') + IDbot2 + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
      buf:=hstr('2F F7 03 00 00 00 00 00 00 00');
      SendToServerEX(NameBot1);
      delay(500);
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
      buf:=hstr('04') + IDKomandos + Bot1X + Bot1Y + Bot1Z + hstr('00');
      SendToServerEX(NameBot1);
     end;

  end;

//**************************УПРАВЛЕНИЕ************************************************
//ПОКЛОН- БЕЖАТЬ за КОМАНДИРОМ
  if FromClient and (ConnectName=NameKom) and (pck=hstr('1B 07 00 00 00')) then
    begin
     pck:='';
     BotBeg;
     exit;
    end;

//ПРИВЕТСТВИЕ- БАФ ПЕРВЫМ БОТОМ (первая кнопка)
  if FromClient and (ConnectName=NameKom) and (pck=hstr('1B 02 00 00 00')) then
    begin
     pck:='';
     timer1.enabled:=true;
     exit;
    end;

//ГРИИТЕРИНГ - ПОБЕДА - баф ПП (вторая кнопка)
  if FromClient and (ConnectName=NameKom) and (pck=hstr('1B 03 00 00 00')) then
    begin
     pck:='';
     timer2.enabled:=true;
     exit;
    end;

//ADVANCE- В АТАКУ - пати быстрое создание (3-я кнопка)
  if FromClient and (ConnectName=NameKom) and (pck=hstr('1B 04 00 00 00')) then
    begin
     pck:='';
     //сразу рвем пати у всех чаров и командир раздает пати поновому
     //чары автоматически принимают пати
     //используется таймер т.к. одновременно 2-м чарам пати кинуть нельзя
      timer3.enabled:=true;
     exit;
    end;



end.
тут применяется статус апдейт для контроля ХП и МП в% от шкалы
__________________
Цитата:
Сообщение от pybukon
прежде чета попросить я немнога раскажу чтоб вы понили как мне плоха
Цитата:
Сообщение от Byrger
А как сделать мой скрипт бесконечным?
Цитата:
Сообщение от XKOR
.. каждый день ионизированной ногой протирает больную)
Цитата:
Сообщение от PsyR
Вылоджите пожалуйста скрипт на рыбалку желательно что бы сам в ВХ клал адаптированый под шоки и так же скрипт на ТТ рец, тоже с диалогами
VORON вне форума   Ответить с цитированием