I am completely new to mIRC but have a little bit of programming knowledge. I've watched a few videos on designing a bot and have functioning (somewhat.) One of the tutorials for what i watched was designing and adding a point system (with timer and !points command) one of the things he didn't cover is either how to spend them with a command or use a ranking system (here! make a point system with your bot that serves no purpose!). Along with that I am looking for how to do a announce timer but that would cycle through different announcements! My entire bots code is here
;### TEST TEXT
on *:TEXT:!hi:#:{
if ($nick isop #) { msg # Hi there! }
else { msg # Sorry you cannot use this command }
}
;### COMMANDS
on :TEXT: !commands: { msg $chan !points , !social , !song }
on :TEXT: !social: { msg $chan youtube.com/channel/UCZaMzDgaMWY8KP9vJjmo22w }
on :TEXT: !troysucks: { msg $chan CONFIRMED! }
;### CYCLES
on *:TEXT:!startyoutube:#: {
if ($nick isop #) {
msg $chan YT cycle is now starting.
.timerLinks -d 0 1800 { msg $chan Subscribe to my channel! youtube.com/channel/UCZaMzDgaMWY8KP9vJjmo22w }
}
}
on *:TEXT:!stopyoutube:#: {
if ($nick isop #) {
msg $chan YT cycle is now stopping.
.timerLinks off
}
}
on *:TEXT:!starttwitter:#: {
if ($nick isop #) {
msg $chan Twitter announcer is now starting.
.timerLinks -d 0 2400 { msg $chan Follow my twitter for game time info! @Flingafu }
}
}
on *:TEXT:!stoptwitter:#: {
if ($nick isop #) {
msg $chan Twitter announcer is now stopping.
.timerLinks off
}
}
on *:TEXT:!startstupid:#: {
if ($nick isop #) {
msg $chan Stupid is starting.
.timerLinks -d 0 3600 { msg $chan URJENT: Pls sand halp! ma owna has gimppd mi capuhbi11itys? IT HERTZ" }
}
}
on *:TEXT:!stopstupid:#: {
if ($nick isop #) {
msg $chan Stupid off.
.timerLinks off
}
}
on *:TEXT:!startpoints:#: {
if ($nick isop #) {
msg $chan Starting point announcer!
.timerpoints 0 1800 { msg $chan You get a point for every minute you're in here! I have no idea what they are for but feel free to drop a suggestion! }
}
}
on *:TEXT:!stoppoints:#: {
if ($nick isop #) {
msg $chan Point announcer is now stopping.
.timerpoints off
}
}
;### POINT SYSTEM
alias -1 addPoints {
if ($1 !isnum) { echo 2 -st $1 is not a number. It need to be a number. | halt }
var %topic $+($chan,.,$nick)
var %points $calc($readini (Points.ini,%topic,Points) + $1)
writeini -n Point.ini %topic Points %points
return %points
}
alias -1 lookUpPoints {
var %topic $+($chan,.,$nick)
var %points $readini (Points.ini,%topic,Points)
return %points
}
alias doaddpoints {
if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
var %topic $+($1,.,$2)
var %points $calc($readini(Points.ini,%topic,Points) + $3)
writeini -n Points.ini %topic Points %points
echo -a Added points for %topic
}
alias dorempoints {
var %topic $+($1,.,$2)
remini -n Points.ini %topic points
echo -a Remove Points for %topic
}
on *:text:!points:#:{
if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
set -u10 %floodpoints On
set -u30 %floodpoints. $+ $nick On
msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) Flingoos!
}
on *:text:!points:#:{
if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
set -u10 %floodpoints On
set -u30 %floodpoints. $+ $nick On
msg # $nick has $readini(points.ini,$+(#,.,$nick),Points) Flingoos!
}
on $*:TEXT:/!points (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: user !points [number] | return }
writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3) ,Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
{ msg $chan $3 now has $readini(Points.ini,$+(#,.,$3) ,Points) total Flingoos! }
}
else { msg $chan This command is only available to moderators. }
}
;### TIMER POINTS
on !*:join:#:{
$+(.timerpoints.,#,.,$nick) 0 60 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
}
on !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -l add.pts {
writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
}
;### REWARDS
on *:TEXT: !song
Now I read some tutorial on how to do like a sequential timer announce thing and I think its using the -d, but I don't know how to actually use it properly. So if I wanted to post a link to my youtube channel and twitter but cycle between the 2 every 30 mins or so, is that possible in mIRC? Any help would be appreciated!