Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.92 KB | None | 0 0
  1.  
  2. menu channel {
  3. Mass slap!
  4. .$iif($group(#slap) == on,Slap off,Slap on) : $iif($group(#slap) == on,.disable,.enable) #slap
  5. .$iif($group(#slap) == off,$style(2) Slap all,Slap all) : slapall
  6. }
  7. #slap on
  8. alias slapall {
  9. if $($+(%,sent,.,$chan),2) { return }
  10. beep 2 | var %warn $input(There are $nick($active,0) user(s) in the channel $+ $chr(44) are you sure you wish to continue?,yv,Warning!)
  11. if (%warn == $yes) {
  12. var %x = 1, %y = $nick($active,0)
  13. while (%x <= %y) {
  14. if (!$istok($me,$nick($active,%x),32)) {
  15. $+(.timer,.,$chan,.,%x) 1 %x describe # lets $nick($active,%x) suck my big dick }
  16. inc %x
  17. }
  18. set -u10 $+(%,sent,.,$chan) 1
  19. }
  20. }
  21. #slap end
  22.  
  23. alias colors {
  24. ; /colors blah blah
  25. var %x 2
  26. while (%x < 16) {
  27. say $+($chr(3),%x,$1-)
  28. inc %x
  29. }
  30. }
  31. alias massinvite {
  32. if ( !$1 ) {
  33. echo -a * /massinvite: insufficient parameters
  34. halt
  35. }
  36. if ( !$2 ) {
  37. echo -a * /massinvite: insufficient parameters
  38. halt
  39. }
  40. set %nicks 1
  41. while ( %nicks <= $nick($1,0) ) {
  42. invite $nick($1,%nicks) $2
  43. inc %nicks
  44. }
  45. unset %nicks
  46. halt
  47.  
  48. }on *:ACTION:$(slaps $me $+ *):#:msg $chan $nick yes... scratch me, bite me, give me petnames...
  49. huge { if (%hugemode) { font -z $v1 | unset %hugemode } | else { set %hugemode $window($active).fontsize $qt($window($active).font) | font -z $calc($window($active).fontsize *3) $qt($window($active).font) } }
  50. digittime {
  51. var %i = $int($1),%s,%m = 0
  52. if (%i >= 86400) {
  53. %s = %s $+ $int($calc(%i /86400)) $+ d
  54. %i = $calc(%i % 86400)
  55. }
  56. if (%i >= 3600) || (%m) {
  57. %s = %s $int($calc(%i /3600)) $+ :
  58. %i = $calc(%i % 3600)
  59. %m = 1
  60. }
  61. if (%i >= 60) || (%m) {
  62. %s = %s $+ $base($int($calc(%i /60)),10,10,$iif(%m,2,1)) $+ :
  63. %i = $calc(%i % 60)
  64. %m = 1
  65. }
  66. %s = %s $+ $base(%i,10,10,$iif(%m,2,1))
  67. return %s
  68. }
  69.  
  70. dialog Slapsss {
  71. title "Slaps"
  72. size -1 -1 208 80
  73. option dbu
  74. box "Menu", 1, 175 2 28 54
  75. box "Slaps", 2, 4 2 172 54
  76. box "", 3, 4 52 172 23
  77. button "close", 4, 177 67 26 8
  78. button "save", 5, 177 58 26 8
  79. combo 6, 7 10 166 45, size vsbar
  80. text "Enter a new Slap like: SLAPNAME:ME SLAPS §NICK WITH NOTHING", 7, 7 57 167 8
  81. text "Klick Add to add a line or mark a line and click Del to delete it!", 8, 7 65 168 8
  82. button add, 9, 178 10 23 8
  83. button del, 10, 178 21 23 8
  84. button up, 11, 178 34 23 8
  85. button down, 12, 178 45 23 8
  86. }
  87. on *:dialog:slapsss:init:*: {
  88. unset %slapsss
  89. var %x = $lines(slaps.txt),%y = 0
  90. while (%x > %y) {
  91. inc %y
  92. did -a $dname 6 $read(slaps.txt,%y)
  93. }
  94. }
  95. alias slaaaps {
  96. var %x = $lines(slaps.txt),%y = 0
  97. while (%x > %y) {
  98. inc %y
  99. return $read(slaps.txt,%y)
  100. }
  101. }
  102. menu nicklist {
  103. &Slaps
  104. .$submenu($replace($slaplist($1),§nick,$snicks))
  105. }
  106. alias slaplist {
  107. if ($istok(begin end,$1,32)) return -
  108. if ($1 isnum) {
  109. return $read(slaps.txt,$1)
  110. }
  111. }
  112. on *:dialog:slapsss:close:*: { unset %slapsss }
  113. on *:connect: { if (%slaaps) { unset %slapsss } }
  114. on *:dialog:slapsss:sclick:*: {
  115. if (($did != 5) && ($did != 4)) {
  116. set %slapsss on
  117. if ($did == 9) {
  118. if (($chr(58) isin $did($dname,6)) && ($mid($gettok($did($dname,6),1,32),$calc($len($gettok($did($dname,6),1,58)) + 1),1) == $chr(58))) {
  119. did -a $dname 6 $did($dname,6)
  120. }
  121. else { echo -a Error: Please use SLAPNAME:ME SLAPS §NICK ... }
  122. }
  123. if ($did == 10) {
  124. did -d $dname 6 $did($dname,6).sel
  125. }
  126. if ($did == 11) {
  127. if ($calc($did($dname,6).sel -1) >= 1) {
  128. did -i $dname 6 $calc($did($dname,6).sel -1) $did($dname,6).seltext
  129. did -d $dname 6 $did($dname,6).sel
  130. }
  131. }
  132. if ($did == 12) {
  133. if ($calc($did($dname,6).sel +1) <= $did($dname,6).lines) {
  134. did -i $dname 6 $calc($did($dname,6).sel +2) $did($dname,6).seltext
  135. did -d $dname 6 $did($dname,6).sel
  136. }
  137. }
  138. }
  139. if ($did == 5) {
  140. write -c slaps.txt
  141. var %x = $did($dname,6).lines,%y = 0
  142. while (%x > %y) {
  143. inc %y
  144. write slaps.txt $did($dname,6,%y)
  145. }
  146. unset %slapsss
  147. }
  148. if (($did == 4) && (%slapsss == on)) {
  149. if ($?!="Are you sure? You didn't save!" == $true) { dialog -x $dname }
  150. }
  151. elseif (($did == 4) && (!%slapsss)) { dialog -x $dname }
  152. }
  153. menu Channel {
  154. Config Slaps:slapsss
  155. -
  156. }
  157. alias slapsss { dialog -m $strr(slapsss,2) }
  158. alias strr { return $str($+($1,$chr(32)),$2) }
  159. menu channel {
  160. Mass slap!
  161. .$iif($group(#slap) == on,Slap off,Slap on) : $iif($group(#slap) == on,.disable,.enable) #slap
  162. .$iif($group(#slap) == off,$style(2) Slap all,Slap all) : slapall
  163. }
  164. #slap on
  165. alias slapall {
  166. if $($+(%,sent,.,$chan),2) { return }
  167. beep 2 | var %warn $input(There are $nick($active,0) user(s) in the channel $+ $chr(44) are you sure you wish to continue?,yv,Warning!)
  168. if (%warn == $yes) {
  169. var %x = 1, %y = $nick($active,0)
  170. while (%x <= %y) {
  171. if (!$istok($me,$nick($active,%x),32)) {
  172. $+(.timer,.,$chan,.,%x) 1 %x describe # slaps $nick($active,%x) around a bit with a large trout
  173. }
  174. inc %x
  175. }
  176. set -u10 $+(%,sent,.,$chan) 1
  177. }
  178. }
  179. #slap end
  180. ; ––––––––––––––––––––––––––––––––––––––––
  181. ; Put your own scripts in here.
  182. ; ––––––––––––––––––––––––––––––––––––––––
  183.  
  184.  
  185.  
  186. ; ––––––––––––––––––––––––––––––––––––––––
  187. ; End of file
  188. ; ––––––––––––––––––––––––––––––––––––––––
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement