Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Oct 15, 2003 1:29 am   

Lotto (Basic)
 
This Is for all you lotto players out there
Think of this as an autopick
Just made it for fun but it will be added to an upcoming program by yours truly.

Have fun.

#CLASS {Lotto}
#CLASS 0

#CLASS {Lotto|LottoVars}
#VAR LottoPick3 {}
#VAR LottoPick4 {}
#VAR LottoPick5 {}
#VAR SuperLotto {}
#VAR SuperLottoNum {}
#CLASS 0

#CLASS {Lotto|LottoTools}
#ALIAS Pick3 {LottoPick3="";#loop 1,3 {#VAR LottoPick3 %additem(%random(1,9),@LottoPick3)};#echo %ansi(high,Blue)%replace(@lottopick3,"|","")}
#ALIAS DailyLotto {Pick3;Pick4;Pick5;SuperLotto;THESE ARE YOUR DAILY PICKS~!}
#ALIAS Pick {Pick%1}
#ALIAS Pick4 {LottoPick4="";#loop 1,4 {#VAR LottoPick4 %additem(%random(1,9),@LottoPick4)};#echo %ansi(high,Yellow)%replace(@lottopick4,"|","")}
#ALIAS Pick5 {LottoPick5="";#loop 1,5 {#VAR LottoPick5 %additem(%random(1,9),@LottoPick5)};#echo %ansi(high,red)%replace(@lottopick5,"|","")}
#ALIAS SuperLotto {SuperLotto=%random(1,45);#if %numitems(@SuperLottoNum)=6 {#echo %replace(@SuperLottoNum,"|"," ")} {#if %item(@SuperLottoNum,%ismember(@SuperLotto,@SuperLottoNum))=@SuperLotto {SuperLotto} {SuperLottoNum=%additem(@SuperLotto,@SuperLottoNum);SuperLotto;SuperLottoNum=""}}}
#CLASS 0
Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Tue Jan 20, 2004 7:50 pm   
 
what does this do real fast?

im on telnet right now at work, cant test it
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jan 21, 2004 12:07 am   
 
Here's a simpler version of SuperLotto which takes advantage of the no-duplicate feature of #ADDITEM. Feel free to use it when you make your program.
#AL SuperLotto2 {#VAR SuperLottoNum "";#WHILE (%numitems( @SuperLottoNum) < 6) {#ADDI SuperLottoNum %random( 1, 45)};#ECHO {Your SuperLotto picks are: %expandlist( @SuperLottoNum, " ")}}

Evangelist: All these do are generate random sets of numbers for people who play a lottery.

EDIT: Added missing }.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Jan 21, 2004 6:30 am   
 
Thanks Lightbulb, I hadn,t got around to messing with #while and you striped down script was a good example of it,s use.

Evangelist
Yes all they do is generate lotto numbes for different types of lotto games incase your into that kind of stuff

And don't forget that
#VAR SuperLottoNum ""
could also be
SuperLottoNum=""
Reply with quote
Nemur
Newbie


Joined: 27 Nov 2004
Posts: 1

PostPosted: Sat Dec 04, 2004 11:46 am   how to make this applicable?
 
ok i do the drawing and create the numbers. then people get their random picks. How do i do the lottery to see who wins? And is lightbulbs text all that i need to do the lottery? or does it replace a part of mego's?
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Sun Dec 12, 2004 11:02 pm   
 
Nemur, soory it took so long to get back to you but I have been out of town.

This script was originaly created for picking lottory number at random just like as if you would go buy a lottery ticket at a store and ask them to auto pick thenumbers for you. I just thought it would be a fun tool to use and I actualy have played the numebers I get so far I have a 1 out of 25 win to loss, wich is better than I was doing just picking them myself. On the superlotto and major ones I am sad to report I have not won yet, but I did notice that I have gotten a lot closer useing my program.

Now I am sure results may very and are left for interpretation.

On your question, if your running a lotto game inside a mud I have some tips for you and I actually have thought of putting the game into a whole script.

Tips:

You need to set up a bot or script so when people come to you they can either give you numbers or get them auto from you.

Keep track of them and there numbers

set rules

set a deadline for last time any number will be takin and the drawing time.

use this script to randomly get the numbers and then have a serch to find the winner

notify winner give deadline for picking up prize


RANDOM
Ther is not true random when it comes to the Zmud program, I have tested this time and time again, and confermed that under the right cercumstances one could easily get the same numers over and over again
You could alsomathmaticaly figure out the number from one insatnt to the next IF you where the one with the script.

That being said the only reason I did not make the bot is because rvry mud is different and I wanted something that everyone could use.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Thu May 26, 2005 8:26 pm   
 
Dredging this up again, because I was looking at how to do something with %random and saw the %dice command.

Rather than
#ALIAS Pick3 {LottoPick3="";#loop 1,3 {#VAR LottoPick3 %additem(%random(1,9),@LottoPick3)};#echo %ansi(high,Blue)%replace(@lottopick3,"|","")}
.....etc....

why not just use:
#ALIAS Pick {Pick%1}
#ALIAS Pick3 {#ECHO %dice(1d9) %dice(1d9) %dice(1d9)}
#ALIAS Pick4 {#ECHO %dice(1d9) %dice(1d9) %dice(1d9) %dice(1d9)}
#ALIAS Pick5 {#ECHO %dice(1d9) %dice(1d9) %dice(1d9) %dice(1d9) %dice(1d9)}

Works for me quite well.
Shorter, cleaner, and no vars to worry about.
Danged if i could come up with something for the Superlotto tho. :-)
_________________
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Sat May 28, 2005 12:40 pm   
 
In all actuality this probably could get done in several different ways and it probably be streamlined in different places. The fact is I use those VAR's where intended for use in giving out numbers to other mud players and recording them for later use.

example:
You could make a bot and set him/her/it in a location and people could come to him to play the daily lotto. they buy the lotto ticket from you and come back later to see if they won. You collect a percentage of all money played and you collect if person does not return to get there money and other stuff. The VAR's help keep track of that for me.

I also have a buddy program I wrote trying to crack the pick 3 number of the day in real life, so far my program in theory has struck the winning number 7 out of 10 times, not bad but I want it a little higher maybe 8 out of 10.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Sep 27, 2012 3:01 pm   
 
after being gone a really long time and looking through my old scripts, this one bugs me the most as it is the least finished.
I originally wrote this program with way more functions and the ability to do as exactly as I described ideas to Nemur.

I hope soon to share it all with all of you.

To DeathDealer: I do not use .%dice because it can not use 0, all the lotto"s in My state have 0's
A better use would have been: .%random (999) for Pick 3 and so forth and so on.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net