Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [script]
- n0=on 500,543:TEXT:*:#: { halt }
- n1=on *:LOAD: {
- n2= echo -at Loaded scripting mode
- n3= echo -at No new variables added, all are global
- n4=}
- n5=on *:UNLOAD: {
- n6= .unload -rs testscript.ini
- n7= echo -at Unloaded scripting mode
- n8= echo -at No variables unset, all are global. Unloaded test script
- n9=}
- n10=
- n11=on *:TEXT:!addcmd*:#: {
- n12= if ($nick == %owner && $me == %bot1 && $1 == !addcmd) {
- n13= if ($2 == $null) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd <command> | halt }
- n14= elseif ($2 == on) {
- n15= if ($3 == $null) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd on (Optional: <#|?|*>) <trigger> | halt }
- n16= elseif ($4 == $null) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd on (Optional: <#|?|*>) <trigger> | halt }
- n17= elseif (($3 == $chr(35) || $3 == $chr(63) || $3 == $chr(42)) && $4 == $null) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd on <#|?|*> <trigger> | halt }
- n18= elseif ($left($3,1) == $chr(35) || $3 == $chr(63) || $3 == $chr(42)) {
- n19= writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 1) $2 *:TEXT: $+ $4- $+ : $+ $3 $+ : $chr(123)
- n20= if ($3 == ?) { scon $bot_say($chan) msg $chan Responding on message " $+ $replace($4- ,*,<text>) $+ " in all queries }
- n21= elseif ($3 == *) { scon $bot_say($chan) msg $chan Responding on message " $+ $replace($4- ,*,<text>) $+ " in all windows }
- n22= elseif ($3 == $chr(35)) { scon $bot_say($chan) msg $chan Responding on message " $+ $replace($4- ,*,<text>) $+ " in all channels }
- n23= else { scon $bot_say($chan) msg $chan Responding on message " $+ $replace($4- ,*,<text>) $+ " in channel $3 }
- n24= }
- n25= else {
- n26= writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 1) $2 *:TEXT: $+ $3- $+ :#: $chr(123)
- n27= scon $bot_say($chan) msg $chan Responding on message " $+ $replace($3- ,*,<text>) $+ " in all channels
- n28= }
- n29= }
- n30= else {
- n31= if ($2 == if) {
- n32= if ($3) { scon $bot_say($chan) msg $chan Only responding if $replace($3- , isop, has @ on, ishop, has % on, isprotect, has & on, isvoice, has + on, ison, is online at) }
- n33= else { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd if <comparison> | halt }
- n34= }
- n35= elseif ($2 == msg) {
- n36= if ($4 != $null && ($me ison $3 || $3 ison $chan)) { scon $bot_say($chan) msg $chan 4ERROR: $3 is not a channel/ $+ $3 is not in the channel | halt }
- n37= elseif ($4) { scon $bot_say($chan) msg $chan Send message $4- }
- n38= elseif ($3) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd msg <channel> <message> | halt }
- n39= else { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd msg <channel> <message> | halt }
- n40= }
- n41= elseif ($2 == .timer || $2 == timer) {
- n42= if ($3 == $null || $3 !isnum) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer <amount of repeats> <delay> <commands> | halt }
- n43= elseif ($4 == $null || $4 !isnum) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer <amount of repeats> <delay> <commands> | halt }
- n44= elseif ($5 == $null) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer <amount of repeats> <delay> <commands> | halt }
- n45= elseif ($3 == 1) {
- n46= if ($5 == if) {
- n47= if ($6) { scon $bot_say($chan) msg $chan Timer: Wait $4 $+ secs till checking if $replace($6- , isop, has @ on, ishop, has % on, isprotect, has & on, isvoice, has + on, ison, is online at) }
- n48= else { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer 1 <delay> if <comparison> <bracket> | halt }
- n49= }
- n50= elseif ($5 == msg) {
- n51= if ($7) { scon $bot_say($chan) msg $chan Send message $7- after $4 $+ secs }
- n52= elseif ($6) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer 1 <delay> msg <channel> <message> | halt }
- n53= else { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer 1 <delay> msg <channel> <message> | halt }
- n54= }
- n55= }
- n56= else {
- n57= if ($5 == msg) {
- n58= if ($7) { scon $bot_say($chan) msg $chan Timer: Repeating message " $+ $7- $+ " $3 times, with a delay of $4 $+ secs. }
- n59= elseif ($6) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer <amount of repeats> <delay> msg <channel> <message> | halt }
- n60= else { scon $bot_say($chan) msg $chan 4ERROR: Usage: !addcmd .timer <amount of repeats> <delay> msg <channel> <message> | halt }
- n61= }
- n62= else { scon $bot_say($chan) msg $chan 4ERROR: Senseless timer? | halt }
- n63= }
- n64= }
- n65= elseif ($2 == $chr(125)) { scon $bot_say($chan) msg $chan Closing script... }
- n66= else { scon $bot_say($chan) msg $chan Unknown command for me... }
- n67= writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 1) $2-
- n68= }
- n69= scon $bot_say($chan) msg $chan Command written to testscript.ini (line $calc($readini(testscript.ini,mirc,lines) + 1) $+ )
- n70= writeini testscript.ini mirc lines $calc($readini(testscript.ini,mirc,lines) + 1)
- n71= }
- n72= elseif ($me == %bot1 && $1 == !addcmd) { scon $bot_say($chan) msg $chan 4ERROR: You are not authorized to use this command }
- n73=}
- n74=on *:TEXT:!delcmd*:#: {
- n75= if ($nick == %owner && $me == %bot1 && $1 == !delcmd) {
- n76= if ($2 == $null || $2 !isnum) { scon $bot_say($chan) msg $chan 4ERROR: Usage !delcmd <line> }
- n77= elseif ($2 == $readini(testscript.ini,mirc,lines)) {
- n78= scon $bot_say($chan) msg $chan Deleting $readini(testscript.ini,n,script,n $+ $2) $+ ...
- n79= remini testscript.ini script n $+ $2
- n80= if ($readini(testscript.ini,mirc,lines) > 1) {
- n81= writeini testscript.ini mirc lines $calc($readini(testscript.ini,mirc,lines) - 1)
- n82= }
- n83= else {
- n84= writeini testscript.ini mirc lines 0
- n85= scon $bot_say($chan) msg $chan Scripts section has been reset.
- n86= }
- n87= }
- n88= else {
- n89= scon $bot_say($chan) msg $chan Deleting $readini(testscript.ini,n,script,n $+ $2) $+ ...
- n90= writeini testscript.ini script n $+ $2 $crlf
- n91= }
- n92= }
- n93= elseif ($me == %bot1 && $1 == !delcmd) { scon $bot_say($chan) msg $chan 4ERROR: You are not authorized to use this command }
- n94=}
- n95=on *:TEXT:!shortcmd*:#: {
- n96= if ($nick == %owner && $me == %bot1 && $1 == !shortcmd) {
- n97= if ($2 == $null || ($2 != text && $2 != action)) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !shortcmd <text|action> <trigger> <cmds> }
- n98= elseif ($3 == $null) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !shortcmd <text>|action> <trigger> <cmds> }
- n99= elseif ($4 == $null) { scon $bot_say($chan) msg $chan 4ERROR: Usage: !shortcmd <text>|action> <trigger> <cmds> }
- n100= else {
- n101= writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 1) on *: $+ $2 $+ : $+ $3 $+ : $+ $active $+ : $chr(123)
- n102= writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 2) if ( $+ $chr(36) $+ me == $chr(37) $+ bot1) $chr(123)
- n103=
- n104= if ($4 == msg || $4 == describe) { writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 3) scid $+($chr(36),scon,$chr(40),$chr(36),bot_say,$chr(40),$chr(36),chan,$chr(41),$chr(41)) $4- }
- n105= else { writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 3) scid $+($chr(36),scon,$chr(40),$chr(36),bot_say,$chr(40),$chr(36),chan,$chr(41),$chr(41)) msg $chr(36) $+ chan $5- }
- n106=
- n107= writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 4) $chr(125)
- n108= writeini testscript.ini script n $+ $calc($readini(testscript.ini,mirc,lines) + 5) $chr(125)
- n109= writeini testscript.ini mirc lines $calc($readini(testscript.ini,mirc,lines) + 5)
- n110= .timer 1 1 .load -rs testscript.ini
- n111= scon $bot_say($chan) .timer 1 1 msg $chan Command written and scripts editor loaded
- n112= }
- n113= }
- n114= elseif ($me == %bot1 && $1 == !shortcmd) { scon $bot_say($chan) msg $chan 4ERROR: You are not authorized to use this command }
- n115=}
- n116=on *:TEXT:!clearcmds:#: {
- n117= if ($nick == %owner && $me == %bot1) {
- n118= remini testscript.ini script
- n119= writeini testscript.ini mirc lines 0
- n120= scon $bot_say($chan) msg $chan Scripts section has been reset.
- n121= }
- n122= elseif ($me == %bot1) { scon $bot_say($chan) msg $chan 4ERROR: You are not authorized to use this command }
- n123=}
- n124=on *:TEXT:!load:#: {
- n125= if ($nick == %owner && $me == %bot1) {
- n126= .load -rs testscript.ini
- n127= scon $bot_say($chan) msg $chan Loaded testscript.ini
- n128= }
- n129= elseif ($me == %bot1) { scon $bot_say($chan) msg $chan 4ERROR: You are not authorized to use this command }
- n130=}
- n131=on *:TEXT:!unload:#: {
- n132= if ($nick == %owner && $me == %bot1) {
- n133= .unload -rs testscript.ini
- n134= scon $bot_say($chan) msg $chan Unloaded testscript.ini
- n135= }
- n136= elseif ($me == %bot1) { scon $bot_say($chan) msg $chan 4ERROR: You are not authorized to use this command }
- n137=}
- [DDE]
- ServerStatus=on
- ServiceName=mirc
Add Comment
Please, Sign In to add comment