vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - v3 Arcade - Professional vBulletin Gaming (https://vborg.vbsupport.ru/showthread.php?t=205692)

MagicThemeParks 06-29-2010 01:30 AM

FYI: For those using this arcade mod with vBcredits, there is an update for the latest version of vBcredits....

https://vborg.vbsupport.ru/showthread.php?t=245482

bada_bing 06-30-2010 08:17 PM

I am getting reports from several members and I have also tested this but when you play a mochi game withing vb arcade the scores are not being updated. This only started to happen after I upgraded to the latest version of vb arcade... how can I fix this issue?

odln018 06-30-2010 08:39 PM

<a href="http://www.v3arcade.com/forums/showthread.php?t=3361" target="_blank">http://www.v3arcade.com/forums/showthread.php?t=3361</a>

CybaGirl 07-04-2010 06:47 AM

Can someone please help with a single game issue that I have? I have spent the last hour reading all these pages. But I didn't seem to find anyone else with the same issue.

The issue I am having is when the game ends. Instead my score being submitted and being taken to the high score page I am redirected to the main index page.

All the other games work perfectly and none of my other games do this. It's just this one particular game that I am having the issue with and I would very much like to get it working properly on the forum.

The game plays perfectly. It's just that when the game is over I am re directed to the forums index page.

I'm assuming that there is something inside the game .swf file that needs changing? Such as where it redirects the player to when the game is over. If so what needs to be edited or changed?

Any assistance as to how I can fix this would be greatly appreciated.

Thanks.

CybaGirl 07-16-2010 01:09 AM

Any help on this? Before I try installing the oppositions gaming system and get it running with that?

Thanks.

BirdOPrey5 07-16-2010 03:28 AM

Does your game happen to be an IBPro game and is your main index page happen to be VBadvanced? If so there is some code to be added to the index.php page I can find if you need it.

BirdOPrey5 07-16-2010 03:33 AM

Well in any case, in case it can help someone else, the code is:

Code:

if ($_REQUEST['do'] == 'newscore' AND $_REQUEST['act'] == 'Arcade')
{
    require_once(DIR . '/includes/v3arcade_functions.php');
    // Clean values
    $vbulletin->input->clean_array_gpc('p', array(
        'gscore' => TYPE_NOHTML,
        'gname' => TYPE_STR
    ));

    if (!$game = $db->query_first("
            SELECT *
            FROM " . TABLE_PREFIX . "v3arcade_games
            WHERE shortname = '" . $db->escape_string($vbulletin->GPC['gname']) . "'
        ")
    )
    {
        exit;
    }

    // Create a session record.
    $db->query_write("
        INSERT INTO " . TABLE_PREFIX . "v3arcade_sessions
            (gameid, gamename, userid, start, sessiontype, challengeid, score, finish)
        VALUES (
            $game[gameid],
            '" . $db->escape_string($vbulletin->GPC['gname']) . "',
            '" . $vbulletin->userinfo['userid'] . "',
            '" . TIMENOW . "',
            1,
            " . ($vbulletin->userinfo['challengecache'] ? $vbulletin->userinfo['challengecache'] : 0) . ",
            '" . $db->escape_string($vbulletin->GPC['gscore']) . "',
            '" . TIMENOW . "'
    )");

    // Fetch the ID number of the session we just inserted.
    $lastid = $db->insert_id();

    header('Location: arcade.php?sessdo=burn&id=' . $lastid . '&microone=' . getmicrotime());
    exit;
}

if ($_REQUEST['do'] == 'verifyscore' AND $_REQUEST['autocom'] == 'arcade')
{
    // Get two random numbers to do our score verification
    $randomvar1 = rand(1, 25);
    $randomvar2 = rand(1, 25);

    // Bake a Cookie
    vbsetcookie('v3arcade_v32_cookie', $randomvar1 . ',' . $randomvar2, permanent);

    // Return the values
    echo '&randchar=' . $randomvar1 . '&randchar2=' . $randomvar2 . '&savescore=1&blah=OK';

    exit();
}

if ($_REQUEST['do'] == 'savescore' AND $_REQUEST['autocom'] == 'arcade')
{
    require_once(DIR . '/includes/v3arcade_functions.php');

    $vbulletin->input->clean_array_gpc('p', array(
        'gscore' => TYPE_NOHTML,
        'arcadegid' => TYPE_NUM,
        'enscore' => TYPE_NUM,
        'gname' => TYPE_STR
    ));

    // Get a cookie from the jar
    $randomvars = explode(',', $_COOKIE[COOKIE_PREFIX . 'v3arcade_v32_cookie']);

    // If the checksum values do not match, display an error to the user.
    if( $vbulletin->GPC['enscore'] != ($vbulletin->GPC['gscore'] * $randomvars[0] ^ $randomvars[1]))
    {
        print_no_permission();
    }

    // Check to see game name is one file
    if(!$game = $db->query_first("
            SELECT *
            FROM " . TABLE_PREFIX . "v3arcade_games
            WHERE shortname = '" . $db->escape_string($vbulletin->GPC['gname']) . "'
        ")
    )
    {
        exit;
    }

    // Create a session record.
    $db->query_write("
        INSERT INTO " . TABLE_PREFIX . "v3arcade_sessions
            (gameid, gamename, userid, start, sessiontype, challengeid, score, finish)
        VALUES (
            $game[gameid],
            '" . $db->escape_string($vbulletin->GPC['gname']) . "',
            '" . $vbulletin->userinfo['userid'] . "',
            '" . TIMENOW . "',
            1,
            " . ($vbulletin->userinfo['challengecache'] ? $vbulletin->userinfo['challengecache'] : 0) . ",
            '" . $db->escape_string($vbulletin->GPC['gscore']) . "',
            '" . TIMENOW . "'
    )");

    // Fetch the ID number of the session we just inserted.
    $lastid = $db->insert_id();

    header('Location: arcade.php?sessdo=burn&id=' . $lastid . '&microone=' . getmicrotime());

    // Clear the cookie values
    vbsetcookie('v3arcade_v32_cookie', '');

    exit;
}

You put the code in your index.php file, assuming you are running vbadvanced, right above the last line of code:
Code:

print_portal_output($home);
This solved my issues with some games reverting back to the main index page after playing.

bada_bing 07-16-2010 07:58 PM

I am having issues where when members are playing MochiAds games that the scores are not being recorded Only certain games are recording a score.

BirdOPrey5 07-16-2010 08:24 PM

You are aware many MochiMedia games do not keep high scores by design? You must limit yourself to 'leadernoard enabled' games when looking for games, and even some of them don't save scores.

RobbieZ 07-16-2010 10:36 PM

Has anyone got both arcades working on one board?


All times are GMT. The time now is 10:15 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.01965 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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