Jump to content
MakeWebGames

[mccode v2] Lottery


Akash

Recommended Posts

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

Re: [Free V2] Lottery

yes ace i have made it run in cronjobs checked everything and i dont even know why its not crediting lmao oh well maybe ill give this up as a bad job lol but ill keep trying for now in the meanwhile if anyone comes up with a fix do post it up here :mrgreen:

Link to comment
Share on other sites

  • 2 weeks later...

Re: [Free V2] Lottery

how would i make it so there is 3 winners so like the person who comes first gets 1/2 of the amount, then the person who comes second gets 1/3 of the amount, then the person who come third gets 1/5 of the amount and then the money left over goes to the next weeks jackpot ?

can it be done ???

----------------------------

and also how do i make it so the jackpot starts at $500,000 every week, would i add this to the cron_weekly.php?

$db->query("UPDATE `lottery` SET `jackpot` = 500000");

Link to comment
Share on other sites

Re: [Free V2] Lottery

 

how would i make it so there is 3 winners so like the person who comes first gets 1/2 of the amount, then the person who comes second gets 1/3 of the amount, then the person who come third gets 1/5 of the amount and then the money left over goes to the next weeks jackpot ?

can it be done ???

----------------------------

and also how do i make it so the jackpot starts at $500,000 every week, would i add this to the cron_weekly.php?

$db->query("UPDATE `lottery` SET `jackpot` = 500000");

can someone please reply coz i am a N0OB ???

Link to comment
Share on other sites

  • 2 months later...

Re: [mccode v2] Lottery

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

There needs to be at least one ticket bought for this lottery to work. If you run the query and there has been no tickets bought it will throw and error.

 

how would i make it so there is 3 winners so like the person who comes first gets 1/2 of the amount, then the person who comes second gets 1/3 of the amount, then the person who come third gets 1/5 of the amount and then the money left over goes to the next weeks jackpot ?

can it be done ???

----------------------------

and also how do i make it so the jackpot starts at $500,000 every week, would i add this to the cron_weekly.php?

$db->query("UPDATE `lottery` SET `jackpot` = 500000");

can someone please reply coz i am a N0OB ???

Try something like this

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

If your not getting anywhere there (note you will need at least 3 different people to buy tickets.

But if you get know where, just add this to end of the script

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Which will set the lottery to 500k but you have to add it after the last query (the truncate table query).

Hope this helps :-)

Link to comment
Share on other sites

  • 2 weeks later...

Re: [mccode v2] Lottery

Killah is right when it comes to this script however.

For Killah,

If you made it so each new lottery 1000 ticket IDs were inserted into the DB then users purchased the tickets which inserted there ID into the ticket ID, if they purchase 100 tickets you could get it to say you have 10% chance of winning the lottery as the rand picks out of the 1000 tickets, you cannot do that on this script though with out alot of editing...

=)

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Re: [Free V2] Lottery

 

ok, i made a mistake with what i gave it should be 0 0 * * 5

0-Sunday

1-Monday

2-Tuesday

3-Wednesday

4-Thursday

5-Friday

6-Saturday

 

Sorry to sound newbie but could you post the cron which is set to that date/time?

Cause i cannot find were i put this...

thanx in adnvance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...