1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
####################################################################
# Script by ThLoser (#ThLoser) @ Quakenet.org #
# Dont forget to /writeini admins.ini head *!*ident@host.com owner #
####################################################################
alias lvl {
return $readini(admins.ini,Head,$address($1,1))
}
on *:TEXT:!adv*:#:{
if ($lvl($nick) == owner) {
if ($2 == commands) {
putnotice $nick !adv timer set <timerID> <Seconds>
putnotice $nick !adv stop <timerID>
putnotice $nick !adv add <timername> <seconds> <message>
putnotice $nick !adv active
halt
}
if ($2 == active) {
if ($timer(0) == 0) {
putnotice $nick No Active timers!
halt
}
else {
var %x = 1
putnotice $nick Active timers
while (%x <= $timer(0)) {
set %timerTEXT %timerTEXT $timer(%x)
inc %x
}
putnotice $nick $remtok(%timerTEXT,putcmd.1,1,32)
unset %timerTEXT
}
}
if ($2 == timer) && ($3 == set) {
if ($4 == $null) || ($5 == $null) { putnotice $nick !adv timer set <timerID> <Seconds> | putnotice $nick Sets the delay of the <timerID> | halt }
elseif ($timer($4).type == offline) { putnotice $nick That timer is not activated! Please activate it with !adv add <timername> <Seconds> <message> | halt }
elseif ($4 != $null) && ($5 != $null) {
var %g = $timer($4).com
timer $+ $timer($4) 0 $5 %g
halt
}
}
if ($2 == stop) {
if ($3 == $null) { putnotice $nick Syntax: !adv stop <timerID> | halt }
elseif ($timer($3).type == offline) { putnotice $nick That timer is not activated! | halt }
elseif ($3 !isletter) { putnotice $nick Please only use letters! | halt }
elseif ($3 != $null) {
timer $+ $3 OFF
putnotice $nick Timer: $3 was deactivated!
halt
}
}
if ($2 == add) {
if ($3,$4,$5,$6 == $null) { putnotice $nick Dont forget to add type. Write msg or amsg | putnotice $nick Syntax: !adv add <timername> <seconds> <type> <message> | halt }
elseif ($3 !isletter) { putnotice $nick Please only use letters! | halt }
elseif ($3,$4,$5,$6 != $null) {
timer $+ $3 0 $4 $iif($5 == msg,msg $chan,amsg) $6-
putnotice $nick Done, timer: $3 was activated!
}
}
}
}
|