Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.79 KB | None | 0 0
  1. dialog q {
  2. title "Quote System."
  3. size -1 -1 179 165
  4. option dbu
  5. box "Quote List", 1, 2 2 175 77
  6. list 2, 4 11 171 57, size hsbar vsbar
  7. box "Usermode Access !addquote", 3, 2 79 87 22
  8. check "All", 4, 4 88 16 9
  9. check "+o", 5, 20 88 18 9
  10. check "+h", 6, 38 88 18 9
  11. check "+v", 7, 56 88 19 9
  12. check "r", 8, 75 88 13 9
  13. box "Usermode Access !quote", 9, 90 79 87 22
  14. check "All", 10, 92 88 16 9
  15. check "+o", 11, 108 88 18 9
  16. check "+h", 12, 126 88 18 9
  17. check "+v", 13, 144 88 18 9
  18. check "r", 14, 162 88 13 9
  19. box "Add/Rem Channels", 15, 2 102 54 61
  20. edit "", 16, 4 111 50 9, autohs
  21. list 17, 4 121 50 28, size
  22. button "Add", 18, 4 151 25 10, flat
  23. button "Rem", 19, 29 151 25 10, flat
  24. box "Add/Rem Quote's", 20, 57 102 120 31
  25. edit "", 21, 59 111 116 9, autohs
  26. button "Add", 22, 59 121 58 10, flat
  27. button "Remove", 23, 117 121 58 10, flat
  28. box "Functions", 24, 57 137 64 26
  29. button "Echo", 25, 59 148 20 10, flat
  30. button "Msg", 26, 79 148 20 10, flat
  31. button "Close", 27, 99 148 20 10, flat cancel
  32. box "Flood Control", 28, 122 137 55 26
  33. button "Set", 29, 124 148 31 10, flat
  34. edit "", 30, 156 148 18 9, center
  35. text "", 31, 4 69 84 8, center
  36. text "", 32, 91 69 84 8, center
  37. }
  38. on *:exit:{ hsave quotes quotes.hsh }
  39. on *:start:{ if (!$hget(quotes)) { hmake quotes 100 } | hload quotes quotes.hsh }
  40. on *:load:{ if (!$hget(quotes)) { hmake quotes 100 } | hload quotes quotes.hsh }
  41. alias -l quotes { var %x = 1 | while (%x <= $hget(quotes,0).item) { did -za q 2 $hget(quotes,%x) | inc %x } }
  42. menu menubar,channel {
  43. .Quote System:{ dialog $iif($dialog(q),-v,-md) q q }
  44. }
  45. on *:dialog:q:init:0:{
  46. if (%q.aa1) { did -c $dname 4 }
  47. if (%q.ao1) { did -c $dname 5 }
  48. if (%q.ah1) { did -c $dname 6 }
  49. if (%q.av1) { did -c $dname 7 }
  50. if (%q.ar1) { did -c $dname 8 }
  51. if (%q.aa2) { did -c $dname 10 }
  52. if (%q.ao2) { did -c $dname 11 }
  53. if (%q.ah2) { did -c $dname 12 }
  54. if (%q.av2) { did -c $dname 13 }
  55. if (%q.ar2) { did -c $dname 14 }
  56. did -a $dname 30 %floodsec
  57. did -a $dname 32 Quote Number $iif(!$did(2).sel,0,$did(2).sel) Selected
  58. did -a $dname 31 $hget(quotes,0).item Quotes Total
  59. didtok $dname 17 44 %quotechan
  60. $quotes
  61. }
  62. on *:dialog:q:sclick:*:{
  63. if ($did == 25) { if (!$did(2).seltext) { noop $input(Please Select A Quote To Echo,uwo,Error!) } | else { echo -a 13[[Quote13]]3 $+($chr(40),$did(2).sel,$chr(32),$chr(47),$chr(32),$hget(quotes,0).item,$chr(41)) $did(2).seltext } }
  64. if ($did == 26) { if (!$did(2).seltext) { noop $input(Please Select A Quote To Message,uwo,Error!) } | else { msg $active 13[[Quote13]]3 $+($chr(40),$did(2).sel,$chr(32),$chr(47),$chr(32),$hget(quotes,0).item,$chr(41)) $did(2).seltext } }
  65. if ($did == 5 || $did == 6 || $did == 7 || $did == 8) { did -u $dname 4 }
  66. if ($did == 4) { did -u $dname 5-8 }
  67. if ($did == 11 || $did == 12 || $did == 13 || $did == 14) { did -u $dname 10 }
  68. if ($did == 10) { did -u $dname 11-14 }
  69. $iif($did(4).state == 0,unset %q.aa1,set %q.aa1 ohvr)
  70. $iif($did(5).state == 0,unset %q.ao1,set %q.ao1 o)
  71. $iif($did(6).state == 0,unset %q.ah1,set %q.ah1 h)
  72. $iif($did(7).state == 0,unset %q.av1,set %q.av1 v)
  73. $iif($did(8).state == 0,unset %q.ar1,set %q.ar1 r)
  74. $iif($did(10).state == 0,unset %q.aa2,set %q.aa2 ohvr)
  75. $iif($did(11).state == 0,unset %q.ao2,set %q.ao2 o)
  76. $iif($did(12).state == 0,unset %q.ah2,set %q.ah2 h)
  77. $iif($did(13).state == 0,unset %q.av2,set %q.av2 v)
  78. $iif($did(14).state == 0,unset %q.ar2,set %q.ar2 r)
  79. if ($did == 2) { did -ra $dname 32 Quote Number $did(2).sel Selected }
  80. if ($did == 18) {
  81. if (!$did(16).text || $left($did(16).text,1) != $chr(35) || $istok(%quotechan,$did(16).text,44)) {
  82. noop $iif(!$did(16).text,$input(No Channel Was Entered,uwo,Error!),$iif($left($did(16).text,1) != $chr(35),$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($istok(%quotechan,$did(16).text,44),$input(Channel Already Exists,uwo,Error!),)))
  83. did -r $dname 16
  84. }
  85. else {
  86. set %quotechan $addtok(%quotechan,$did(16).text,44)
  87. did -r $dname 16,17
  88. didtok $dname 17 44 %quotechan
  89. }
  90. }
  91. if ($did == 19) {
  92. if (!$did(16).text && !$did(17).seltext || $left($did(16).text,1) != $chr(35) && !$did(17).seltext || $did(16).text && !$did(17).seltext && !$istok(%quotechan,$did(16).text,44)) {
  93. noop $iif(!$did(16).text && !$did(17).seltext,$input(No Channel Was Entered Or Selected,uwo,Error!),$iif($left($did(16).text,1) != $chr(35) && !$did(17).seltext,$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($did(16).text && !$did(17).seltext && !$istok(%quotechan,$did(16).text,44),$input(Channel Does Not Exists,uwo,Error!),)))
  94. did -r $dname 16
  95. }
  96. elseif ($did(16).text && !$did(17).seltext && $istok(%quotechan,$did(16).text,44)) {
  97. set %quotechan $remtok(%quotechan,$did(16).text,1,44)
  98. did -r $dname 16,17
  99. didtok $dname 17 44 %quotechan
  100. }
  101. elseif ($did(17).seltext && !$did(16).text) {
  102. set %quotechan $remtok(%quotechan,$did(17).seltext,1,44)
  103. did -r $dname 16,17
  104. didtok $dname 17 44 %quotechan
  105. }
  106. }
  107. if ($did == 29) { if ($did(30).text !isnum || !$did(30).text) { noop $input(Please Enter Number Of Second's For Flood Control,uwo,Error!) | did -r $dname 30 } | else { set %floodsec $did(30).text } }
  108. if ($did == 22) { if (!$did(21).text) { noop $input(No Quote Was Entered. Please Enter A Quote.,uwo,Error!) } | else { hadd quotes $calc($hget(quotes,0).item +1) 13Was Added By 4 $me $+ 13:3 $did(21).text | noop $input(Quote $did(21).text Was Entered.,uio,Entered!) | did -r $dname 21,2 | $quotes | did -ra $dname 32 Quote Number 0 Selected | did -a $dname 31 $hget(quotes,0).item Quotes Total } }
  109. if ($did == 23) { if (!$did(2).sel) { noop $input(No Quote Was Selected. Please Select A Quote From The List.,uwo,Error!) } | else { noop $input(Quote $did(2).seltext Has Been Deleted.,uio,Deleted!) | hdel quotes $did(2).sel | did -r $dname 2 | $quotes | did -ra $dname 32 Quote Number 0 Selected | did -a $dname 31 $hget(quotes,0).item Quotes Total } }
  110. }
  111. on $*:TEXT:/^[!.]q/Si:#: {
  112. if ($istok(%quotechan,$chan,44) && !$($+(%,quote,flood),2)) {
  113. set -u $+ %floodsec $+(%,quote,flood) on
  114. if (!$2) { var %@ = $hget(quotes,$r(1,$hget(quotes,0).item)).item | notice $nick 13[[4RANDOM QUOTE13]]3 $+($chr(40),%@,$chr(47),$hget(quotes,0).item,$chr(41)) 3 $hget(quotes,%@) 13(Added At3 $time 13On $+ 3 $date $+ 13.) }
  115. elseif ($2 !isnum 1- $+ $hget(quotes,0).item) { notice $nick Sorry $nick But That Quote Number Does Not Exist. Please Pick A Valid Quote Number }
  116. elseif ($hget(quotes,$2)) { notice $nick 13[[4QUOTE13]]3 $+($chr(40),$2,$chr(47),$hget(quotes,0).item,$chr(41)) $hget(quotes,$2) 13(Added At3 $time 13On 3 $date $+ 13.) }
  117. }
  118. }
  119.  
  120. on $*:TEXT:/^[@]q/Si:#: {
  121. if ($istok(%quotechan,$chan,44) && !$($+(%,quote,flood),2)) {
  122. if (!$2) { var %@ = $hget(quotes,$r(1,$hget(quotes,0).item)).item | msg $chan 13[[4RANDOM QUOTE13]]3 $+($chr(40),%@,$chr(47),$hget(quotes,0).item,$chr(41)) 3 $hget(quotes,%@) 13(Added At3 $time 13On $+ 3 $date $+ 13.) }
  123. elseif ($2 !isnum 1- $+ $hget(quotes,0).item) { notice $nick Sorry $nick But That Quote Number Does Not Exist. Please Pick A Valid Quote Number }
  124. elseif ($hget(quotes,$2)) { msg $chan 13[[4QUOTE13]]3 $+($chr(40),$2,$chr(47),$hget(quotes,0).item,$chr(41)) $hget(quotes,$2) 13(Added At3 $time 13On $+ 3 $date $+ 13.) }
  125. }
  126. }
  127.  
  128. on $*:TEXT:/^[!.@]new/Si:#: {
  129. if ($nick(#,$nick,oh)) {
  130. hadd quotes $calc($hget(quotes,0).item +1) 13Was Added By 4 $nick $+ 13:3 $2-
  131. notice $nick 13[[4QUOTE13]] 4 $2- 3Has Been Sucessfully Added To My Database As Quote Number4 $hget(quotes,0).item
  132. if ($dialog(q)) { did -r q 2 | $quotes }
  133. }
  134. }
  135.  
  136. ;;Credits to napa for making, i added some areas.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement