Advertisement
Guest User

Untitled

a guest
Mar 15th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.81 KB | None | 0 0
  1. alias output_hellsoul {
  2.   set -l %arquivo_numeros arquivo_numeros.txt
  3.   set -l %arquivo_mensagens arquivo_mensagens.txt
  4.   set -l %arquivo_output arquivo_output.txt
  5.   if (!$lines(%arquivo_numeros)) || (!$lines(%arquivo_mensagens)) {
  6.     echo -a Arquivos de entrada sem linhas!
  7.     return
  8.   }
  9.   .fopen arquivo_numeros $qt(%arquivo_numeros)
  10.   .fopen arquivo_mensagens $qt(%arquivo_mensagens)
  11.   .fopen -o arquivo_output $qt(%arquivo_output)
  12.   set -l %read1
  13.   set -l %read2
  14.   while 1 {
  15.     %read1 = $fread(arquivo_numero)
  16.     if ($feof) break
  17.     :a
  18.     %read2 = $fread(arquivo_mensagens)
  19.     if ($feof) {
  20.       .fseek -l arquivo_mensagens 1
  21.       goto a
  22.     }
  23.     .fwrite -n arquivo_output $instok(%read1,%read2,2,59)
  24.   }
  25.  
  26.   .fclose arquivo_numeros
  27.   .fclose arquivo_mensagens
  28.   .fclose arquivo_output
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement