Karlien commented on a Page, Lottery for IRC  -  Aug 31, 2018

Another cool one :)
However; I can't get it to display the toplotto. It just shows a white "."
I've checked and rechecked and its nearly the same as the topiq so am stumped as to why it won't show. I thought maybe conflicting variables with the topiq but changing those did nothing.

Karlien  -  Aug 31, 2018

I figured it out :)
In the "alias -l toplotto"
%toplotto needs to be %topwhat
Works like a charm now!

newklear  -  Sep 02, 2018

Thank you for that Karlien, change made in OP :-)
Apologies, I copied over the top alias without correctly editing/testing.

Karlien  -  Sep 04, 2018

Additional: had to switch the aline %w around in the toplotto alias. ($2 $1) to ($1 $2)
I've been trying to set it up so that only ops can start the lotto but I keep !!*!ing it all up lol.
Maybe if I chop it into two parts with seperate commands?... Will keep at it.

newklear  -  Sep 05, 2018

Hi Karlien, recopy the entire alias section.
It's now working as it should. My apologies once again, I uploaded this copy without testing, but tested now and it's all fine.

To only allow Ops too start it, add this:
if ($nick isop $chan) {
Under the 1st line of each text event
and add a: }
just before the last }
Hope that makes sense.

Karlien  -  Sep 13, 2018

Perfect. Thank you. I was making it way more complicated then it needed to be. lol

natashaaboehm  -  Oct 26, 2018

And did it word? How much did you win? Interesting to see the result of using it

newklear  -  Nov 06, 2018

Yes it works ;)

Karlien  -  Jan 21, 2019

Works great, see if I can post some examples of what I did with it.
Other things in the room add to the lotto pot. Like abusing the bot, he'll take credits from you and put some in the lotto pot for the next time its active. You can also do !mylotto to see how many times you've entered and how much in total you've won per month.

!lotinfo
The Room Name Lottery: 50 credits to enter. 25 credits goes in the pot. The more entrants, the bigger the pot! To enter simply type !lotto when a lottery is active.
The winner will get: Pot credits, 1 carrot, 1 lockpick and 1 midget token.

[14:13] !lotcheck
[14:13] Last Winner: (nick here) Pot Won: 150 credits. Plus 1 carrot, 1 lockpick and 1 midget token.
[14:13] The lottery is active! Entrants: 5 Current Pot: 285 credits. The draw will take place in: 3hrs 46mins 35secs. To enter type !lotto

[14:15] !lotto
Bot takes your 50 credits, puts 25 in the pot and puts your name in the crusty hat. Check the lotto status with !lotcheck.

Hello? Mcflies? I am now randomly selecting the lottery winner.
Bot reaches into the crusty hat, pulls out a name...
and the winner is...
(winner nick here) out of (number of people here) entrants. Congratulations!
You have won: (pot credits) credits, 1 carrot, 1 lockpick, 1 midget token and a smile :)

newklear  -  Feb 04, 2019

That sounds interesting Karlien!
You should make an upload and call it V2 ;)

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.