Login
User Name:

Password:



Register

Forgot your password?
 Ubuntu 22.04.5 LTS
Dec 3, 2024 4:50 am
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
Hi - Clean SmaugFuss map/description issue..
Nov 26, 2024 6:53 pm
By Remcon
Any Smaug muds running?
Nov 11, 2024 8:28 pm
By eldhamud
Space.c Commented out section
Oct 28, 2024 4:48 am
By Remcon
Discord Websocket Server
Author: Khonsu
Submitted by: Khonsu
Mapout Fix
Author: Khonsu
Submitted by: Khonsu
Progfind command
Author: Khonsu
Submitted by: Khonsu
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
Users Online
CommonCrawl, Bing, AhrefsBot

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
492
3,806
19,686
587
dexio

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » LoP Codebase » Lottery
Forum Rules | Mark all | Recent Posts

Lottery
< Newer Topic :: Older Topic > Thoughts and ideas on the lottery?

Pages:<< prev 1, 2, 3, 4 next >>
Post is unread #1 Apr 28, 2013 7:19 pm   Last edited Apr 28, 2013 7:24 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
Blah made it to annoying to look at lol when I just want ideas, so removed the posted code for this.

Post is unread #2 Apr 28, 2013 7:23 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
Few of the views for immortals so far
lottery set testing
Name:            testing
DrawTime         Sun Apr 28  8:08:05PM 2013
Numbers:         6
Jackpot:         750
BaseJackpot:     500
Price:           100
HighNum:         50
LowNum:          1
HighLastNum:     30
LowLastNum:      1
PrizeForMatches: 50
JPercent:        20
MatchesToWin:    3
ReuseNumbers:    false
DrawDiffLast:    true
MatchOrder:      false
AutoRedraw:      false
   Drawn: No, Winning Numbers: .
      Winner: Remcon, Winnings: 0, Claimed:  no, Numbers: 7 15 16 26 38 46.
      Winner: Remcon, Winnings: 0, Claimed:  no, Numbers: 5 7 9 12 48 44.
      Winner: Remcon, Winnings: 0, Claimed:  no, Numbers: 3 4 5 16 28 6.

later
lottery set testing
Name:            testing
DrawTime         
Numbers:         6
Jackpot:         750
BaseJackpot:     500
Price:           100
HighNum:         50
LowNum:          1
HighLastNum:     30
LowLastNum:      1
PrizeForMatches: 50
JPercent:        20
MatchesToWin:    3
ReuseNumbers:    false
DrawDiffLast:    true
MatchOrder:      false
AutoRedraw:      false
   Drawn: Yes, Winning Numbers: 7 18 22 27 49 19.
      Winner: Remcon, Winnings: 0, Claimed: yes, Numbers: 7 15 16 26 38 46.
      Winner: Remcon, Winnings: 0, Claimed: yes, Numbers: 5 7 9 12 48 44.
      Winner: Remcon, Winnings: 0, Claimed: yes, Numbers: 3 4 5 16 28 6.

still lots to do to it but seems to be working fair so far lol.

Post is unread #3 Apr 29, 2013 7:26 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
I sent you a pm a long time ago with ideas for this kind of system

Post is unread #4 Apr 29, 2013 8:31 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
Well i guess id deleted it at some point, if you find it resend or just give me some thoughts on it :)

Post is unread #5 Apr 30, 2013 6:20 am   
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

 
You might also want to provide a raffle system.

A lottery draw just starts with some base jackpot (funded somehow) and adds a fraction of each ticket purchase price to that jackpot. If any ticket matches all the numbers, they get a payout, usually a large percentage of the jackpot. Partial matches may get smaller fixed prizes. If nobody matches all numbers, the jackpot is usually rolled over into the next drawing.

A raffle ticket system handles the jackpot the same way, but there is always a guarenteed winner. In a raffle, you pay for any number of tickets, and one of those numbers is drawn. That person wins (most of) the jackpot. You may also draw for runner up prizes.

Since the mechanics are pretty similar, you might want to support both. :)

Post is unread #6 Apr 30, 2013 10:56 am   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
good points, was trying to make sure I covered most the bases on the lotterys, lol while allowing it to be simple to use overall. yea the raffle idea is simple to add. id likely just do a bool raffle, if thats true when it draws have it draw a bought ticket lol. have considered scratch offs also haha. I even joked to someone I might have to add in the typical gambling help line info lol.

Post is unread #7 May 2, 2013 5:55 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
Drawn every 3 days, One winner. Ticket system, Mobs used to buy tickets and get winnings, Taxed winnings.

Post is unread #8 May 3, 2013 1:08 am   
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

 
*chuckle*

So, I'm picturing various NPC's wandering into town to buy lottery tickets. An orc buys a ticket and wins. After collecting his winnings and wandering back out into the forest, a WANTED poster suddenly goes up with his picture and a bounty. *grin*

Post is unread #9 May 3, 2013 11:08 am   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
no I meant, you need a npc to buy a ticket like a shopkeeper.

Post is unread #10 Aug 30, 2013 8:45 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
Never tossed in for an npc being needed to buy a ticket, shouldn't be to hard to add that though.

It is in the 1.44 release as well as I just updated the release fixing some issues in parse_description as well as using it for showing help files.

Post is unread #11 Sep 2, 2013 9:40 am   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
rawTime Fri Aug 30 9:35:15AM 2013
TimeBetweenDraws 86400(In Seconds)
Numbers: 0
Jackpot: 100
BaseJackpot: 100
Price: 5
HighNum: 0
LowNum: 0
MatchesToWin: 0
ReuseNumbers: FALSE
DrawDiffLast: FALSE
MatchOrder: FALSE
JPercent: 95
AutoRedraw: TRUE
Raffle: FALSE
Drawn: No


It doesn't seem to have drawn.

Post is unread #12 Sep 2, 2013 10:40 am   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
No numbers set, No highnum or lownum set for the ranges of numbers and no one has bought a ticket. If you set all that stuff and buy a ticket the next update it should draw

Post is unread #13 Sep 2, 2013 12:00 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
suggestion: an announcement over the infochan for when the numbers have been selected ?

Post is unread #14 Sep 2, 2013 12:08 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
actually considering a new lottery channel for it. :)

Post is unread #15 Sep 2, 2013 12:10 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
Also found a bug.

   while( quickbuys > 0 )
      {
         if( !ch->gold < lottery->price )
         {


should be
   while( quickbuys > 0 )
      {
         if( ch->gold < lottery->price )
         {

Post is unread #16 Sep 2, 2013 12:12 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
Well if you would be so find to show me where I would add the message and what I would do for it to display a certain lotteries timer on who I would appreciate it.

Post is unread #17 Sep 2, 2013 12:15 pm   Last edited Sep 2, 2013 12:17 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
Also there is no way for players to see the winning numbers and what their ticket numbers are if they use quickpick. Also are quick picks suppose to save like this, The winner Hokai are actually the tickets I just bought

Lottery.dat:
#LOTTERY
Name             Daily~
Jackpot          104000
BaseJackpot      100000
TimeToDraw       1378144422
TimeBetweenDraws 50
Price            1000
Tickets          4
Numbers          5
HighNum          10000
LowNum           1
Prize4Match      500
Match2Win        4
AutoRedraw
History     ~ FALSE
Winner      Hokai~ 1~ 0
Winner      Hokai~ 2~ 0
Winner      Hokai~ 3~ 0
Winner      Hokai~ 4~ 0
End

Post is unread #18 Sep 2, 2013 12:21 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
Also the Jprecent doesn't actually work. I have mine set at 75 and it still increase the jackpot by 100% of the ticket cost.

Post is unread #19 Sep 2, 2013 2:22 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,933
JoinedJul 26, 2005

 
ok find
   if( !str_cmp( arg, "buy" ) )
   {
      int quickbuys = 1, bought = 0;
      bool quickpicks = false, rafflepicks = true;

change the rafflepicks to = false;
Thats my fault for not testing normal after adding raffle haha.
      while( quickbuys > 0 )
      {
         if( !has_gold( ch, lottery->price ) )
         {

that bug must come from your change of !has_gold to ch->gold < lottery->price


Also there is no way for players to see the winning numbers and what their ticket numbers are if they use quickpick. Also are quick picks suppose to save like this, The winner Hokai are actually the tickets I just bought

Use to have that in but then since the code does all the handling of if they win or not is it needed?


Also the Jprecent doesn't actually work. I have mine set at 75 and it still increase the jackpot by 100% of the ticket cost.

Ok, I'll take a look at this in a few.


Well if you would be so find to show me where I would add the message and what I would do for it to display a certain lotteries timer on who I would appreciate it.

My advise would be to do a next lottery display counter on who (just cycle through the lotterys looking for the next one that will draw, and display what lottery that is and when it will draw (or a countdown till it draws). For the message on when it is drawn I would suggest in lottery_update when it does the drawing. if you want it to announce the winners go with handle_winnings

Post is unread #20 Sep 2, 2013 2:46 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
I mean there is no point in having the players see their numbers but it would make it more realistic you know?

Pages:<< prev 1, 2, 3, 4 next >>