Author Topic: SMF Lottery Mod  (Read 57006 times)

Offline YamiKaitou

SMF Lottery Mod
« on: October 25, 2007, 11:41:09 am »
Information
Project Name: SMF Lottery System
Author: Yami Kaitou
Version: 1.0.1


Features

Adds a Lottery feature to SMF Shop 3.0
Shop Admin can set the following variables dealing with the tickets
-Amount of tickets per user
-Percentage of cost of ticket to be added to jackpot
-Range of the balls (example 1-10)
-User the winner PM comes from (0 will be a special guest)
Jackpot will always have a minimum of 1000
To win the lottery, a user must match all 4 balls
By default, drawings can only happen once every 6 days
Drawings can either be done by a cron or by manually going to the script (see FAQ for details)
Special page within main shop for the lottery
-Allows users to see the tickets they have entered for the current drawing
-Allows users to see their previously entered tickets and whether they have won or not
-Allows users to see previous drawings and the winners

Bug Fixes

Jackpot resetting back to 1000 when nobody won.
Jackpot not resetting when someone did win.

FAQ
http://forums.projectyami.com/showthread.php?t=4

Website
http://forums.projectyami.com/forumdisplay.php?f=17



NOTE
I will prefer if you report bugs and feature requests at the website as I want to keep track of my progress, and the fact that I check there more often than here. Also, the attached file may not always be the latest version. So, make sure you check the site for updates as well. I will try to keep this topic up-to-date, but I can't be certain that it always will be.



To Upgrade to 1.0.1 from 1.0.0
Look here, simple and easy way to upgrade without having to install the new package.
« Last Edit: May 04, 2008, 12:23:08 pm by YamiKaitou »

Offline Joshsux

Re: SMF Lottery Mod
« Reply #1 on: October 26, 2007, 12:02:29 pm »
The hell is the cron job? I won't download this because i don't wanna do that. Pitty i really liked the look of this mod too.

Offline inkstains

Re: SMF Lottery Mod
« Reply #2 on: October 26, 2007, 08:52:33 pm »
it's not hard to set up and Yami has provided clear instruction on how to do it. a mod well worth having imo.

Offline feeble

Re: SMF Lottery Mod
« Reply #3 on: October 26, 2007, 09:43:27 pm »
nice work with this mod, its been asked for a long time so thank you.

good solid list of features, nice one

Offline YamiKaitou

Re: SMF Lottery Mod
« Reply #4 on: October 27, 2007, 02:15:02 am »
The hell is the cron job? I won't download this because i don't wanna do that. Pitty i really liked the look of this mod too.

Then do it the same way that you do your shops interest. The file is Sources/shop/LotteryDraw.php

Offline YamiKaitou

Re: SMF Lottery Mod
« Reply #5 on: November 01, 2007, 04:36:36 am »
Version 1.0.1 released due to a bug that I didn't notice. Uploaded new package here and method to upgrade to the latest version is found on my forums (very easy upgrade, involves changing 1 character in the source)

Slacker

  • Guest
Re: SMF Lottery Mod
« Reply #6 on: November 03, 2007, 12:17:49 pm »
What exactly is cron and why do you have to do it? So you're saying everytime we want to draw a lottery we have to go through this cron stuff/scripting?

I have this mod installed on my forums. How would I test the system and see what it's like to win?

When I click "Previous tickets" it's already told me that I havent won before the lottery has been drawn. is that normal? Will it change after  the lottery has been drawn.

Is it possible for the people who have purchased a lottery ticket and lost get a pm saying they lost?
« Last Edit: November 03, 2007, 12:22:03 pm by Slacker »

Offline YamiKaitou

Re: SMF Lottery Mod
« Reply #7 on: November 03, 2007, 12:31:20 pm »
A cron is something that allows you to do something on certain days of the week/month/etc. It is all automated. So, unless you want to remember to run the script yourself every week, this is the easiest way. And no, you just have to set the cron up once and it will always run on the specified date you give it.

Slacker

  • Guest
Re: SMF Lottery Mod
« Reply #8 on: November 03, 2007, 12:45:17 pm »
Alright thanks.

Is there a way to keep it so that the jackpot doesn't reset and keeps on going till someone wins it all?

Offline YamiKaitou

Re: SMF Lottery Mod
« Reply #9 on: November 03, 2007, 02:54:08 pm »
If you use 1.0.1, it will do that

Slacker

  • Guest
Re: SMF Lottery Mod
« Reply #10 on: November 04, 2007, 04:53:43 am »
Feature request=

Make this mod editable in the admin section, like the time between drawings, the option to reset the jackpot after no winners or not, and make it so that we don't have to go through this cron job stuff. It's kinda alot of work just to get this mod running in my opinion. Especially for the not so advanced people here. :-/

It's an excellent mod and has nice features. Now try to make it easier for us to use maybe?

(P.S. I still can't get it to work. lol...)

Offline YamiKaitou

Re: SMF Lottery Mod
« Reply #11 on: November 04, 2007, 06:41:40 am »
I will see about making it more editable through the admin section (maybe a lottery section in the shop admin area that only works when you have the lottery item enabled, maybe). But, the cron will not go away. You don't have to use the cron though, you can always run the script manually when you want to. The only reason why there is the time limit in between drawings is so other members don't run the script when their not supposed to. Changing the time limit is not that hard either. I don't see any way that I can make the setup for this any easier than it is. The cron is not mandatory, it is just a good idea. You set it up the same way you set up the cron for the bank interest.

Slacker

  • Guest
Re: SMF Lottery Mod
« Reply #12 on: November 05, 2007, 10:21:56 am »
Thanks, I got it to run every friday at 5pm. My members love this new feature.

Sorry about the loads of questions, Im learning. :]
« Last Edit: November 05, 2007, 11:09:50 am by Slacker »

Offline Str8up-Nate

Re: SMF Lottery Mod
« Reply #13 on: November 14, 2007, 02:45:47 pm »
wow i found a error (at least for me) when you uninstall it there a error in the uninstall and it told me the tables were unknown and it wouldn't uninstall so i just reinstalled smf and deleted it :P i hope you  can help me i really liked this mod

thanks you for your time

Offline YamiKaitou

Re: SMF Lottery Mod
« Reply #14 on: November 15, 2007, 06:18:07 am »
What tables did it error on? Cause, it worked fine for me to uninstall. Though, I haven't tried it lately