KeiroD

Keiro

Jul 18th, 2010
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.98 KB | None | 0 0
  1. dialog essay {
  2. size -1 -1 440 405
  3. title "Advanced Cut-Script. Modified by Keiro to work semi-properly in mIRC."
  4. 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
  5. edit "/me", 2, 10 50 420 320, vsbar, multi, return
  6. button "&Send to Active", 3, 40 372 100 23
  7. button "Exit", 4, 290 372 100 23, cancel
  8. button "Customize", 5, 165 372 100 23
  9. }
  10. alias essay {
  11. if ($dialog(essay) != $null) { dialog -v essay | halt }
  12. else { dialog -md essay essay }
  13. }
  14. on *:dialog:essay:init:*:{
  15. }
  16. on *:DIALOG:essay:sclick:*:{
  17. if ($did == 3) {
  18. set %linesessay.test $did(essay,2).lines
  19. var %e = 1
  20. set %essaylen.test 0
  21. while (%e <= %linesessay.test) {
  22. set %essaylen.test $calc(%essaylen.test + $len($did(essay,2,%e).text)))
  23. inc %e
  24. }
  25. %len = 424 - $len($me)
  26. if (%essaylen.test > %len) {
  27. set %cuts $calc($int($calc(%essaylen.test / 424)) + 1)
  28. goto next
  29. }
  30. else {
  31. var %e = 1
  32. set %nocut $remove($did(essay,2,1).text,/me)
  33. inc %e
  34. while (%e <= %linesessay.test) {
  35. set %nocut [ %nocut ] $did(essay,2,%e)
  36. inc %e
  37. }
  38. printnocut
  39. goto end
  40. }
  41. :next
  42. var %c = 1
  43. var %l = 1
  44. unset %cut.*
  45. set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $&
  46. $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
  47. /describe $active $remove(%cut. [ $+ [ %c ] ],/me) ...
  48. inc %c
  49. inc %l 5
  50. while (%c <= $calc(%cuts -1)) {
  51. set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $&
  52. $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
  53. /describe $active -- %cut. [ $+ [ %c ] ] ...
  54. inc %c 1
  55. inc %l 5
  56. }
  57. set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $&
  58. $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
  59. /describe $active -- %cut. [ $+ [ %c ] ] ...
  60. inc %l 5
  61. inc %c 1
  62. set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $&
  63. $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4))
  64. /describe $active -- %cut. [ $+ [ %c ] ] <end>
  65. }
  66. :end
  67. halt
  68. }
  69. alias QuoteEncode {
  70. %CSQtext = $1-
  71.  
  72. %whisperTone = 13[
  73.  
  74. ;normal speech color set
  75. %normalTone = 14"
  76.  
  77. ;OOC color setting
  78. %loudTone = 10((
  79.  
  80. ;sets colors off at end *DO NOT CHANGE*
  81. %endTone = " 10
  82. %endTone3 = ] 10
  83. %endTone4 = )) 10
  84.  
  85. %whisperQuote = [
  86. %normalQuote = "
  87. %loudQuote = ((
  88.  
  89. %endquote = "
  90. %endquote3 = ]
  91. %endquote4 = ))
  92.  
  93. %CSQtext = $replace(%CSQtext,$chr(32) $+ %whisperQuote,$chr(32) $+ %whisperTone)
  94. %CSQtext = $replace(%CSQtext,$chr(32) $+ %normalQuote,$chr(32) $+ %normalTone)
  95. %CSQtext = $replace(%CSQtext,$chr(32) $+ %loudQuote,$chr(32) $+ %loudTone)
  96. %CSQtext = $replace(%CSQtext,%endQuote $+ $chr(32),%endTone $+ $chr(32))
  97. %CSQtext = $replace(%CSQtext,%endQuote3 $+ $chr(32),%endTone3 $+ $chr(32))
  98. %CSQtext = $replace(%CSQtext,%endQuote4 $+ $chr(32),%endTone4 $+ $chr(32))
  99. /return %CSQtext
  100. }
  101. }
  102. alias printnocut {
  103. /describe $active $QuoteEncode(%nocut)
Add Comment
Please, Sign In to add comment