PDA

View Full Version : how is the lottery system is working


ForYou
04-06-2006, 10:24 PM
Dear sir
If you please i found some difficulty to get how is the lottery system is working, rather than i've some questions regarding this advantage
I would like to know how the lottery system is choosing the daily and weekly winner

What are the steps which are used to choose that winner and if there are basics for that or it's done randomly ,,,,,,

why the lottery system doesn't send a private message to the member to inform him that he win
and if that option is existing in the new version

you are kindly requested to answer the above inquiries
Thanks and best regards

CMX_CMGSCCC
04-08-2006, 04:45 PM
1) It counts the number of tickets for the currently expiring lottery (if any tickets are purchased and if the lottery is expired)
2) It randomly chooses a number between 0 and the number of tickets.
3) It pulls that entry from the MySQL database of the tickets, and thats the winner.


// send a private message to the user that they have won the lottery
vbplaza_send_pm(0, $userinfo, $title, $message);


It should send a PM to the user who won as well.

-CMX

MysticMoon
04-09-2006, 04:05 AM
Doesn't send PM for lottery winners for my board either, I was actually here looking for the answer to that. Was suprised it didn't since you did awesome with sending PMs for gifts & donate.

While here, I do have another question, the auto PMs sent don't include the sig for that user, is it possible to make it use the sig?

Other then those 2 things I am in love with this, so much better then the old store/cash hack I used on 3.0.x ;) :D

CMX_CMGSCCC
04-09-2006, 04:27 PM
I'll double check this out on vbplaza.com when I get time.

-CMX

ForYou
04-15-2006, 12:48 PM
Hello ,

there is no PM send if there is user have won , i'm sure ,

from where can i see that ,

regards

Ambie
04-15-2006, 01:38 PM
I set up a test lottery, bought a ticket and then ran it. Of course I won because I was the only ticket holder,lol. Anyway, I did get a pm notifying me of winning. BUT no pms are being sent out on the weekly and daily lottery at all. So I can't figure out what's wrong.:confused:

CMX_CMGSCCC
04-18-2006, 05:37 PM
It's not logged into the users history when they have won, but I have received the PM when I won the lottery. To test it, I made sure I was the only one who purchased a ticket, and then set the lottery end time to yesterday and ran the cron job to process the lottery and I won the lottery and received a PM for it. So if its not working on ur end, its something different u have in ur setup that is causing an issue and I'd need admin access with can administer plugins, settings & scheduled tasks to take a look at it further.

-CMX

ChiliVB
04-21-2006, 02:52 PM
I set up a test lottery, bought a ticket and then ran it. Of course I won because I was the only ticket holder,lol. Anyway, I did get a pm notifying me of winning. BUT no pms are being sent out on the weekly and daily lottery at all. So I can't figure out what's wrong.:confused:

CMX, I had the same experience as Ambie on this.

I setup a test lottery, it completed and a PM was sent. But the Daily and Weekly lotteries are not sending PM's to the winners.

Hell?
04-21-2006, 09:28 PM
They used to send those PM's a couple of versions ago for me, but I'm not exactly sure in wich version this feature was lost.

Concerning the inner workings of the lottery, is there a way we could have a lotto-like system, meaning, the user chooses the numbers he wants to play with and if there is no winner the points get accumulated for the next draw?

yinyang
04-21-2006, 10:45 PM
yup, no PMs sent to me either.

by the way, shouldn't this be titled RAFFLE?

mlrst
04-23-2006, 02:44 AM
I've downloaded it but haven't installed yet... besides time duration does the lottery module have an option to draw a winner after a specific number of tickets have been purchased.

CMX_CMGSCCC
04-30-2006, 06:56 PM
I've found some issues with the send_pm function I've built, this should hopefully fix the problems for u guys in the next release.

-CMX

FLMom
04-30-2006, 07:02 PM
I haven't had any problems with mine sending pm's to the members...

CMX_CMGSCCC
04-30-2006, 07:03 PM
Its a very obscure problem that is inside send_pm, it took me 2 hours to debug in when I was making vbSupport 2.0.0 Beta 1 the other day.

It wont happen in all cases, but it would happen in some.

-CMX

MysticMoon
04-30-2006, 08:24 PM
thank you :)

I've found some issues with the send_pm function I've built, this should hopefully fix the problems for u guys in the next release.

-CMX

ChiliVB
05-01-2006, 02:25 PM
CMX - Thanks for digging into this and figuring it out.