the Dragongate

the Dragongate (http://www.togrchosting.com/dragongate/index.php)
-   IRC tricks and help (http://www.togrchosting.com/dragongate/forumdisplay.php?f=36)
-   -   long cutscript (http://www.togrchosting.com/dragongate/showthread.php?t=496)

Megera 11-09-2004 03:21 PM

long cutscript
 
Code:

cutscript

on *:input:*: {
  if ( ( $left($1,1) != / ) || ( $1 == /me ) ) {
    var %next    = <cut>
    var %continue = <cont>
    var %done    = <done>
    var %more    = <wait>
    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
    }
  }
}



All times are GMT -8. The time now is 05:35 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
in business of RP since 1978 - the dragongate has been around since 1994 - all things posted here are considered part of the dragongate and should be left when you part its domain lest dragons eat you up.