Version: 1.00, by Lesane
Developer Last Online: Oct 2004
Version: 2.2.x
Rating:
Released: 06-18-2002
Last Update: Never
Installs: 119
No support by the author.
Info:
This addon for the store hack gives you the ability to add a Lottery on your store. A lottery with the same principles as a normal lottery. Users buy a lottery ticket in the store and after the specified enddate you or any other admin execute the lottery script in the admincp wich search for a random user from the database and checks if the user bought a ticket and if so then he will receive the jackpot if not then the lottery stays online.
The jackpot will be increased with the amount of the lottery ticket everytime when a new member buy's a ticket.
What to do:
2 Query's: 1 new table, 1 new row.
3 File Edit's: Admin/Index.php, Store.php & Storeadmin.php
1 Template Edit: Store_bit
2 New Templates: store_lottery_error & store_lottery_updated
Some Features:
- A new action on the store: Lottery
- Winner will be picked randomly
- Winner will be pm'ed with a winner's message
- Losers will be pm'ed with a loser's message
- Define Start Date of the lottery
- Define End Date of the lottery
- Define title of the lottery
- Define the amount of a ticket
- Maximum of 1 Ticket Per User
- And more....
This lottery addon will only work with the latest version of the store hack and is compatible with any Vbulletin 2.*.* version.
Have fun with the addon,
Lesane.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
When the lottery is ended is there a way to reset the tickets purchased so the ones in the previous Lotto have to buy again?
Hopefully I am clear about what I mean... Just tring to keep it interesting for the people "in" cause if for exp. it takes a month for anyone to win they won't be able to participate for a month
When the lottery will be ended then everything from the lottery table will be deleted.
Originally posted by trainer ok have a question... my site has over 10k members and about 1/2 are not active. is there a way to pick a winny out of the tickets sold rather then from all the members. couple be weeks before someone wins.
also how does this stop people from creating bogus accounts just to buy another ticket?
great idea just thinking aloud...
1. Find this part in storeadmin.php:
PHP Code:
$findus=$DB_site->query_first("SELECT * FROM user ORDER BY RAND() desc LIMIT 1");
And change it to:
PHP Code:
$findus=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber=2 ORDER BY RAND() desc LIMIT 1");
Originally posted by Peace Lesane, a question, what's the postbit or link code for "richest" person? I want to display the "richest person" on my forum home.
I need this too. Do anyone know the postbit for this? Lesane, anyone?
Why would you want members that haven't bought a ticket even participating in the lottery?
That's like going to your local powerball location, grabbing a scratch off, and someone else winning it even when they didn't buy it hehe
Huh? They aint participate on the lottery, the script just look in the user table if a user bought a ticket and if not then the lottery stays online and if so then the user will get rewarded.
Originally posted by Peace Lesane, a question, what's the postbit or link code for "richest" person? I want to display the "richest person" on my forum home.
Richest person? This is the lottery addon thread and not the store hack thread :lick: