Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Lottery Addon For The Store Hack Details »»
Lottery Addon For The Store Hack
Version: 1.00, by Lesane Lesane is offline
Developer Last Online: Oct 2004 Show Printable Version Email this Page

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.

Comments
  #192  
Old 11-22-2002, 04:49 PM
Linus Linus is offline
 
Join Date: Dec 2001
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I seem to be getting double of the hack when I click on Lottery Options ? Isit supposed to be this way or did I do something wrong ? In addition, is there anyway I can display the jackpot amount in the store so users know how much they stand to win ?
  #193  
Old 11-23-2002, 03:47 AM
Linus Linus is offline
 
Join Date: Dec 2001
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by AZone
Also I have another mistake after end of lottery:
<!--

Updating user, set storeaction to offline and delete lottery and lotteryusers...

'User' is rewarded with 20 points.
'User' is pm'ed with the winner's message.
Lottery action on the store is set to offline.
Lottery and his users are deleted.

Done!

Updating user, set storeaction to offline and delete lottery and lotteryusers...



Database error in vBulletin Control Panel 2.2.8:

Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='1'
mysql error: You have an error in your SQL syntax near 'WHERE userid='1'' at line 1

mysql error number: 1064

--!>
I got exactly the same error, and i've made the changes to storeadmin.php as you advised so that it will only pick a user who has bought a ticket. Seems users can't get the initial amount in the jackpot as well
  #194  
Old 11-29-2002, 12:10 PM
Zombie-F's Avatar
Zombie-F Zombie-F is offline
 
Join Date: Mar 2002
Location: Spook City, USA
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm also having the same problem as Azone and Linus. :disappointed:
  #195  
Old 11-29-2002, 02:24 PM
Zombie-F's Avatar
Zombie-F Zombie-F is offline
 
Join Date: Mar 2002
Location: Spook City, USA
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've solved my own problem!

It would appear with the latest version of the store hack, all the lottery stuff is already in the storeadmin.php file, so in the instructions for the lottery hack, ignore the additions they say to make to storeadmin.php. That's why everything appears twice.

It's also causing that error at the end of the lottery since the first lottery ends and deletes the info from the tables, the second instance of it can't end the lottery and produces that error we've been seeing.

SO, to fix the problem, open storeadmin.php and find both sets of lottery code and delete one of them. Mine works great now... clicking "Install".
  #196  
Old 12-22-2002, 07:26 PM
mx3's Avatar
mx3 mx3 is offline
 
Join Date: Nov 2002
Location: prescott valley, az
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am getting a blank page too i have the info in store.php i did everything right...
  #197  
Old 01-10-2003, 04:42 AM
Cyclonus888 Cyclonus888 is offline
 
Join Date: Dec 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im sorry but Im completelt new to installing hacks..I managed to install the board and its working fine...I really want the lottery and all the other add ons, but I have no clue as to what you mean by making queries. How do I make a query?
  #198  
Old 01-15-2003, 12:27 AM
sebastien69 sebastien69 is offline
 
Join Date: Apr 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:


Yes I do realize this the problem I am having is this
When I MANUALLY end a lottery and NO WINNER is choosed by the random function. The current users are still IN the lottery and the lottery doesnt close. My board is small so not many people buy tickets. What I would like to do is when I push the end lottery button and a random winner IS NOT choose the people who bought tickets are reset so they can buy tickets again. Otherwise it will be MONTHS before they will be able to buy again. Plus the lottery doenst end when no winner is choosen it just stays there.
here is a fix

in storeadm.php

find:
PHP Code:
  $graa=$DB_site->query("SELECT * FROM user WHERE posts>100 ORDER BY RAND() desc LIMIT 15"); 
replace by

PHP Code:
  $graa=$DB_site->query("SELECT * FROM  storelottery WHERE lotnumber='2' ORDER BY RAND() desc LIMIT 1"); 
thats all
  #199  
Old 01-15-2003, 11:24 PM
Bungie's Avatar
Bungie Bungie is offline
 
Join Date: Jun 2002
Location: My Home
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hack works great, there is just one problem I'm having since I've installed it. Noone's post count increases when they post. I've posted like 20 times and my post count is still the same. Any ideas on where I can even attempt to look?

I also recently installed the Store Hack and am not sure which one caused it.
  #200  
Old 01-18-2003, 05:10 AM
Cyclonus888 Cyclonus888 is offline
 
Join Date: Dec 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The store hack gives values based on the posts so one of its features is that it increments the users post count. Make sure you havent installed another hack that does the same action. In my board I installed the user class hack. Since that hack is based on post counts it included a piece of that incremented the users post count. When it was added after the store hack code the user would get their count incremented once by the store and the once more by the user class. Make sure you dont have something like that.

When you delete the extra store code in the storeadmin.php becareful wich piece you delete. If you delete the pieces lowest in the file you will delete the bug fix that pays out the entire jackpot and not just the money from tickets sold. That fix is in the pieces higher up in the code.

Lesane...fantastik hack...the one question you never answered was could you make an addon that would be for awarding things the admins choose.....like merchandise. We set the price and as an action the person buying is deducted the money and the admin is sent a PM saying they bought the item. We could then initiate contact with the person to arrange delivery. Just an idea...
  #201  
Old 01-18-2003, 05:25 AM
:Judge:'s Avatar
:Judge: :Judge: is offline
 
Join Date: Jan 2003
Location: USA ~ MD
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Cyclonus888
The store hack gives values based on the posts so one of its features is that it increments the users post count. Make sure you havent installed another hack that does the same action. In my board I installed the user class hack. Since that hack is based on post counts it included a piece of that incremented the users post count. When it was added after the store hack code the user would get their count incremented once by the store and the once more by the user class. Make sure you dont have something like that.

When you delete the extra store code in the storeadmin.php becareful wich piece you delete. If you delete the pieces lowest in the file you will delete the bug fix that pays out the entire jackpot and not just the money from tickets sold. That fix is in the pieces higher up in the code.

Lesane...fantastik hack...the one question you never answered was could you make an addon that would be for awarding things the admins choose.....like merchandise. We set the price and as an action the person buying is deducted the money and the admin is sent a PM saying they bought the item. We could then initiate contact with the person to arrange delivery. Just an idea...
Was thinking of this myself.
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05541 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete