Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dialog essay {
- size -1 -1 440 405
- title "Advanced Cut-Script. Modified by Keiro to work semi-properly in mIRC."
- edit "Type your post, then hit Send to Active. Will not work when switching channels. I do not know how to fix this particular issue.", 1, 10 5 420 40, read, return, multi
- edit "/me", 2, 10 50 420 320, vsbar, multi, return
- button "&Send to Active", 3, 40 372 100 23
- button "Exit", 4, 290 372 100 23, cancel
- button "Customize", 5, 165 372 100 23
- }
- alias essay {
- if ($dialog(essay) != $null) { dialog -v essay | halt }
- else { dialog -md essay essay }
- }
- on *:dialog:essay:init:*:{
- }
- on *:DIALOG:essay:sclick:*:{
- if ($did == 3) {
- set %linesessay.test $did(essay,2).lines
- var %e = 1
- set %essaylen.test 0
- while (%e <= %linesessay.test) {
- set %essaylen.test $calc(%essaylen.test + $len($did(essay,2,%e).text)))
- inc %e
- }
- %len = 424 - $len($me)
- if (%essaylen.test > %len) {
- set %cuts $calc($int($calc(%essaylen.test / 424)) + 1)
- goto next
- }
- else {
- var %e = 1
- set %nocut $remove($did(essay,2,1).text,/me)
- inc %e
- while (%e <= %linesessay.test) {
- set %nocut [ %nocut ] $did(essay,2,%e)
- inc %e
- }
- printnocut
- goto end
- }
- :next
- var %c = 1
- var %l = 1
- unset %cut.*
- set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $&
- $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
- /describe $active $remove(%cut. [ $+ [ %c ] ],/me) ...
- inc %c
- inc %l 5
- while (%c <= $calc(%cuts -1)) {
- set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $&
- $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
- /describe $active -- %cut. [ $+ [ %c ] ] ...
- inc %c 1
- inc %l 5
- }
- set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $&
- $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
- /describe $active -- %cut. [ $+ [ %c ] ] ...
- inc %l 5
- inc %c 1
- set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $&
- $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
- /describe $active -- %cut. [ $+ [ %c ] ] <end>
- }
- :end
- halt
- }
- alias QuoteEncode {
- %CSQtext = $1-
- %whisperTone = 13[
- ;normal speech color set
- %normalTone = 14"
- ;OOC color setting
- %loudTone = 10((
- ;sets colors off at end *DO NOT CHANGE*
- %endTone = " 10
- %endTone3 = ] 10
- %endTone4 = )) 10
- %whisperQuote = [
- %normalQuote = "
- %loudQuote = ((
- %endquote = "
- %endquote3 = ]
- %endquote4 = ))
- %CSQtext = $replace(%CSQtext,$chr(32) $+ %whisperQuote,$chr(32) $+ %whisperTone)
- %CSQtext = $replace(%CSQtext,$chr(32) $+ %normalQuote,$chr(32) $+ %normalTone)
- %CSQtext = $replace(%CSQtext,$chr(32) $+ %loudQuote,$chr(32) $+ %loudTone)
- %CSQtext = $replace(%CSQtext,%endQuote $+ $chr(32),%endTone $+ $chr(32))
- %CSQtext = $replace(%CSQtext,%endQuote3 $+ $chr(32),%endTone3 $+ $chr(32))
- %CSQtext = $replace(%CSQtext,%endQuote4 $+ $chr(32),%endTone4 $+ $chr(32))
- /return %CSQtext
- }
- }
- alias printnocut {
- /describe $active $QuoteEncode(%nocut)
Add Comment
Please, Sign In to add comment