alias(slap)
{
%nick = $0-
%self = "own self"
%scriptname = "Monster slap"
%aliasname = "slap"
%slink = "https://git.io/vKgaa"
%s = "$b":"$b"
%version = "2.1.6"
%lic = "Public domain - https://creativecommons.org/publicdomain/zero/1.0/"
if($0 == "*")
%nick = $1
%action[0] = "pokes"
%action[1] = "drags"
%action[2] = "hits"
%action[3] = "kicks"
%action[4] = "pushes"
%action[5] = "sacrifices"
%action[6] = "slaps"
%action[7] = "throws"
%action[8] = "whips"
%action[9] = "taunts"
%a = $rand(9)
%vaction = %action[%a]
%times[0] = "once"
%times[1] = "over and over"
%times[2] = "several times"
%times[3] = "twice"
%times[4] = "three times"
%b = $rand(4)
%ntimes = %times[%b]
%location[0] = "in the room,"
%location[1] = "in the desert,"
%location[2] = "in the dungeon,"
%location[3] = "in the IRC channel,"
%location[4] = "in a spaceship,"
%location[5] = "on an asteroid,"
%location[6] = "on an alien planet,"
%location[7] = "at the edge of a cliff,"
%c = $rand(7)
%vlocation = %location[%c]
%where[0] = "around"
%where[1] = "everywhere"
%where[2] = "at ChanServ's feet"
%where[3] = "at NickServ's feet"
%where[4] = "at HostServ's feet"
%where[5] = "at the altar of Krull"
%where[6] = "inside an active volcano"
%where[7] = "at some undisclosed location"
%where[8] = "in a secret hide-out"
%d = $rand(8)
%vwhere = %where[%d]
%who[0] = "an alien"
%who[1] = "Jean Luc Picard"
%who[2] = "Yoda"
%who[3] = "Darth Vader"
%who[4] = "Pac-Man"
%who[5] = "Superman"
%who[6] = "Iron Man"
%who[7] = "The Hulk"
%who[8] = "Thor"
%who[9] = "a replicator"
%who[10] = "Snow White"
%e = $rand(10)
%vwho = %who[%e]
%dowhat[0] = "choke on"
%dowhat[1] = "poop"
%dowhat[2] = "eat"
%dowhat[3] = "sneeze on"
%dowhat[4] = "draw a picture of"
%dowhat[5] = "buy"
%dowhat[6] = "sell"
%dowhat[7] = "3D print"
%dowhat[8] = "have nightmares about"
%dowhat[9] = "have wet dreams about"
%dowhat[10] = "walk around with"
%dowhat[11] = "pick own nose with"
%dowhat[12] = "give a lecture about"
%dowhat[13] = "write songs about"
%f = $rand(12)
%vdowhat = %dowhat[%f]
%slap[0] = "a large wild salmon!"
%slap[1] = "10K lines of source code!"
%slap[2] = "a bag of dirty laundry!"
%slap[3] = "a flying cow!"
%slap[4] = "some apt commands!"
%slap[5] = "a wet, smelly, hairy and sloppy old vagina!"
%slap[6] = "a flying pig!"
%slap[7] = "a spider pig!"
%slap[8] = "Hasselhoff's sweaty swimming trunks!"
%slap[9] = "a pile of primordial goo!"
%slap[10] = "a box of Corn Flakes!"
%slap[11] = "some really smelly shoes!"
%slap[12] = "a huge wet smelly trout!"
%slap[13] = "a sharp and pointy object!"
%slap[14] = "a 10ft pole!"
%slap[15] = "a ping-pong paddle!"
%slap[16] = "a cardboard cut-out of Chuck Norris!"
%slap[17] = "a rabid Internet troll!"
%slap[18] = "an Apple product!"
%slap[19] = "a talking duck!"
%slap[20] = "a wasps nest!"
%slap[21] = "a zombies rotting brains!"
%slap[22] = "some annoying movie quotes!"
%slap[23] = "a wire coat hanger!"
%slap[24] = "some live and wriggling alien food!"
%slap[25] = "a dozen live squids!"
%slap[26] = "a horde of zombie vampires!"
%slap[27] = "a soft and cute kitten!"
%slap[28] = "a severed arm!"
%slap[29] = "a Klingon disruptor!"
%slap[30] = "some monkey's feces!"
%slap[31] = "a cast iron frying pan!"
%slap[32] = "a reconstituted, flash-frozen and genetically modified fart!"
%g = $rand(32)
%vslap = %slap[%g]
%complex[0] = "%vaction %nick %ntimes %vwhere %vlocation and %vwho makes %nick %vdowhat %vslap"
%complex[1] = "%vaction %nick %ntimes %vwhere %vlocation and %nick %vaction %vslap"
%complex[2] = "%vaction %nick %ntimes %vwhere %vlocation with %vslap"
%complex[3] = "%vaction %nick %vlocation with %vslap"
%complex[4] = "%vaction %nick %vwhere with %vslap"
%complex[5] = "%vaction %nick with %vslap"
%h = $rand(5)
%vcomplex = %complex[%h]
if(($window.type == "query") && (%nick == ""))
{
%nick = $window.caption
%nick = $str.lefttofirst(%nick,"[")
%nick = $str.stripright(%nick)
}
switch($0)
{
case("self"):
{
%nick = %self
me %vaction %nick %ntimes %vwhere %vlocation and %vwho makes $me %vdowhat %vslap
unset %nick
break;
}
case("shareslap"):
{
%nick = $1
if(%nick != "")
{
say $tr("%nick: have a look at %scriptname %version %slink")
break;
}
else
{
say $tr("Why dont you have a look at %scriptname %version %slink")
break;
}
}
case(uninstall):
{
%scriptname = "Monster Slap"
if(($window($tr(Alias Editor)) != "0") || (($window($tr(Event Editor)) != "0")))
{
dialog.message -b ($tr("%scriptname Uninstaller - KVIrc"), $tr("The %scriptname uninstaller detected some editor window(s) open."
\
"Do you want the uninstaller to close the open editor window(s) and proceed with uninstallation?"), information, \
$tr("&Yes Proceed"), $tr("&No, I have Work to Save"), $tr("&Quit"))
{
%scriptname = "Monster Slap"
%aliasname = "slap"
switch($0)
{
case("0"):
{
echo -i=$msgtype(GenericStatus) $tr("The user told $b%scriptname$b's uninstaller to proceed.")
echo -i=$msgtype(GenericStatus) $tr("Cannot uninstall $b%scriptname$b while script editors are open! Closing them...")
timer -s (uninstall,2000)
window.close -q $window($tr(Alias Editor))
window.close -q $window($tr(Event Editor))
echo -i=$msgtype(GenericStatus) $tr("Uninstalling "$b"alias(%scriptname)$b and "$b"event(OnHighlight,reslap)$b...")
alias(%aliasname){}
event(OnHighlight,reslap){}
echo -i=$msgtype(GenericStatus) $tr("The $b%scriptname$b alias has been completely removed.")
break;
}
case("1"):
{
echo -i=$msgtype(GenericWarning) $tr("The user has quit $b%scriptname$b uninstaller, so any work in progress can be saved.")
break;
}
default:
{
echo -i=$msgtype(GenericWarning) $tr("The user has quit $b%scriptname$b's uninstaller.")
break;
}
}
}
}
else
{
dialog.message -b ($tr("Uninstalling %scriptname - KVIrc"), $tr("Uninstallation for %scriptname will proceed now."), information, \
$tr("&Yes Proceed"), $tr("&Quit"))
{
%scriptname = "Monster Slap"
%aliasname = "slap"
switch($0)
{
case("0"):
{
echo -i=$msgtype(GenericStatus) $tr("The user told $b%scriptname$b's uninstaller to proceed.")
echo -i=$msgtype(GenericStatus) $tr("There were no open editor windows.")
echo -i=$msgtype(GenericStatus) $tr("Uninstalling "$b"alias(%scriptname)$b and "$b"event(OnHighlight,reslap)$b...")
alias(%aliasname){}
event(OnHighlight,reslap){}
echo -i=$msgtype(GenericStatus) $tr("The "$b"slap$b alias and reslap event have been completely removed.")
break;
}
default:
{
echo -i=$msgtype(GenericWarning) $tr("The user has quit $b%scriptname$b's uninstaller.")
break;
}
}
}
}
break;
}
case(""):
{
echo $tr("Usage: %scriptname")
echo " "/%aliasname nick" "%s $tr("Slaps the target nickname with random slap.")
echo " "/%aliasname self" "%s $tr("Slaps own self with a random slap.")
echo " "/%aliasname * nick" "%s $tr("Slap every possible nickname including triggers used in script.")
echo " "/%aliasname shareslap" "%s $tr("Output a link to share %scriptname with other KVIrc users.")
echo " "/%aliasname shareslap nick %s $tr("Outputs a link to share %scriptname with a specific KVIrc user.")
echo \n
echo " "/%aliasname uninstall %s $tr("This uninstalls the "$b"alias(%aliasname)$b from KVIrc.")
echo \n
echo %scriptname %version - $tr("Licensed under:") %lic
echo \n
break;
}
default:
{
me %vcomplex
%RESLAP = 1
timer -s (delayreslap,5000)
%RESLAP = 0
break;
}
}
}