vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   v3arcade reduce scores to keep arcade competitive (https://vborg.vbsupport.ru/showthread.php?t=124879)

bairy 08-24-2006 10:00 PM

v3arcade reduce scores to keep arcade competitive
 
After my arcade had been installed for while I found that all the high scores were practically unbeatable.
I wanted a way to make them beatable again.

I thought about the possibility of just removing the top 5 high scores, but that wouldn't be fair on the winners.
I thought about resetting all the scores but that wouldn't be fair on any of the players.
Then I came to a perfect compromise: Reduce the scores. All the ranks are kept in tact but the high scores are achievable again. As a bonus, it increases competitiveness when the previous top scorers get beaten.

It's all done by a single cron job.

Upload arcadescores.php to /includes/cron
Set a new scheduled task. This one runs on the first of each month:
Day of week: *
Day of month: 1
Hour: 0
Minute: 4
Log: up to you
Filename: ./includes/cron/arcadescores.php

By default the scores are reduced by 15%. If you want to change this percentage, change the 15 to whatever you like on lines 11, 15 and 19 of the script.

Important note: This script will reduce the scores by 15% each time you run it manually or on cron. That means if you install it and want to play around with it, you might want to make a backup of the arcade_games, arcade_sessions and arcade_news tables.

Version 1.01
- Updated to account for games that have reverse scoring
- Now includes table_prefix
- Made the change percentage easier to change

Version 1.02
- Fixed a tiny bug I created in 1.01: If you had no reverse-scoring games it errored.

MissKalunji 08-27-2006 12:47 AM

i dont get it !?!?

bairy 08-27-2006 07:50 AM

Once a month (or whenever the cron is run), all the scores that people have acheived are reduced by 15%

HuntrCkr 08-27-2006 03:17 PM

Excellent mod! I installed this on my arcade and it works flawless. Great work.

MissKalunji 08-27-2006 09:02 PM

Quote:

Originally Posted by bairy
Once a month (or whenever the cron is run), all the scores that people have acheived are reduced by 15%


ohhh smart move!

Thanks

Snake 08-30-2006 03:56 PM

Thanks for the hack! I'll install it right away... :)

Breaker 10-06-2006 10:04 PM

great mod/idea... just one problem though. I haven't looked at the code yet, but it appears that all this does is lower the score which is great for all games but ones with reverse scoring which will, over time make it impossible to beat the scores :D

lazydesis 10-07-2006 01:58 AM

i get this error ...and have no clue why

Database error in vBulletin 3.6.1:

Quote:

Invalid SQL:

UPDATE arcade_games SET highscore = CEIL(highscore - ((highscore / 100) * 15));

MySQL Error : Table 'lazyindi_comm.arcade_games' doesn't exist

lazydesis 10-07-2006 03:53 AM

juz realised in the arcadescores.php
instead of
Code:

$vbulletin->db->query_write("
        UPDATE arcade_games SET highscore = CEIL(highscore - ((highscore / 100) * 15))

u need to have
Code:

$vbulletin->db->query_write("
        UPDATE forum_arcade_games SET highscore = CEIL(highscore - ((highscore / 100) * 15))

or watever they have there for the prefix

lazydesis 10-07-2006 03:53 AM

great hack thanx meanwhile :)


All times are GMT. The time now is 01:10 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.01128 seconds
  • Memory Usage 1,733KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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