Skip to content

[Scripts] PHX

Featured Replies

/\

/||\

/ || \

| || |

| || |

##########| || |##########

#..............#_/_/| || |_/_/#..............#

#..............#_/_/| || |_/_/#..............#

#..............#_/_/| || |_/_/#..............#

#..............#_/_/| || |_/_/#..............#

#..............#_/_/| || |_/_/#..............#

#..............#_/_/| || |_/_/#..............#

#_/_/_/_/_/_/_/| || |_/_/_/_/_/_/_/#

#_/_/_/_/_/_/_/| || |_/_/_/_/_/_/_/#

#_/_/_/_/_/_/_/| || |_/_/_/_/_/_/_/#

#_/_/_/_/_/_/_/| || |_/_/_/_/_/_/_/#

#######_/_/| || |_/_/#######

#............#_/_/| || |_/_/#............#

#...........#_/_/| || |_/_/#...........#

#.........#_/_/| || |_/_/#.........#

#......#_/_/| || |_/_/#......#

#...#_/_/| || |_/_/#...#

#.#_/_/| || |_/_/#.#

#_/_/| || |_/_/#

#_/| || |_/#

#| || |#

/|___| || |___|\

\____________/

( // )

( // )

( // )

( // )

 

 

(^\/^\/^)

\+*+*+/

{¤ apoel ¤}

(¯`*•.¸,¤°´'`°¤,¸.•*´¯)

¸ ,¤°´'`°•.¸O¸.•°´'`°¤,¸

۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑۩۞۩๑๑۩۞۩

apoel ole ole

۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑๑۩۞۩๑۩۞۩๑๑۩۞۩

_______________________________________________,d888`\_\_\_______

_____________________________________________,d888`\_\_\_\________

____________________________________________,d88`\_\_\_\_\_\_______

__________________________________________,d88`\_\_\_\_\_\_\_______

_________________________________________,d8`_\_\_\_\_\_\_\_\______

_______________________________________,d8*\_\_\_\_\_\_\_\_\_\______

_____________________________________,d88*\_\_\_\_\_\_\_\..d**`_____

___________________________________,d88`\_\_\_\_\_\..d8*`\_\_\_\_____

_________________________________,d888`\_\_\..d8P*`\_\_\_\_\_\_\_____

_________________________._____,d8888*8888*`_|_|_|_|_|_|_|_|_|_|_____

_______________________,*_____,88888*8P*_|_|_|_|_|_|_|_|_|_|_|_|_|____

_____________________,*______d888888*8b._|_|_|_|_|_|_|_|_|_|_|_|_|____

___________________,P_______dP__*888.*888b.|_|_|_|_|_|_|_|_|_|_|_|____

_________________,8*________8____*888__`**88888b.|_|_|_|_|_|_|_|____

_______________,dP________________*88/_/_/_/_/_/_*88b./_/_/_/_/_/____

______________d8`__________________*8b/_/_/_/_/_/_/__*8b./_/_/_/____

____________,d8`____________________*8._/_/_/_/_/_/_/_/_/*88b…______

___________d8P_______________________88./_/_/_/_/_/_/_/_____________

_________,88P________________________888/_/_/_/_/_/_/______________

________d888*_______.d88P____________888/_/_/_/_/_/________________

_______d8888b..d888888*______________888/_/_/_/_/__________________

_____,888888888888888b.______________888/_/_/_/____________________

____,8*;88888P*****788888888ba.______888_/_/_/_____________________

___,8;,8888*________`88888*_________d88*_/_/______________________

___)8e888*__________,88888be._______888__/________________________

__,d888`___________,8888888***_____d888__________________________

_,d88P`___________,8888888Pb._____d888`___________________________

_888*____________,88888888**___.d8888*____________________________

_`88____________,888888888____.d88888b____________________________

__`P___________,8888888888bd888888*_______________________________

_______________d888888888888d888*_________________________________

_______________8888888888888888b._________________________________

_______________88*._*88888888888b.________.db_____________________

_______________`888b.`8888888888888b._.d8888P______________________

________________**88b.`*8888888888888888888888b..._________________

_________________*888b.`*8888888888P***7888888888888e.____________

__________________88888b.`********.d8888b**`88888P*_______________

__________________`888888b_____.d88888888888**`8888.______________

___________________)888888.___d888888888888P___`8888888b.__________

__________________,88888*____d88888888888**`____`8888b____________

_________________,8888*____.8888888888P`_________`888b.____________

________________,888*______888888888b...__________`888P88b._________

_______.db.___,d88*________88888888888888b_________`8888___________

___,d888888b.8888`_________`*888888888888888888P`___`888b._________

__/*****8888b**`______________`***8888P*``8888`_______`8888b.______

_______/**88`_________________.ed8b..__.d888P`__________`88888______

____________________________d8**888888888P*_______________`88b____

___________________________(*``,d8888***`___________________`88____

 

 

____________________________________________________________________________________________________

How to do it...

 

 

//******************************************************************************

{version 0.2 от 11.06.2009г. by NLObP

 

1.write NAME

2.run script

3.V folder \ scripts \ picture.txt should be based on the file with text or pictures

4.load command in the chat> load = picture

5.write how to write a chat, team chat> dest = 1, or chat = 1 (0 - general chat, etc.)

6.start for execution, the command in the chat> start or run

7.stop script, using chat> stop

8.posle output image script stops himself.

}

//******************************************************************************

program Risuem_w_chat2;

const

  Name='NLObP';    //имя персонажа в игре

 

  Pathtxt='.\scripts\';  //путь к файлу

  NameTxt='picture.txt';  //имя файла с рисунком (текстом)

 

  debug=true;            //true - чтобы видеть команды в чате

 

  DefaultExecuteDelay=500;

//..............................................................................

var

  TextPic : TStringlist;    //сюда загружаем текст из файла

  ExecuteTimer: Ttimer;    //основной таймер

  ExecuteDelay: integer;    //задержка между сообщениями в чат

 

  strIndex: integer;        //номер строки

  chat: integer;            //в какой чат слать

 

//******************************************************************************

procedure Init; //Вызывается при включении скрипта

var

  i, j :integer;

begin

  TextPic:=TStringList.Create;

  //загружаем файл

  TextPic.LoadFromFile(PathTxt+NameTxt);

 

  strIndex:=0; //начинаем с первой строки

 

  ExecuteDelay:=DefaultExecuteDelay; //задержка между сообщениями в чат

 

  ExecuteTimer:=TTimer.Create(nil);

  ExecuteTimer.Enabled:=false;

  ExecuteTimer.Interval:=ExecuteDelay; //время задержки

  ExecuteTimer.OnTimer:=@OnExecute;

end;

//..............................................................................

procedure Free; //Вызывается при выключении скрипта

begin

  ExecuteTimer.Enabled:=False; //остановим на всякий случай

  Executetimer.Free;

  TextPic.free;

end;

//******************************************************************************

{

Вспомогательные процедуры и функции

}

//******************************************************************************

procedure debugMsg(msg: string);

begin

  if debug then

  begin

    sendMSG(msg);

    SendMessage(msg);

  end;

end;

//******************************************************************************

{

Посылаем пакеты

}

//******************************************************************************

//послать сообщение в чат (видим только мы)

//use: SendMessage(msg);

procedure SendMessage(msg:string);  //отправка системных сообщений клиенту

begin

  buf:=#$4A;

  WriteD(0);

  WriteD(10);

  WriteS('');

  WriteS(msg);

  SendToClientEx(Name);

end;

 

//49=Say2:s(Text)d(Type)s(Target)

procedure SendMs(msg: string; dest: integer);

begin

  //buf:=#$49;  //Грация

  buf:=#$38;  //Интерлюдия

  WriteS(Msg);

  WriteD(dest);

  WriteS('');

  SendToServerEx(Name);

end;

 

 

//..............................................................................

function ExtractValue(sData, sFind: string;): string;

{возвращаем конец строки после найденного символа}

var

  s: string;

  i,j: integer;

begin

  i:=0;

  result:='';

  i:=find(sData, sFind);

  if i>0 then  result:=copy(sData, i+length(sFind), length(sData));

end;

function RtrimEx(sData, sDelimiter: string): string;

{Удаление из строки S заданные символы справа}

var

  m,i : integer;

  s: string;

begin

  s:=sData;

  i:=0;

  while i=0 do

  begin

      m:=length(s);

      if m>0 then begin

        if s[m]<>sDelimiter then i:=1;

        if s[m]=sDelimiter then delete(s,m,1);

      end;

      if m <= 0 then i:=1;

  end;

  result:=s;

end;

//..............................................................................

function LtrimEx(sData, sDelimiter:String): string;

{Удаление из строки S заданные символы слева}

var

  m,i : integer;

  s: string;

begin

  s:=sData;

  i:=0;

  while i=0 do

  begin

      m := length(s);

      if m > 0 then

      begin

        if s[1]<>sDelimiter then i:=1;

        if s[1]=sDelimiter then delete(s,1,1);

      end;

      if m <= 0 then i:=1;

  end;

  result:=s;

end;

//..............................................................................

function Ltrim(sData:String): string;

{Удаление из строки S заданные символы слева}

begin

  result:=LtrimEx(sData,' ');

end;

//..............................................................................

function Rtrim(sData:String): string;

{Удаление из строки S заданные символы слева}

begin

  result:=RtrimEx(sData,' ');

end;

//..............................................................................

function AllTrimEx(sData, sDelimiterLeft, sDelimiterRight: String): string;

{Удаление из строки S заданные символы слева и справа}

begin

  result:=LtrimEx(RtrimEx(sData, sDelimiterRight), sDelimiterLeft);

end;

//..............................................................................

function AllTrim(sData: String): string;

{Удаление из строки S заданные символы слева и справа}

begin

  result:=Ltrim(Rtrim(sData));

end;

//..............................................................................

function ExtractName(sData, sFind: string): string;

{возвращаем строку до найденного символа}

var

  i: integer;

begin

  i:=0;

  result:='';

  i:=find(sData, sFind);

  if i>0 then result:=copy(sData, 1, i-length(sFind)+1);

end;

//..............................................................................

function Find(const S, P: string): Integer;

{Функция Find ищет подстроку P в строке S и возвращает индекс первого символа

подстроки или 0, если подстрока не найдена. Хотя в общем случае этот метод,

как и большинство методов грубой силы, малоэффективен, в некоторых ситуациях

он вполне приемлем.}

var

  i, j: Integer;

begin

  Result:=0;

  if Length(P)>Length(S) then

  begin

    debugMSG('Несоответствие длин: p='+inttostr(Length(P))+' > S='+inttostr(Length(s)));

    debugMSG('Строка: '+inttostr(strIndex));

    Exit;

  end;

  for i:=1 to Length(S)-Length(P)+1 do

  begin

    for j:=1 to Length(P) do

    begin

      if P[j]<>S[i+j-1] then

        Break

      else if j=Length(P) then

      begin

        Result:=i;

        Exit;

      end;

    end;

  end;

end;

 

//******************************************************************************

// Парсер/Исполнитель: главный цикл обработки команд Валкера

//******************************************************************************

function OnExecute(Sender: TObject): integer; //CommandList: TStringList

var

  s, cmd, param : string;

begin

  try

    s:=TextPic[strIndex]; //считываем строку рисунка

    SendMs(s, chat);      //выводим в чат

    inc(strIndex);        //следующая строка

  except

    ExecuteTimer.Enabled:=False; //остановим

  end;

end;

 

procedure UserCommands;    //комманды пользователя

var

  s, cmd: string;

begin //если комманда обработана удачно, то в чат сообщение не попадет, а будет выдано системное сообщение прямо в клиент

  s:=ReadS(2);

  debugMsg(s);

  s:=s+'='; //чтобы можно было взять число в конце

  cmd:=RTrimEx(ExtractName(s, '='), '=');  //получили строку вплодь до найденного символа

  cmd:=UpperCase(alltrim(cmd));

  case cmd of

    //команда загрузки скрипта>  load=picture

    'LOAD': begin

        s:=ExtractValue(s, '=');  //получили остаток строки начиная с искомого символа

        s:=RTrimEx(ExtractName(s, '='), '=');  //получили строку вплодь до найденного символа

        TextPic.clear;

        TextPic.LoadFromFile(PathTxt+s+'.txt'); //загружаем

        pck:='';

    end;

    'START','RUN': begin

        strIndex:=0; //начинаем с первой строки

        ExecuteDelay:=DefaultExecuteDelay; //задержка между выводом строк на экран

        ExecuteTimer.Enabled:=true; //включим таймер

        pck:='';

    end;

    'STOP': begin

        ExecuteTimer.Enabled:=false; //выключим интерпретацию скрипта валкера

        pck:='';

    end;

    'DEST','CHAT': begin

        s:=ExtractValue(s, '=');  //получили остаток строки начиная с искомого символа

        s:=RTrimEx(ExtractName(s, '='), '=');  //получили строку вплодь до найденного символа

        chat:=strtoint(s); //сохраним тип чата куда слать сообщение

        pck:='';

    end;

  end;

end;

 

//******************************************************************************

{

основная часть скрипта, вызывается при приходе каждого пакета, если скрипт включен

}

//******************************************************************************

begin

  //****************************************************************************

  //не обрабатываем пустые пакеты

  if pck='' then exit;

 

  //****************************************************************************

  if (ConnectName=Name) and FromClient then

  begin

    case pck[1] of

      //************************************************************************

      //#$49: UserCommands; //Say2:s(Text)d(Type)s(Target) Gracia

      #$38: UserCommands; //Say2:s(Text)d(Type)s(Target) Interlud

    end;

  end;

end.

 

 

Credits z0mbie86 for the guide on how to do it and for the texts to `GodPower^.

Yea. Whats the reason for those scrips?

  • Author

if you load it and press "sent" then in the chat you will see this texts ^^

Xaaxxa there is so many things that you can make with symbols like "!,@,#,$,%..etc...another kinda useless for me but it`s still fun... XD ...GG

Hhahaha, really cool!

 

Finally some one shared something here. =P

hmm realy fun :) but need test i think all players who see this in l2 will cry  LOL WOW OMG WTF ... :)

nice nice))) in global chat it will be funny)))

thx for share

  • 3 months later...

Create an account or sign in to comment

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.