Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #132  
Old 08-13-2002, 12:39 PM
xxxsaint's Avatar
xxxsaint xxxsaint is offline
 
Join Date: Jun 2002
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sent the store.php and the result of running that query in php my admin is

http://www.tdleague.com/images/sql.jpg
  #133  
Old 08-13-2002, 12:56 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I checked your store.php and you don't even have the lottery code in it.

You forget the most important step in the instruction file:

PHP Code:
**********************************
Open fileroot/store.php
**********************************
--------
Find(on the end of the file):
--------

?>

--------
Add BEFORE it:
--------

// ###################### Start Lottery #######################
if ($action=="lottery") {

  $lott = $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
  $storeid=$lott[id];
  $cost=$lott[costs];
  $need=$points - $cost;
  
if ($cost>$points) {
eval("standarderror(\"".gettemplate('store_error')."\");");
}

if ($reet=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='2' AND userid='$bbuserinfo[userid]'")) {
       eval("standarderror(\"".gettemplate('store_lottery_error')."\");");
       } else {
eval("dooutput(\"".gettemplate("store_lottery")."\");");
}
}

// ###################### Start Lottery Update #######################
if ($action=="lotteryupdate") {

if ($reet=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='2' AND userid='$bbuserinfo[userid]'")) {
       eval("standarderror(\"".gettemplate('store_lottery_error')."\");");
       }

$contest = $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
$checkcost=$contest[costs];
if ($checkcost != $cost) {
eval("standarderror(\"".gettemplate('store_error')."\");");
}

if ($checkcost>$points) {
eval("standarderror(\"".gettemplate('store_error')."\");");
}

$addlot = $DB_site->query("INSERT INTO storelottery (id,lotnumber,lotname,jackpot,startdate,enddate,userid,username) VALUES (NULL,'2','0','0','0','0','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."')");
$changeusernow = $DB_site->query("UPDATE user SET storep=storep-$cost WHERE userid='$bbuserinfo[userid]'");
$changestorenow = $DB_site->query("UPDATE store SET sold=sold+1 WHERE id=$storeid");
$updatelottery = $DB_site->query("UPDATE storelottery SET jackpot=jackpot+$cost WHERE lotnumber='1'");
$storequant = $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
if ($storequant[quantity]=='0') {
$ilove++++++s="";
} elseif ($storequant[quantity]=='1') {
$closequan = $DB_site->query("UPDATE store SET quantity='0', ok='N' WHERE id=$storeid");
} else {
$updatequan = $DB_site->query("UPDATE store SET quantity=quantity-1 WHERE id=$storeid");
}
$moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
$money = $moneycheck[storep];
eval("dooutput(\"".gettemplate("store_lottery_updated")."\");");
}

**********************************
Save file: root/store.php
********************************** 
You have the action code "lotteryupdate" in it but u don't have the action code "lottery" in it.
  #134  
Old 08-13-2002, 01:01 PM
xxxsaint's Avatar
xxxsaint xxxsaint is offline
 
Join Date: Jun 2002
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WHOOOOHOOOOO!!!!!

man ty ty ty

I looked and looked and looked but since i'm a noobie i didn't catch that , thanks so much for all your time and support !!!!
  #135  
Old 08-13-2002, 01:04 PM
xxxsaint's Avatar
xxxsaint xxxsaint is offline
 
Join Date: Jun 2002
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

man we have been wanting that hack to work so bad , where do you vote around here for hacker of the year , this guy gets my vote , he even came to my forums and checked it out.

awesome job
  #136  
Old 08-13-2002, 01:07 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lesane


You can do that by going to the "Lottery" action.
where?
  #137  
Old 08-13-2002, 01:16 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by xxxsaint
WHOOOOHOOOOO!!!!!

man ty ty ty

I looked and looked and looked but since i'm a noobie i didn't catch that , thanks so much for all your time and support !!!!
You're Welcome :bunny:
  #138  
Old 08-13-2002, 01:17 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by xxxsaint
man we have been wanting that hack to work so bad , where do you vote around here for hacker of the year , this guy gets my vote , he even came to my forums and checked it out.

awesome job
haha
  #139  
Old 08-13-2002, 01:18 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mist


where?
Admincp -> Veb Store -> View/Modify Actions -> Lottery -> Edit -> Costs
  #140  
Old 08-13-2002, 01:37 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
  #141  
Old 08-13-2002, 05:51 PM
BluSmurf BluSmurf is offline
 
Join Date: Nov 2001
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lesane,

here's the result of the query
mysql> SELECT * FROM storelottery WHERE lotnumber='1';
Empty set (0.00 sec)

and attachment of my store.php
Closed Thread

Thread Tools

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 11:09 AM.


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.05804 seconds
  • Memory Usage 2,312KB
  • 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
  • (1)bbcode_php
  • (4)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
  • (2)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