PopUp window for on-snap

Share your scripts and packages with other Mudlet users.
Post Reply
Phoenix
Posts: 92
Joined: Tue Feb 15, 2011 3:23 am

PopUp window for on-snap

Post by Phoenix »

So, was playing with random things, and found this in the manual. I immediately went, "Ooo. Minimal changes would make a nice alert for being snapped!" So, here it is!
I also added in (via the sound option on a trigger) a sound file of a monkey laughing, since the thieves always fail :D
http://simplythebest.net/sounds/WAV/cartoon_wavs.html to find that
RegEx pattern: ^(\w+) snaps (?:his|her) fingers in front of you\.$
Script:
local width, height = getMainWindowSize()
createLabel("messageBox",(width/2)-300,(height/2)-100,250,150,1)
resizeWindow("messageBox",600,80)
moveWindow("messageBox", (width/2)-500,(height/2)+50 )
setBackgroundColor("messageBox", 150,100,100,200)
echo("messageBox", [[<p style="font-size:35px"><b><center><font color="red">]] .. matches[2] .. [[ has snapped you!!</font></center></b></p>]] )
showWindow("messageBox")
tempTimer(5.0, [[hideWindow("messageBox")]] ) -- close the warning message box after 5.0 seconds

Centi
Posts: 5
Joined: Sun Jul 12, 2009 8:45 pm

Re: PopUp window for on-snap

Post by Centi »

Awh Maaaaaaaaaan!

Post Reply