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.
and i have the top 5 stats installed and this is just before the stats start.
// Top 5 Statistics BY NanoEntity
// Top 5 Posters
If you do a search in your index you can find the lines before the bit that displays the lotto amount as i have given you the few lines before it.
Quote:
$lok=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'");
if ($aw[action]=='lottery') {
//if(!$bbuserinfo[usergroupid]==6) {
$lotname="";
$lottery="";
} else {
$lotname="Welcome To The $lok[lotname]";
$startdate=vbdate($dateformat,$lok[startdate]);
$enddate=vbdate($dateformat,$lok[enddate]);
$lottery="Money in jackpot: <b>$lok[jackpot]</b>";
$jackpot="Current Lottery Fund is now: <b>$lok[jackpot]</b>";
}
A question, I've already bought a lottery and I tried to click on the link under the Store Statistics
Most Sold Action: Buy A Ticket For The Lottery Entitled7)
But I was brougth to a blank page, is that an error?
Well , I have just sat here another 2 hours and tried everything i even read every post in this thread again and remade my templates , redid the mysql queries and everything still functions perfectly , right down to the pick winner in admin cp , and it will pick one , but the only thing is this:
Originally posted by Mr_P Is there anyway to change the $ in the hack to something else such as P for points as we dont use $ so when u get pm its defeats the object when u have 500 points ans someone robs $200
But all said and done top hack and i look forward to many more addons for this.
Search for this line for the pm to the losers:
PHP Code:
$pmloser="Dear Loser,\n\n You lost the lottery named $lotop[lotname]. The winner is: '$username' and the winner received a total of $kutje points.\n\n Good luck on any new upcoming lottery's.\n\n Thanks for your participation on this lottery.";
And search for this line for the pm to the winners:
PHP Code:
$pmwinner="Congratulations $username,\n\n You won the lottery named $lotop[lotname]. Your amount of points is increased with $kutje points.\n\n Thanks for your participation on this lottery.";