This script has slowly grown over time from the simple rightclick slap command. Right now, I use a simpler version of the below as the right click. Before you read into the script, I would like to list the problems I'm having that I would like help on.
- For some reason, the whole thing isn't processing $me. When someone calls it using !slap (my current nick), the script ignores it completely. The second comparison in the first ifthen was one of my attempts to get the script to carry my nick through.
- The timer doesn't process. Instead, it gives me "/timer: timer slap not active" in the status window. I think it's because timer can't be used to process more than one line. I used to have it call the script through an alias, but then I had problems carrying variables and the target through to the script.
- In some of the lines in the txt files, I have " $nick($chan,$rand(1,$nick($chan,0)),a,r) " which is supposed to retrieve a random nick, voiced and above, in the channel the !slap was called from, but it returns nothing.
Thank you for your help for anyone who responds.
on *:TEXT:!slap *:*:{
if ($2 ison $chan) || ($2 isin $me) {
set %slap $2
.timerslap 1 1 {
if ($rand(0,1) == 1) { $read(scripts\txt\slaps.txt) ( $+ from $iif(%slap == $nick,theirself,$nick) $+ ) }
else { describe $chan $read(scripts\txt\randomslap-slaps.txt) $iif(%slap == $me,himself,%slap) with $read(scripts\txt\randomslap-objects.txt) ( $+ from $iif(%slap == $nick,theirself,$nick) $+ ) }
}
echo 8 -egi10tslbf $nick used your slap on $iif(%slap == $me,yourself,%slap) in $chan
unset %slap
}
else halt
}