vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Lottery Addon For The Store Hack (https://vborg.vbsupport.ru/showthread.php?t=40056)

hypedave 07-05-2002 04:15 AM

Help I have a user that has purchased a lottery ticket 22 times, he probably has found a way around the system.
Has anyone noticed this problem ?

okay here is an update,

when the user bought his ticket, it gives you the screen that you bought a ticket, at that point all you have to do it refresh your browser and buy another ticket

there has got to be a fix to this before it gets out of hand

bandersen 07-05-2002 07:43 AM

see post#61 (page5)

Quote:

Originally posted by hypedave
Help I have a user that has purchased a lottery ticket 22 times, he probably has found a way around the system.
Has anyone noticed this problem ?


okay here is an update,

when the user bought his ticket, it gives you the screen that you bought a ticket, at that point all you have to do it refresh your browser and buy another ticket

there has got to be a fix to this before it gets out of hand


Alfo 07-07-2002 01:56 PM

Lesane Great hack thanks again for making another fine addition to the store hack:)

N9ne 07-22-2002 07:56 PM

Lesane, is it possible to remove a lottery? I accidentally created two, but I need to remove them *IMMEDIATELY*

Lesane 07-26-2002 07:38 AM

Quote:

Originally posted by Tha Rock
Lesane, is it possible to remove a lottery? I accidentally created two, but I need to remove them *IMMEDIATELY*
Give me the lottery name of the second one or do you want to delete them both?

trainer 07-26-2002 03:32 PM

Lesane is there a way to give away something other then points/cash. we would like to give away sponsor prizes but this addon didn't seem to support it

Mr_P 07-26-2002 11:52 PM

quick one guys

Is it possible to call in on main forum home page how much is in the Lottery as this will encourage members to buy a ticket in hope of winning it.

Example :

Current Lottery Fund is now : 2300

etc so then they pay 200 for a ticket (im expensive) and then when they refresh it says

Current Lottery Fund is now : 2500

Basically just need the code that calls it in .........Anyone ?????

Another Idea if poss

is it poss if no Lottery is running then the line above dont show on forum home but if admin choose to run a lottery then the line auto appears with current jackpot and how many users have bought tickets etc

I know not much of ideas but they can be built upon.

proxyMX 07-27-2002 03:56 AM

Parse error: parse error in /home/virtual/site20/fst/var/www/html/forums.proxymx.com/admin/index.php on line 252

i cant get in to edit the templates and finish the add on, because i get this stinking error everytime i go to admin index :| Elp

proxyMX 07-27-2002 05:02 AM

Tis ok ive fixed it doh!

when it works

Mr_P 07-27-2002 12:10 PM

for my post 2 back i know if u go to shop u can see these things i want but i need to code to call them in on homepage as users are lazy as we all know so the easiest way is always the best way.

Mr_P 07-27-2002 10:28 PM

starting to look like im spamming this page but i dont mean to guys.

I have tried all variables on forum home just so it says Lottery is now at ???

but i dont know the correct one
anyone know the right one ?

It shows in the shop so im presuming i must be able to get it on me main page so all users can see what they can win without going shop...

N9ne 07-28-2002 10:49 AM

Lesane: I want to remove both lotteries

Lesane 07-28-2002 04:23 PM

Quote:

Originally posted by Tha Rock
Lesane: I want to remove both lotteries
Execute this query:

PHP Code:

DELETE FROM storelottery 


Lesane 07-28-2002 04:31 PM

Quote:

Originally posted by Mr_P
quick one guys

Is it possible to call in on main forum home page how much is in the Lottery as this will encourage members to buy a ticket in hope of winning it.

Example :

Current Lottery Fund is now : 2300

etc so then they pay 200 for a ticket (im expensive) and then when they refresh it says

Current Lottery Fund is now : 2500

Basically just need the code that calls it in .........Anyone ?????

Another Idea if poss

is it poss if no Lottery is running then the line above dont show on forum home but if admin choose to run a lottery then the line auto appears with current jackpot and how many users have bought tickets etc

I know not much of ideas but they can be built upon.

Put this code in root/index.php:

PHP Code:

$check=$DB_site->query_first("SELECT * FROM store WHERE ok='Y'");
if (
$check[action]=='lottery') {
$lok=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'");
$jackpot="Current Lottery Fund is now: $lok[jackpot]";
} else {
$jackpot="";


Open forumhome template and put $jackpot wherever you want.

Mr_P 07-28-2002 04:44 PM

just like to say thanks to lesane for his help

much appreciated m8

trainer 07-28-2002 06:04 PM

Lesane is there a way to give away something other then points/cash. we would like to give away sponsor prizes but this addon didn't seem to support it

proxyMX 07-28-2002 07:33 PM

What i have planned is the main lottery prise draw, then a random, Moderator for a month prize to one of the losers, who then enjoy the beneifits of being a mod for one whole month, until the next draw

Mr_P 07-28-2002 08:40 PM

Ok worked well and it updates as well so cheers

Welcome To The Lotto

Money in jackpot: 2002

One more question : i have 15 awards using the awards cards hack - how can i make some of them apear in shop so users can buy them.I use the red card in the shop so if a user gets this he can pay to have it removed but how can it be implented so they can buy other awards from shop.

Example we play a lot of RTCW so we have a few awards for the game but users keep asking for a rtcw logo under their name so they can say they are part of the team on the board who play.
Well for a price and a hack they can.

Is this possible ?

This shop business is one of best ideas i have seen in long while as it can be expanded to cover just about anything(wish i was a coder)

tpearl5 07-29-2002 10:09 PM

When I try to end a lottery I get this error in the admin cp:
Quote:

Invalid SQL: SELECT * FROM user ORDER BY RAND() desc LIMIT 1
mysql error: You have an error in your SQL syntax near 'RAND() desc LIMIT 1' at line 1

mysql error number: 1064
I just tried rehacking the store files with no avail. What's wrong? :ermm:

Mr_P 07-29-2002 10:31 PM

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.

ZiRu$ 08-01-2002 03:12 PM

i shall install it now!!!!!

Dean C 08-07-2002 04:59 PM

is there any way of changing the amount a ticket costs?

Thanks in Advance

- Mist

Limpkinw 08-07-2002 05:11 PM

Quote:

Originally posted by LightBringer


Lesane stated a few posts back that the winner is NOT automatically chosen. An admin must go in to the Lottery options within the control panel and pick the winner.






This will reset all the values of the lottery and remove it from the Store view.


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.

Am I clear as to what Im trying to do here?

BluSmurf 08-07-2002 10:24 PM

Quote:

Originally posted by Lesane


Put this code in root/index.php:

PHP Code:

$check=$DB_site->query_first("SELECT * FROM store WHERE ok='Y'");
if (
$check[action]=='lottery') {
$lok=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'");
$jackpot="Current Lottery Fund is now: $lok[jackpot]";
} else {
$jackpot="";


Open forumhome template and put $jackpot wherever you want.

I'm having problem with this, I placed $jackpot in forumhome template but on the index page it didn't show up. Any help?

xxxsaint 08-09-2002 03:33 PM

I am having the same problem that another guy posted on here , everything installed just fine, and when I created my lottery in admin cp it went just fine , but when I try to purchase a ticket all I get is a white page and no ticket is purchased. Please help :D

DestyNova 08-09-2002 05:12 PM

Quote:

Originally posted by BluSmurf


I'm having problem with this, I placed $jackpot in forumhome template but on the index page it didn't show up. Any help?

Me either, it didnt show up.

Lesane, Do I have to put your jackpot codes in right place or? since I dont know which so I put it below ?> in index.php but it doesnt work anyway

Any idea?

Mr_P 08-09-2002 05:12 PM

Quote:

Originally posted by Limpkinw



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.

Am I clear as to what Im trying to do here?

you have to read the posts - go backwards though them not from beginning as i had to do this so when i ended lottery it picked a winner from ones who had bought a ticket.
I think its around page 40 but dont quote me on that

Its just a query u run

BluSmurf 08-09-2002 05:43 PM

Quote:

Originally posted by Mr_P
Ok worked well and it updates as well so cheers

Welcome To The Lotto

Money in jackpot: 2002

One more question : i have 15 awards using the awards cards hack - how can i make some of them apear in shop so users can buy them.I use the red card in the shop so if a user gets this he can pay to have it removed but how can it be implented so they can buy other awards from shop.

Example we play a lot of RTCW so we have a few awards for the game but users keep asking for a rtcw logo under their name so they can say they are part of the team on the board who play.
Well for a price and a hack they can.

Is this possible ?

This shop business is one of best ideas i have seen in long while as it can be expanded to cover just about anything(wish i was a coder)

Mr_P , can you tell me how you managed to display the jackpot amount on the front page? I'm having problem with it. Thanks!

xxxsaint 08-09-2002 05:48 PM

And if anyone figured out why some of us get a blank white screen when we try to buy a ticket it would be greatly apreaciated :D

Roxie 08-09-2002 06:24 PM

Quote:

Originally posted by Limpkinw



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.

Am I clear as to what Im trying to do here?

You can hit the back button and try ending the lottery again until selects a winner. There is a fix on if you read back that you can use so that it only selects a winner from those that bought a ticket.

Mr_P 08-09-2002 08:37 PM

Hope im allowed to post this here

This is from my Index.php

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>";
}

BluSmurf 08-10-2002 03:35 AM

thanks, it worked :D

BluSmurf 08-10-2002 03:49 AM

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 Entitled:(7)

But I was brougth to a blank page, is that an error?

xxxsaint 08-10-2002 05:58 AM

when I click on BUY A TICKET all I get is a blank white page. ANYBODY with any help here ??

BluSmurf 08-10-2002 05:45 PM

mine too.. it was working perfectly a few days earlier, not sure why it stopped working now :(

tpearl5 08-12-2002 12:53 AM

Quote:

Originally posted by tpearl5
When I try to end a lottery I get this error in the admin cp:
Quote:

Invalid SQL: SELECT * FROM user ORDER BY RAND() desc LIMIT 1
mysql error: You have an error in your SQL syntax near 'RAND() desc LIMIT 1' at line 1

mysql error number: 1064
I just tried rehacking the store files with no avail. What's wrong? :ermm:

Anyone else getting this?

xxxsaint 08-12-2002 07:54 PM

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:

When i try to buy a ticket it comes up a blank page. No ticket is bought. The url of the blank page is http://www.tdleague.com/forums/store.php?action=lottery

Can somebody please help or do I just need to uninstall this one ?

thanks :S

BluSmurf 08-13-2002 04:49 AM

no one can figure out why we're having blank pages?

Lesane 08-13-2002 11:24 AM

Quote:

Originally posted by tpearl5
When I try to end a lottery I get this error in the admin cp:


I just tried rehacking the store files with no avail. What's wrong? :ermm:

Wich mysql version are you using?

Lesane 08-13-2002 11:30 AM

Quote:

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."

In the file, admin/storeadmin.php.


All times are GMT. The time now is 04:20 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01638 seconds
  • Memory Usage 1,849KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete