mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2025
Posts: 1
P
Mostly harmless
OP Offline
Mostly harmless
P
Joined: Jan 2025
Posts: 1
I'm trying to write a script for a game I'm trying to make, all I want to do is have it add a nick and 1 when they trigger it, if they trigger it a second time the script sees if the nick is already on the list and then if it is + 1 to it, so its 2 or 3 or what ever if they are not on the list it would just add the nick and 1 on *:TEXT:!GKill:#Kill-A-Gnome:{
/write gkillscore.txt $nick 1

}Thanks for any help.

Joined: Jul 2006
Posts: 4,210
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,210
If you want to allow a one time only thing to happen for a given nickname, you can use a variable:

Code
on *:text:!GKill:#Kill-A-Gnome:{
  if ($($+(%,gkill,$nick),2) == 1) { msg $chan you already used !gkill }
  else {
    msg $chan Gkill used! boom
    ...
  }
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2006
Posts: 4,210
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,210
I forgot to set the actual variable sorry:


Code
on *:text:!GKill:#Kill-A-Gnome:{
  if ($($+(%,gkill,$nick),2) == 1) { msg $chan you already used !gkill }
  else {
    msg $chan Gkill used! boom
    set %gkill $+ $nick 1
    ...
  }
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard