This is a really easy-to-use slapper that adds/deletes slaps, and can do random, selected, and mass slaps. It also has a built in nicklist that updates when the list of users in a channel changes.
Updates: Changed code so that the Random slap is diabled until a nick is chosen and Selected Slap is disabled until a nick and quote are chosen. ```mirc Slap Script ----------- alias F12 loadbuf -ro slaps 3 slaps.txt alias slaps { if ($dialog(slaps)) { dialog -v slaps } else { dialog -dm slaps slaps } } alias getnlist { if ($devent == init) { var %nick 1 var %chan $chan(0) while (%chan > 0) { did -a slaps 14 $chan(%chan) dec %chan } while ($nick($active,%nick)) { did -a slaps 9 $nick($active,%nick) inc %nick 1 } } elseif ($devent == sclick) && ($did == 14) { var %nick 1 did -r slaps 9 while ($nick($did(14),%nick)) { did -a slaps 9 $nick($did(14),%nick) inc %nick 1 } .halt } else { did -r slaps 9 var %nick 1 if ($did(slaps,14)) { while ($nick($did(slaps,14),%nick)) { did -a slaps 9 $nick($did(slaps,14),%nick) inc %nick 1 } } elseif (!$did(slaps,14)) { while ($nick($active,%nick)) { did -a slaps 9 $nick($active,%nick) inc %nick 1 } } did -r slaps 14 var %chan $chan(0) while (%chan > 0) { did -a slaps 14 $chan(%chan) dec %chan } } if (%did(slaps,9) !ison $iif($did(slaps,14),$did(slaps,14),$chan)) { unset %did.9 | did -ra slaps 10 Nick Being Slapped: } } dialog -l slaps { title "pwgScript Slap Manager [/slaps] " size -1 -1 258 169 option dbu icon C:\Windows\system32\shell32.dll, 43 button Close, 1, 212 154 37 13, default cancel list 3, 1 9 169 142, size vsbar button Add Slap, 4, 2 154 37 13 button "Delete Slap", 6, 44 154 37 13 button Random Slap, 7, 128 154 37 13 button Selected Slap, 8, 86 154 37 13 button Mass Slap, 5, 170 154 37 13 list 9, 172 22 84 118, size vsbar text "Slaps List", 2, 2 1 125 8 combo 14, 172 9 84 12, sort drop edit "Nick Being Slapped:", 10, 172 141 84 10, read autohs } On *:Dialog:slaps:*:*:{ if ($devent == init) { if ($did == 0) { if (!$isfile(slaps.txt)) { write slaps.txt with a large trout } getnlist loadbuf -ro slaps 3 slaps.txt did -ra slaps 2 Slap List - Total Slaps: $lines(slaps.txt) did -b slaps 7,8 } } if ($devent == sclick) { if ($did == 3) { if (%did.9) { did -e slaps 8 } } if ($did == 4) { var %aslap $$?="Slap to add:" if ($read(slaps.txt,w,%aslap)) { echo -a 10Slap already exists. | .return } else { write slaps.txt %aslap loadbuf -ro slaps 3 slaps.txt did -ra slaps 2 Slap List - Total Slaps: $lines(slaps.txt) } dialog -v slaps } if ($did == 5) { if ($$?!="Mass slapping everyone in a channel can cause excess flood. Continue?" == $true) { var %nlist 1 while ($nick($active,%nlist)) { describe $active $nick($active,%nlist) $read(slaps.txt) inc %nlist } } dialog -v slaps } if ($did == 6) { write -ds $+ " $+ $did(3).seltext $+ " slaps.txt loadbuf -ro slaps 3 slaps.txt did -ra slaps 2 Slap List - Total Slaps: $lines(slaps.txt) } if ($did == 7) { describe $active slaps %did.9 $read(slaps.txt) } if ($did == 8) { if (!$did(3).seltext) { .return } describe $active slaps %did.9 $did(3).seltext } if ($did == 9) { set %did.9 $did(9).seltext if ($did(3).sel) { did -e slaps 8 } did -e slaps 7 did -ra slaps 10 Nick Being Slapped: %did.9 } if ($did == 14) { getnlist } } if ($devent == close) { if ($did == 0) { unset %did.9 } } } On *:Join:#: if ($dialog(slaps)) { getnlist } On *:part: if ($dialog(slaps)) { getnlist } On *:quit: if ($dialog(slaps)) { getnlist } On *:kick: if ($dialog(slaps)) { getnlist } On *:nick: if ($dialog(slaps)) { getnlist } ######## #Popups# ######## menu status,channel,menubar { .Slapper Dialog:dialog -m slaps slaps } ```
i like this script very much
i just fixed the mass slap
it will not cause excess flood anymore
also i added the missing "slap"
just replace
if ($did == 5) {
if ($$?!="Mass slapping everyone in a channel can cause excess flood. Continue?" == $true) {
var %nlist 1
while ($nick($active,%nlist)) {
describe $active $nick($active,%nlist) $read(slaps.txt)
inc %nlist
}
}
dialog -v slaps
}
with
if ($did == 5) {
if ($$?!="Mass slapping everyone in a channel can cause excess flood. Continue?" == $true) {
var %nlist 1
var %delayy 2
while ($nick($active,%nlist)) {
timer 1 %delayy /describe $active slaps $nick($active,%nlist) $read(slaps.txt)
inc %delayy
inc %delayy
inc %delayy
inc %nlist
}
}
dialog -v slaps
}
i'm new in mirc scripting
plz if any can help add me on msn falefel@live.com
thx