Jump to content

Recommended Posts

Posted

/\

/||\

/ || \

| || |

| || |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#_/| || |_/#

#| || |#

/|___| || |___|\

\____________/

( // )

( // )

( // )

( // )

 

 

(^\/^\/^)

\+*+*+/

{¤ 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^.

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • I came out of my cave as I do once every 5 years. By now, I know nobody really cares about L2, but I still find it fun to experiment. Everything you see here will be free and open source. I have no interest in selling anything.   Long story short, I like to revisit Interlude and apply what I've learned to see how far I can push it. Here's Outerlude, a public fork of aCis for the modern age.   Video demo:   Work that has been done:   Redone the netcode from scratch to be async The NPC AI was completely redone based on Finite State Machines Moved to PostgreSQL and using some of its cool features Lots of config that should be hot reloadable has moved to the database OpenTelemetry instrumentation, where it makes sense, and a Grafana dashboard A built-in REST API for server management A built-in MCP Server for LLMs Nidrah AI, an AI Agent to make managing the server easier Real-time server map view Chat auditing and live snooping A new Fake Players Engine with a Node logic system and a new LLM planner for any behavior Just watch the video   If there is interest in this and I'm happy with it, or I get bored (which I always do), I will open-source it. Let me know what you think and if there is some feature you'd like me to implement.
    • Hello everyone!   I offer Java development services for L2-like projects.   I have been working with Java since 2015-2016. During the last years I worked on contract Lineage 2 server development and related infrastructure. My main focus is server-side Java, L2JMobius-based forks, custom systems, packets, datapack/XML, SQL/JDBC, optimization and fixing unstable logic.   Experience with: L2JMobius main/original branch; L2JMobius Essence branch; Lucera interlude; Custom L2-like packs where many things were already changed from the original codebase;   What I can help with: custom systems for your pack; skills / effects / triggers / formulas; NPC / AI / scripts; shops / services / buffer / GM shop logic; items / enchant / rewards / missions; special hunting zones, instances, spawn/zone logic; custom packets and server-side integration with existing client UI changes; server-side integration for existing client-side edits/maps/geodata; SQL/JDBC, XML/datapack, XSD, configs; porting mechanics between branches/chronicles; bug fixing, cleanup, legacy refactoring; performance fixes: memory leaks, race conditions, broadcast/task-manager bottlenecks. other server-side game mechanics;   Examples of larger systems I worked on: clan/economy systems: roles, permissions, auction, shop, warehouse, ranks, seasons, history; PvP/event-like systems: territory/conquest mechanics, rankings, rewards, schedules; hunt pass / season pass / progression systems; account panel / web API for a game project; launcher backend, token-login flow, updater tooling; parsers and analyzers for game/client data; internal testing tools for server-side validation.   I can work with Git, separate branches, commits, pull/merge requests or patches, depending on your workflow. For tasks I usually provide a short note about what was changed and what should be tested.   Format: hourly: 15-20 USD/hour, depending on the task; fixed price per task after checking the requirements/code; small task: from 15 USD; payment: USDT; no revenue share and no unpaid test tasks; a small paid task is usually the best way to check quality and communication first. Contact: Discord: @stroke_dan Telegram @castirom
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..