This is a basic ON *:JOIN: hug script with counter. It has a Channel menu to disable and enable, and has a bit of color. Enjoy!
#jhugs on
on !*:join:#:{
inc %jhugs
describe # hugs $nick 9,6(Total Hugs:8,6 %jhugs $+ 9,6 $+ )
}
#jhugs end
menu channel {
.. --Join Hugs--
.Switch {
$+($iif($group(#jhugs) != off,.dis,.en),able) #jhugs
echo -a Hugs on Join $+($replace($group(#jhugs),on,Ac,off,Deac),tivated.)
}
}
but i would love to have a weather script that does this.
<@chachin> !w
<+Amy> Baytown, Texas (29.8°N 95.0°W) - Updated: 15:31 CDT
<+Amy> Conditions: Scattered Clouds - Temperature: 27.6°C (81.6°F)
<+Amy> Dew Point: 19°C (66°F) - Humidity: 59%
<+Amy> Wind: WSW at 4.0 MPH (6.4 KPH) - High/Low: 29/17°C (84/63°F)
He only wants it to "hug back" one particular person, when they hugs him. His issue is that it "hugs back" that nick whenever ANYONE hugs THAT person instead of only when HE hugs that person.
I am not sure of the exact code he needs but I see what he is saying.
could be
ON EVENT:PHEONIX hugs $me*:#: timer 1 2 describe $chan hugs $nick back <3
idk for sure
Phil, the basic flood control should've been included. I didn't know you were gonna adapt my code:
on !*:join:#:{
if !%p {
inc -u2 %p
inc %jhugs
describe # hugs $nick 9,6(Total Hugs:8,6 %jhugs $+ 9,6 $+ )
}
}
But the only pitfall will be that if another person joins while the 2-second flood control check hasn't expired, he or she may not get a reply. Then again, I don't think that is a constant probability.
Phil, you like to hug yourself too? :P Add a ! prefix to the join event to negate that occurrence. Also, you can make the group enable and disable into one switch. Toggle it once to turn it on and off depending on whether it's on or off:
#jhugs on
on !*:join:#:{
inc %jhugs
describe # hugs $nick 9,6(Total Hugs:8,6 %jhugs $+ 9,6 $+ )
}
#jhugs end
menu channel {
.. --Join Hugs--
.Switch {
$+($iif($group(#jhugs) != off,.dis,.en),able) #jhugs
echo -a Hugs on Join $+($replace($group(#jhugs),on,Ac,off,Deac),tivated.)
}
}
I like to play crosswords so don't mind me if I connect those words in fragments. lol