[MODDB] Ultimate Points 1.0.6

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] Ultimate Points 1.0.3

Post by stokerpiller » Fri Jul 24, 2009 6:28 am

femu wrote:
stokerpiller wrote:Earlier someone wrote about the last lottery player always wins the pot.
Several times this has happened to me.

The lottery winner is drawn at 23.00
I visit the board at 24.00 and check the lottery, there is no winners.
Then I buy my 10 tickets and immediately after I get a PM telling me that I won the lottery??

This bug was not present with 1.0.2
Be more detailed.... What are your settings? At what time the lottery runs, etc ....
As I wrote the lottery runs at 23.00 (not exactly, but about that time)
I visit the board at 24.00 and checks who won the lottery.
There are no winners.
Then I buy 10 tickets which is the limit and immediately after I get a PM telling me that I won the lottery.

My settings: http://easycaptures.com/7691134285

Let me know if you need more info.
I am done with phpBB

femu
Registered User
Posts: 1070
Joined: Tue Sep 27, 2005 10:03 am

Re: [RC] Ultimate Points 1.0.3

Post by femu » Fri Jul 24, 2009 8:41 am

Hi,

Wuerzi just tested different situations:

Code: Select all

1. try:
User 1 bought 10 tickets
User 2 bought 1 ticket

Winner: user 1

2. try:
Same situation as above

Winner user 1 (chance to pick a user with more tickets is of course higher)

3. try:
User 1 bought 1 ticket
User 2 bought 10 tickets

Winner: user 2

4. try:
User 1 bought 1 ticket

Winner: user 2

5. try:
same as above

Winner: user 1
As you can see total different result. And this function was implemented already in version 1.0.2 and was not changed in 1.0.3. The only thing is, that of course a user with more tickets has a higher chance to be picked up, than a user with only 1 ticket. If the chance to win is below 100%, than this is next part of the calculation. So 50% gives 50:50 chance for the selected winner to really win.
Regards, femu
_____________________________________________
[My development page] - [My normal homepage (German only)]

femu
Registered User
Posts: 1070
Joined: Tue Sep 27, 2005 10:03 am

Re: [RC] Ultimate Points 1.0.3

Post by femu » Fri Jul 24, 2009 8:49 am

keith10456 wrote:I got the error when I ran the provided SQL script to convert from APS 0.9.2 to UP 1.0.3
Ok. Let's first see, if you might have these values already in the phpbb_acl_options ..

Go to your phpMyAdmin and check, if the three fields (u_use_robbery, u_use_lottery and u_use_transfer) probably already exists ....

If not, try again following queries:

Code: Select all

INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_use_robbery', 1, 0, 0);
INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_use_lottery', 1, 0, 0);
INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_use_transfer', 1, 0, 0);
If this works, go ahead with the next queries. But run them step by step.
Regards, femu
_____________________________________________
[My development page] - [My normal homepage (German only)]

wolkenkrieger
Registered User
Posts: 26
Joined: Sun Jul 06, 2008 7:43 pm

Re: [RC] Ultimate Points 1.0.3

Post by wolkenkrieger » Fri Jul 24, 2009 11:02 am

Hi,

something is wrong with your word count algo!

Text:
--------------------------------------------------------------------------------------------------
[color=crimson][OT]

Ihr braucht reine Links nicht in [url] zu packen. Das macht das Board alleine.

[/OT][/color]

Und zum Thema selbst sage ich mal leiber nichts, sonst heisst es nachher noch, ich hätte keine gute Kinderstube gehabt.
------------------------- (i disabled bbCode here to show you the real text) -------------

Result: 0.06 Points

Settings: 0 Points for Forum, 0.01 Points per new Word

stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] Ultimate Points 1.0.3

Post by stokerpiller » Fri Jul 24, 2009 12:14 pm

Then I will need to know what triggeres the lottery draw?

I dont have many users at this board and the activity is low at the drawing time.
So could it be me bying new tickets that activates the lottery draw?
I am done with phpBB

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [RC] Ultimate Points 1.0.3

Post by keith10456 » Fri Jul 24, 2009 4:23 pm

femu wrote:
keith10456 wrote:I got the error when I ran the provided SQL script to convert from APS 0.9.2 to UP 1.0.3
Ok. Let's first see, if you might have these values already in the phpbb_acl_options ..

Go to your phpMyAdmin and check, if the three fields (u_use_robbery, u_use_lottery and u_use_transfer) probably already exists ....

If not, try again following queries:

Code: Select all

INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_use_robbery', 1, 0, 0);
INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_use_lottery', 1, 0, 0);
INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_use_transfer', 1, 0, 0);
If this works, go ahead with the next queries. But run them step by step.
That worked... One last problem though :( When I go to the "Robbery" in the ACP I get an error message letting me know that the html file is missing. I double-checked to ensure that all files where uploaded, purged cache, etc.

The error is:

Code: Select all

template->_tpl_load_file(): File ./style/.html 
Last edited by keith10456 on Fri Jul 24, 2009 5:34 pm, edited 1 time in total.

User avatar
kiddo
Registered User
Posts: 41
Joined: Tue Jan 15, 2008 2:59 pm

Re: [RC] Ultimate Points 1.0.3

Post by kiddo » Fri Jul 24, 2009 4:54 pm

if this has been asked before, sorry for that.

What I wondered is if it is possible to have the script not give the points to the poster before a post has been approved.
I tested on my board and it added the points at the time a post was made even before it was approved by an admin.

thanks in advance for the help

User avatar
milkboy31
Registered User
Posts: 422
Joined: Tue Aug 09, 2005 2:44 pm

Re: [RC] Ultimate Points 1.0.3

Post by milkboy31 » Fri Jul 24, 2009 7:52 pm

Kiddo, I'm not positive, but I'm pretty sure that it doesn't matter... If you dissapprove the post, the points are subtracted as the post is deleted.

I suppose the only issue would be if the user posted, got points, then bought a bunch of lottery tickets with the points... then had them deleted.

FLATTOP
Registered User
Posts: 50
Joined: Wed Feb 18, 2009 4:34 pm
Location: Texas

Re: [RC] Ultimate Points 1.0.3

Post by FLATTOP » Fri Jul 24, 2009 7:52 pm

Hey Femu,
I have a question about the lottery and the chance to win percentage. The way I understand the percentage is the higher you set it, the bigger chance that "someone" will win, is that correct?

I have mine set to 100% with each member allowed to buy one ticket, I may have 10 to 12 members who buy tickets, I set it to 100% because I want there to be a winner each time, am I doing it correctly?

User avatar
Wuerzi
Registered User
Posts: 60
Joined: Fri Aug 15, 2008 11:38 pm
Location: Germany/Würzburg
Contact:

Re: [RC] Ultimate Points 1.0.3

Post by Wuerzi » Fri Jul 24, 2009 9:26 pm

FLATTOP wrote:Hey Femu,
I have a question about the lottery and the chance to win percentage. The way I understand the percentage is the higher you set it, the bigger chance that "someone" will win, is that correct?

I have mine set to 100% with each member allowed to buy one ticket, I may have 10 to 12 members who buy tickets, I set it to 100% because I want there to be a winner each time, am I doing it correctly?
femu sleeps :ugeek:
Yes that is correct! ;)

User avatar
kiddo
Registered User
Posts: 41
Joined: Tue Jan 15, 2008 2:59 pm

Re: [RC] Ultimate Points 1.0.3

Post by kiddo » Fri Jul 24, 2009 9:56 pm

milkboy31 wrote:Kiddo, I'm not positive, but I'm pretty sure that it doesn't matter... If you dissapprove the post, the points are subtracted as the post is deleted.

I suppose the only issue would be if the user posted, got points, then bought a bunch of lottery tickets with the points... then had them deleted.
Thanks for the answer, however it does not exactly work like that.
the points are added when the post is made, however I tested with dissaproving a post and it does not substract the points when dissaproved, so I think it would be definatly best to only add points to posts that are approved?

User avatar
milkboy31
Registered User
Posts: 422
Joined: Tue Aug 09, 2005 2:44 pm

Re: [RC] Ultimate Points 1.0.3

Post by milkboy31 » Fri Jul 24, 2009 11:28 pm

Yeah I wondered about that. I know that points are not subtracted for posts that are deleted via the mod control panel (and I guess that means disapproving posts as well). They ARE however, subtracted if you delete the post straight up with the delete button.

You could always just do that.... instead of disapproving them, just delete them.

User avatar
kiddo
Registered User
Posts: 41
Joined: Tue Jan 15, 2008 2:59 pm

Re: [RC] Ultimate Points 1.0.3

Post by kiddo » Fri Jul 24, 2009 11:33 pm

milkboy31 wrote:Yeah I wondered about that. I know that points are not subtracted for posts that are deleted via the mod control panel (and I guess that means disapproving posts as well). They ARE however, subtracted if you delete the post straight up with the delete button.

You could always just do that.... instead of disapproving them, just delete them.
Yeah, I know that is an option, but too risky for me to use.
My members need points to do stuff on my board and if they figure out they can just submit posts and then quickly use the points received they quite surely will :(

User avatar
milkboy31
Registered User
Posts: 422
Joined: Tue Aug 09, 2005 2:44 pm

Re: [RC] Ultimate Points 1.0.3

Post by milkboy31 » Sat Jul 25, 2009 2:25 am

On another note: An ACP option to set the max number of points per post or the number of points giving posts per day is also a suggestion for a future release feature. I've seen this on previous points mods (it was on the cash mod in phpBB2) and I don't think it'd be too hard to do. At least the "max per post" one. The max per 24 hours would take a bit more work and perhaps an additional table in the database to record how many posts were made that day... maybe not though.

User avatar
milkboy31
Registered User
Posts: 422
Joined: Tue Aug 09, 2005 2:44 pm

Re: [RC] Ultimate Points 1.0.3

Post by milkboy31 » Sat Jul 25, 2009 12:09 pm

Found a bug...
If you submit a post and get paid for it, then you edit the post but don't change anything and submit it again, you get paid again... You can repeat this indefinitely until you actually change something on the post... at which point, submitting it will knock off all the extras you shouldn't have been paid.

My Setup:
I have new posts and edits set to 20 points each. Edits were set to 20 from 0 since editing a post would remove the 20 you initially were given (I think this is the bug pointed out earlier that Moltendorf posted a workaround for). Regardless, normal behavior right now for my site is that if you post, you get 20. If you edit that post, it says you get 0, but you keep that 20 from before since edits are worth 20 as well.

The issue:
With this bug, if you post, you get 20, if you edit but DON'T change anything, you get another 20. You can repeat this as desired... then if you edit and DO change something, it subtracts all but the original 20.

For example:
I post "hi" and get 20 points
I edit but don't change text and get 20 more points
I edit but don't change text and get 20 more points
I edit and DO change text and it says I get -40 points, dropping me to 20 for the total post.

Obviously the issue is that users can abuse this and not change text to just keep racking up points.


Edit: I just set the points per post to 20, the points per edit to 30... to see which was the culprit. I found the following:
Post: Gained 20 (total 20)
Edit 1: Gained 30 (total 50)
Edit 2: Gained 30 (total 80)
Edit 3: Gained 30 (total 110)
Edit 4, changed text: lost 80. (dropping me to 30 gained total... the same as what I specify an edit should be worth)

Or is thi sthe same bug as Moltendorfs? Theoretically, if I didn't want to give out points for editing posts... I would have set it to 20 per post, and 0 per edit. If the users didn't lose or gain the post points for editing (as Moltendorfs bug shows) then I wouldn't be seeing this behavior, correct?

I was going to test out Moltendorf's fix, but the last part is identical... copy / paste error? :lol:
http://www.phpbb.com/community/viewtopi ... #p10262315

Locked

Return to “[3.0.x] MODs in Development”