mIRC Cut Script

Useful items for all visitors - virus warnings, firewalls, IRC scripts etc

Moderators: Ehlanna, Twerlinger

mIRC Cut Script

Postby Volo on Sat Sep 06, 2008 8:28 pm

This is the script I use, and it works quite well. If there is another thread for this, and I didn't find it, so sorreh. Just Cut it, open up Scripts, hit the Remote tab, and paste it. Magic!

on *:input:*: {
if ( ( $left($1,1) != / ) || ( $1 == /me ) ) {
var %next = <14next2>
var %continue = <14more1>
var %more = <14more1>
var %done = <4end1>
var %textlen = $len($1-)
if (%textlen > 400) {
var %pos = 1
var %text = $mid($1-, %pos, 400)
var %firsttime = 1

while ( %text != $null ) {
if ( $len($deltok(%text, -1, 32)) < 370 ) {
%text = $left(%text, 370)
inc %pos 370
}
else {
%text = $deltok(%text,-1,32)
inc %pos $len(%text)
inc %pos
}
var %outtext = %text
%text = $mid($1-, %pos, 400)
if (%firsttime == 1) {
if ($gettok(%outtext, 1, 32) == /me) {
%outtext %next
}
else {
say %outtext %next
}
%firsttime = 0;
}
else {
if (%text != $null) {
say %continue %outtext %next
}
else {
if (%textlen <= 945) {
say %continue %outtext %done
}
else {
say %continue %outtext %more
}
}
}
}
halt
}
}
}
"Sic gorgiamus allos subjectatos nunc." We gladly feast on those who would subdue us. Not just pretty words
User avatar
Volo
Novice
Novice
 
Posts: 11
Joined: Fri Aug 29, 2008 10:58 pm

Re: mIRC Cut Script

Postby Cayenne on Fri Mar 05, 2010 8:25 pm

Just in case this doesn't work for some people - because of copying problems here is my slightly edited version (Because I don't like words!)

Code: Select all
on *:input:*: {
  if ( ( $left($1,1) != / ) || ( $1 == /me ) ) {
    var %next = ...
    var %continue = ...
    var %more = ...
    var %textlen = $len($1-)
    if (%textlen > 400) {
      var %pos = 1
      var %text = $mid($1-, %pos, 400)
      var %firsttime = 1

      while ( %text != $null ) {
        if ( $len($deltok(%text, -1, 32)) < 370 ) {
          %text = $left(%text, 370)
          inc %pos 370
        }
        else {
          %text = $deltok(%text,-1,32)
          inc %pos $len(%text)
          inc %pos
        }
        var %outtext = %text
        %text = $mid($1-, %pos, 400)
        if (%firsttime == 1) {
          if ($gettok(%outtext, 1, 32) == /me) {
            %outtext %next
          }
          else {
            say %outtext %next
          }
          %firsttime = 0;
        }
        else {
          if (%text != $null) {
            say %continue %outtext %next
          }
          else {
            if (%textlen <= 945) {
              say %continue %outtext %done
            }
            else {
              say %continue %outtext %more
            }
          }
        }
      }
      halt
    }
  }
}
User avatar
Cayenne
Adept
Adept
 
Posts: 56
Joined: Sat Jan 05, 2008 4:34 pm


Return to Public Service

Who is online

Users browsing this forum: No registered users and 1 guest


cron