Jump to content

Recommended Posts

Posted

____________$$$$$$$*$______$$$$$$$$$
__________$$$$$$$$$*$$$__$$$$$$$__$$$$
_________$$$$$$$$$$*$$$$$$$$$$$$$$__$$$
_________$$$$$$$$$$*$$$$$$$$$$$$$$__$$$
_________$$$$$$$$$$*$$$$$$$$$$$$$$__$$$
__________$$$$$$$$$*$$$$$$$$$$$$$__$$$
____________$$$$$$$*$$$$$$$$$$$$$$$$
_______________$$$$*$$$$$$$$$$$$$
_________________$$*$$$$$$$$$$$
____________________$$$$$$$$
_____________________$$$$$
______________________$$$
_______________________$

//******************************************************************************
{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.

 

662e0ee451bb.jpg

Posted

nice but don't you need first to be able to use phx on the server? witch it's kinda hard for some ppl...

lol its easier that stealing an icecream from a baby lol.Try it and u will see its nothing dificult if u have brain.

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

    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock