Love-O-Meter

By TMFKSOFT on Apr 22, 2011

Simple love-o-meter
Not accurate.
Type /love NICK

Example:
03:30 <&TMFKSOFT> I'm matched to Angel-Dust [<3<3<3<3<3-----] 5/10

alias love {
  ;TMFKSOFTs Love-o-meter
  var %amnt $calc($len($1)/2)
  var %low $calc(10-%amnt)
  msg # I'm matched to $1 $+([,$str( 4<3 , %amnt ), $str( - , %low ),]) $+(%amnt,/,10)
}

Comments

Sign in to comment.
Jethro   -  Apr 22, 2011

Just add the -l switch to make those global variables local:

set -l %amnt $calc($len($1)/2)
set -l %low $calc(10-%amnt)The -l switch is undocumented and works the same as the /var command. Not many people know about it because it's uncommon. This way you don't even have to get it unset and occupy the space in mIRC variables.

 Respond  
Sorasyn   -  Apr 22, 2011

Well, this may be pointing out the obvious but if you're going to initiate two variables and use them in a manner that the identifiers themselves could handle, it might be best to just use the identifiers in place of those variables.

Variables are meant to be used as a substitute for multiple occurrences of a single string or value, not to be set and used once. Especially global variables... yuck.

Global variables in a sense relate to a quote off the Hangover "What happens in Vegas stays in Vegas... Except for Herpes.. that shit'll come home with you." /var sets the value and erases when the script is finished and/or commanded to erase beforehand. While /set sets the value and unless forced to do otherwise, is stuck in your variables tab until you either 1.) Manually erase it or 2.) /unset it. Re-enforcing the fact that /set is in fact.. herpes. D:

dma  -  Sep 25, 2015

you cant do /lovenick it dont dont know what that is, or I'm crazy

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.