vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Add-On Releases - MMLotto System (https://vborg.vbsupport.ru/showthread.php?t=124858)

micheal332001 08-24-2006 10:00 PM

MMLotto System
 
Downloads for this modification have been removed according to Official Policy: When Security Vulnerabilities in Hacks are Found

MMlotto is a lotto system.

This lotto system will let your members choose 5 numbers for the lotto.
The cron job will randomly choose 5 numbers and find all the winners for matching 3, 4 and 5 numbers.
matching 5 numbers is the jackpot.

This lotto system uses ucash, vbplaza and any other points system.

ADMINCP

Lotto Settings

Lotto On/Off?
Site URL
Cash System To Use
Cost Per Game
How Many Lotto Tickets

users tickets
Lotto Rules
Add New Rule
Lotto Menu
Add New Menu Link
Lotto Results

USERS

Buy Lotto Ticket
Lotto Ticket List
Lotto Jackpot Winners List
Lotto Match 4 Number Winners List
Lotto Match 3 Number Winners List
lotto Rules

When you have installed the product.xml file it will add the cron job this can be changed by going to your
Scheduled Tasks
Scheduled Task Manager
and look for the MM Lotto Results
and change it to the time and date you want the job to run the lotto resultes.

Will add more here very soon.

There is no read me files at this time but will be added.

To install this mod just goto your Plugins & Products
Manage Products
And select the product-mmlotto1.xml file
Allow Overwrite set to no

Murty 08-25-2006 05:50 AM

Nice!

Gizmo5h1t3 08-25-2006 12:21 PM

ok...installed, and it works fine...AT LAST YEY!!!..lmaO

BUT...theres one prob ive found...

i set it to buy 2 tickets, at 50 points each..(using vbbux)...

i bough a ticket, all is working.....with correct calculation of points deducted as it should....nice....

HOWEVER..

if you refresh the page after you buy the first ticket, it buys a SECOND ticket with the same numbers.....
i did this to see if the jackpot amount was working as it should..ie..increasing with the bought ticket...(as when u buy the first ticket, and it says the ticket is purchased, the "tickets sold" shows zero)......and i found this error...

prolly a simple edit or fix i know, but i just thought id give u a heads up.

also, it hasnt added the cron job....

Quote:

When you have installed the product.xml file it will add the cron job this can be changed by going to your
Scheduled Tasks
Scheduled Task Manager
and look for the MM Lotto Results
and change it to the time and date you want the job to run the lotto resultes.
nope, nothing there mate..................


and one more thing, can u guide me to where i can change the number of points initially for the 3 numbers, 4 numbers and the jackpot??

presently, 3 numbers pays out 10 points, which is pretty useless, as its costing em 50 to buy a ticket??

so how could i set the start off prizes for the lotto to have say......

3 numbers = 1000 points

4 numbers = 4500 points

Jackpot = 25000 points



apart from these teething probs, a cracking hack, seriously....nice work!!

micheal332001 08-25-2006 06:41 PM

Quote:

Originally Posted by Gizmo5h1t3
ok...installed, and it works fine...AT LAST YEY!!!..lmaO

BUT...theres one prob ive found...

i set it to buy 2 tickets, at 50 points each..(using vbbux)...

i bough a ticket, all is working.....with correct calculation of points deducted as it should....nice....

HOWEVER..

if you refresh the page after you buy the first ticket, it buys a SECOND ticket with the same numbers.....
i did this to see if the jackpot amount was working as it should..ie..increasing with the bought ticket...(as when u buy the first ticket, and it says the ticket is purchased, the "tickets sold" shows zero)......and i found this error...

prolly a simple edit or fix i know, but i just thought id give u a heads up.

also, it hasnt added the cron job....



nope, nothing there mate..................


and one more thing, can u guide me to where i can change the number of points initially for the 3 numbers, 4 numbers and the jackpot??

presently, 3 numbers pays out 10 points, which is pretty useless, as its costing em 50 to buy a ticket??

so how could i set the start off prizes for the lotto to have say......

3 numbers = 1000 points

4 numbers = 4500 points

Jackpot = 25000 points


apart from these teething probs, a cracking hack, seriously....nice work!!

Yes if you refresh the page it will do it again but i will be changing this so it dose not happen.

In 3.5.x you would have to add the cron job yourself something like this.

Name mmlotto system results
file .includes/cron/mmlotto.php

Set the time as you want.

To set the points when the cron job runs edit the includes/cron/mmlotto.php file
and look for this line of code
PHP Code:

$vbulletin->db->query("UPDATE " TABLE_PREFIX "mmlotto_payouts SET fournums = 250"); 

change the 250 to what you want.

for the jackpot look for this line of code
PHP Code:

$vbulletin->db->query("UPDATE " TABLE_PREFIX "mmlotto_payouts SET fivenums = 2500"); 

and change the 2500 to what you want.

If you want to to have the match 3 changed find this.
PHP Code:

$vbulletin->db->query("UPDATE " TABLE_PREFIX "user SET $userscashtable = $userscashtable+$matchthreepayouts WHERE userid= '$match3[userid]' "); 

and after add this line of code
PHP Code:

$vbulletin->db->query("UPDATE " TABLE_PREFIX "mmlotto_payouts SET threenums = 250"); 

and change the 250 to what you want it to be.

FROGGYJ 08-25-2006 07:32 PM

do you realize it says to enter a new number for each of the 6 inputs...but yet I only see 5 in the screenshots.

Rickie3 08-25-2006 10:54 PM

Quote:

Originally Posted by Gizmo5h1t3
it hasnt added the cron job....

sorry forgot to add that it is reguired to add the cron manually via adminCP.

MUDERCOOL 08-25-2006 11:01 PM

süper! thank you very much..

but some other things like adjusting jackpot adn other rewards from admincp can be added. also, one other thing is "deductions",
I want my members (and I, players, everybody) to put 100 (for example, to buy ticket, spending 100 for each ticket) but 10% of that 100, should not be added to anywhere.
so in this way it could be a way to make people "spend" some money (points)

Gizmo5h1t3 08-25-2006 11:04 PM

many thanks for your help in gettin it sorted mate....

did the file edits to the cron file...added the cron job manually...ran the cron manually to see if it all works....cron ran ok..

but after editing ther values with the points in your edits, the reset doesnt set it back to the points i added...(in my original request)

ie....3 numbers is still 10 points.......4 numbers hasnt changed,or the jackpot.....

any ideas why that should be??

Mysticales 08-26-2006 01:42 AM

Ok installed on a large community forum, gonna see if this runs better then the vbplaza lottery.

Mysticales 08-26-2006 02:00 AM

Fyi, If you wanna start "higher" for your lottery. Do this, Uninstall your mmlotto product.
Then edit the xml file.
Find in the code
Code:

$db->query_write("INSERT INTO ".TABLE_PREFIX."mmlotto_payouts VALUES
and change to

Code:

$db->query_write("INSERT INTO ".TABLE_PREFIX."mmlotto_payouts VALUES (X, Y, Z)");
X = 5 Match
Y = 4 Match
Z = 3 Match.
Then in your cron job php file, you need to edit those values to match the ones in the xl you set. Using the info from this post https://vborg.vbsupport.ru/showpost....40&postcount=4

Then install the product, when you get to the main mmlotto page now, your fields for payout will be setup correctly for the 1st time use, and if someone wins, it will reset to the values again.

I would like to add, that making a option in the AdminCP to "reset lottery" to reset the values should be added, shouldnt be too hard, same time make a field for "3 matches, 4 matches, 5 matches" to have in admincp a way to define the payouts, then when you did reset, it would change the SQL Table to match. Then all one had to do is figure out how to avoid the cron job dependancy to reset the values.


All times are GMT. The time now is 08:45 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.01147 seconds
  • Memory Usage 1,760KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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