Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dialog q {
- title "Quote System."
- size -1 -1 179 165
- option dbu
- box "Quote List", 1, 2 2 175 77
- list 2, 4 11 171 57, size hsbar vsbar
- box "Usermode Access !addquote", 3, 2 79 87 22
- check "All", 4, 4 88 16 9
- check "+o", 5, 20 88 18 9
- check "+h", 6, 38 88 18 9
- check "+v", 7, 56 88 19 9
- check "r", 8, 75 88 13 9
- box "Usermode Access !quote", 9, 90 79 87 22
- check "All", 10, 92 88 16 9
- check "+o", 11, 108 88 18 9
- check "+h", 12, 126 88 18 9
- check "+v", 13, 144 88 18 9
- check "r", 14, 162 88 13 9
- box "Add/Rem Channels", 15, 2 102 54 61
- edit "", 16, 4 111 50 9, autohs
- list 17, 4 121 50 28, size
- button "Add", 18, 4 151 25 10, flat
- button "Rem", 19, 29 151 25 10, flat
- box "Add/Rem Quote's", 20, 57 102 120 31
- edit "", 21, 59 111 116 9, autohs
- button "Add", 22, 59 121 58 10, flat
- button "Remove", 23, 117 121 58 10, flat
- box "Functions", 24, 57 137 64 26
- button "Echo", 25, 59 148 20 10, flat
- button "Msg", 26, 79 148 20 10, flat
- button "Close", 27, 99 148 20 10, flat cancel
- box "Flood Control", 28, 122 137 55 26
- button "Set", 29, 124 148 31 10, flat
- edit "", 30, 156 148 18 9, center
- text "", 31, 4 69 84 8, center
- text "", 32, 91 69 84 8, center
- }
- on *:exit:{ hsave quotes quotes.hsh }
- on *:start:{ if (!$hget(quotes)) { hmake quotes 100 } | hload quotes quotes.hsh }
- on *:load:{ if (!$hget(quotes)) { hmake quotes 100 } | hload quotes quotes.hsh }
- alias -l quotes { var %x = 1 | while (%x <= $hget(quotes,0).item) { did -za q 2 $hget(quotes,%x) | inc %x } }
- menu menubar,channel {
- .Quote System:{ dialog $iif($dialog(q),-v,-md) q q }
- }
- on *:dialog:q:init:0:{
- if (%q.aa1) { did -c $dname 4 }
- if (%q.ao1) { did -c $dname 5 }
- if (%q.ah1) { did -c $dname 6 }
- if (%q.av1) { did -c $dname 7 }
- if (%q.ar1) { did -c $dname 8 }
- if (%q.aa2) { did -c $dname 10 }
- if (%q.ao2) { did -c $dname 11 }
- if (%q.ah2) { did -c $dname 12 }
- if (%q.av2) { did -c $dname 13 }
- if (%q.ar2) { did -c $dname 14 }
- did -a $dname 30 %floodsec
- did -a $dname 32 Quote Number $iif(!$did(2).sel,0,$did(2).sel) Selected
- did -a $dname 31 $hget(quotes,0).item Quotes Total
- didtok $dname 17 44 %quotechan
- $quotes
- }
- on *:dialog:q:sclick:*:{
- 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 } }
- 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 } }
- if ($did == 5 || $did == 6 || $did == 7 || $did == 8) { did -u $dname 4 }
- if ($did == 4) { did -u $dname 5-8 }
- if ($did == 11 || $did == 12 || $did == 13 || $did == 14) { did -u $dname 10 }
- if ($did == 10) { did -u $dname 11-14 }
- $iif($did(4).state == 0,unset %q.aa1,set %q.aa1 ohvr)
- $iif($did(5).state == 0,unset %q.ao1,set %q.ao1 o)
- $iif($did(6).state == 0,unset %q.ah1,set %q.ah1 h)
- $iif($did(7).state == 0,unset %q.av1,set %q.av1 v)
- $iif($did(8).state == 0,unset %q.ar1,set %q.ar1 r)
- $iif($did(10).state == 0,unset %q.aa2,set %q.aa2 ohvr)
- $iif($did(11).state == 0,unset %q.ao2,set %q.ao2 o)
- $iif($did(12).state == 0,unset %q.ah2,set %q.ah2 h)
- $iif($did(13).state == 0,unset %q.av2,set %q.av2 v)
- $iif($did(14).state == 0,unset %q.ar2,set %q.ar2 r)
- if ($did == 2) { did -ra $dname 32 Quote Number $did(2).sel Selected }
- if ($did == 18) {
- if (!$did(16).text || $left($did(16).text,1) != $chr(35) || $istok(%quotechan,$did(16).text,44)) {
- 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!),)))
- did -r $dname 16
- }
- else {
- set %quotechan $addtok(%quotechan,$did(16).text,44)
- did -r $dname 16,17
- didtok $dname 17 44 %quotechan
- }
- }
- if ($did == 19) {
- 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)) {
- 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!),)))
- did -r $dname 16
- }
- elseif ($did(16).text && !$did(17).seltext && $istok(%quotechan,$did(16).text,44)) {
- set %quotechan $remtok(%quotechan,$did(16).text,1,44)
- did -r $dname 16,17
- didtok $dname 17 44 %quotechan
- }
- elseif ($did(17).seltext && !$did(16).text) {
- set %quotechan $remtok(%quotechan,$did(17).seltext,1,44)
- did -r $dname 16,17
- didtok $dname 17 44 %quotechan
- }
- }
- 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 } }
- 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 } }
- 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 } }
- }
- on $*:TEXT:/^[!.]q/Si:#: {
- if ($istok(%quotechan,$chan,44) && !$($+(%,quote,flood),2)) {
- set -u $+ %floodsec $+(%,quote,flood) on
- 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.) }
- 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 }
- 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.) }
- }
- }
- on $*:TEXT:/^[@]q/Si:#: {
- if ($istok(%quotechan,$chan,44) && !$($+(%,quote,flood),2)) {
- 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.) }
- 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 }
- 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.) }
- }
- }
- on $*:TEXT:/^[!.@]new/Si:#: {
- if ($nick(#,$nick,oh)) {
- hadd quotes $calc($hget(quotes,0).item +1) 13Was Added By 4 $nick $+ 13:3 $2-
- notice $nick 13[[4QUOTE13]] 4 $2- 3Has Been Sucessfully Added To My Database As Quote Number4 $hget(quotes,0).item
- if ($dialog(q)) { did -r q 2 | $quotes }
- }
- }
- ;;Credits to napa for making, i added some areas.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement