vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Arcade Pass Hack v2.0 (https://vborg.vbsupport.ru/showthread.php?t=43700)

Link14716 10-10-2002 09:19 PM

This is not the thread to ask that in, netware.

Stop the repeated posting mewgod! I check up on my hacks but no one wanted to post here so it started going ignored. If you made all of the edits to proarcadeadmin.php, then it works.

mewgood 10-10-2002 11:22 PM

I did
but it just the same
it won't change..

Link14716 10-11-2002 12:20 AM

Code:

-+-+-+
Find:
-+-+-+

$DB_site->query("UPDATE arcadeconfig
                  SET path='$thepath',usescoreicon='$usescoreicon',usekingicon='$usekingicon'
                      ".iif(($scoreicon != "") || ($deletescoreicon == 1),",scoreiconname='$scoreicon_name', scoreicondata='$scorei_d'","")."
                      ".iif(($kingicon != "") || ($deletekingicon == 1),",kingiconname='$kingicon_name', kingicondata='$kingi_d'","")."
                  WHERE arcadeid='$arcadeid'");

-+-+-+-+-+-+-+-+
Replace With:
-+-+-+-+-+-+-+-+

  $DB_site->query("UPDATE arcadeconfig
                  SET path='$thepath',usescoreicon='$usescoreicon',usekingicon='$usekingicon'
                      ".iif(($scoreicon != "") || ($deletescoreicon == 1),",scoreiconname='$scoreicon_name', scoreicondata='$scorei_d'","")."
                      ".iif(($kingicon != "") || ($deletekingicon == 1),",kingiconname='$kingicon_name', kingicondata='$kingi_d'",", passtimeout='$passtimeout', epergamecost='$epergamecost', earcadepass='$earcadepass', eaph='$eaph', ejackpot='$ejackpot'")."
                  WHERE arcadeid='$arcadeid'");

It works, trust me.

mewgood 10-11-2002 12:57 AM

no
not working
here ism y proarcadeadmin.php

Link14716 10-11-2002 01:32 AM

I dunno how you pulled this one over me.

It IS being submitted, I can tell you that.
But for some reason, yours won't update the field. Looking in my proarcadeadmin.php file, the problem line is exactly the same, which is what wonders me.

One notable difference I see are the versions - and that is all. Let me look at your code some more...

mewgood 10-11-2002 01:38 AM

what codes?
I dont think it really matters the vb version

Link14716 10-11-2002 01:46 AM

Ok, I found where the problem is, I just don't know how to tell you how to fix it without replacing an entire action (fun fun). All I can say is cross your fingers!

Find:
PHP Code:

// ###################### Start GENERAL OPTIONS Update #######################
if ($action=="doupdateoptions") {

  
// only process the files if changes were made
  
if (is_array($HTTP_POST_FILES)) {

    if (
$HTTP_POST_FILES[scoreicon]['name'] != "")
      
$scoreicondata vpaupload("scoreicon");
    else
      
$scoreicondata "";

    if (
$HTTP_POST_FILES[kingicon]['name'] != "")
      
$kingicondata vpaupload("kingicon");
    else
      
$kingicondata "";

  } else {

    
$scoreicondata "";
    
$kingicondata "";

  }

  
$DB_site->query("UPDATE arcadeconfig
                   SET path='
$thepath',usescoreicon='$usescoreicon',usekingicon='$usekingicon'
                       "
.iif(($scoreicon != "") || ($deletescoreicon == 1),",scoreiconname='$scoreicon_name', scoreicondata='$scorei_d'","")."
                       "
.iif(($kingicon != "") || ($deletekingicon == 1),",kingiconname='$kingicon_name', kingicondata='$kingi_d'",", passtimeout='$passtimeout', epergamecost='$epergamecost', earcadepass='$earcadepass', eaph='$eaph', ejackpot='$ejackpot'")."
                   WHERE arcadeid='
$arcadeid'");

  
// update champ system setting separately (saves queries!)
  
$DB_site->query("UPDATE setting SET value='$champsystem' WHERE varname='vpa_champsystem'");

  
// must update templates so site will reflect change
  
$optionstemplate=generateoptions();
  
$DB_site->query("UPDATE template SET template='$optionstemplate' WHERE title='options'");

  echo 
"<b>Arcade options updated!</b><br><br>";

  
// go back to change options screen
  
$action "changeoptions";




Replace it ALL with:
PHP Code:

// ###################### Start updateoptions #######################
if ($action=="doupdateoptions") {

  
// only process icons if changes were made
  
if ($scoreicon != "") {
  
    
// check for valid extension
    
$extension=strtolower(substr(strrchr($scoreicon_name,"."),1));
                   
    if ((
$extension != "gif") and ($extension != "jpg") and ($extension != "jpeg") and ($extension != "png")) {
  
      echo 
"vbProArcade Error: " $scoreicon_name " is not a valid file type for icons (only gif/jpg/png are supported)<br><br>";
      
$scoreicon "";
  
    } else {
 
      
// retrieve file data
      
$scorei_f fopen($scoreicon"r");
      
$scorei_d addslashes(fread($scorei_ffilesize($scoreicon)));  

    }
  }

  
// only process icons if changes were made
  
if ($kingicon != "") {
  
    
// check for valid extension
    
$extension=strtolower(substr(strrchr($kingicon_name,"."),1));
                   
    if ((
$extension != "gif") and ($extension != "jpg") and ($extension != "jpeg") and ($extension != "png")) {
  
      echo 
"vbProArcade Error: " $kingicon_name " is not a valid file type for icons (only gif/jpg/png are supported)<br><br>";
      
$kingicon "";
  
    } else {
 
      
// retrieve file data
      
$kingi_f fopen($kingicon"r");
      
$kingi_d addslashes(fread($kingi_ffilesize($kingicon)));  

    }
  }

  
$DB_site->query("UPDATE arcadeconfig
                   SET path='
$thepath',usescoreicon='$usescoreicon',usekingicon='$usekingicon'
                       "
.iif(($scoreicon != "") || ($deletescoreicon == 1),",scoreiconname='$scoreicon_name', scoreicondata='$scorei_d'","")."
                       "
.iif(($kingicon != "") || ($deletekingicon == 1),",kingiconname='$kingicon_name', kingicondata='$kingi_d'",", passtimeout='$passtimeout', epergamecost='$epergamecost', earcadepass='$earcadepass', eaph='$eaph', ejackpot='$ejackpot'")."
                   WHERE arcadeid='
$arcadeid'");

  
// update champ system setting separately (saves queries!)
  
$DB_site->query("UPDATE setting SET value='$champsystem' WHERE varname='vpa_champsystem'"); 

//  $DB_site->query("UPDATE template SET template=CONCAT(template,'vpa_champsystem = $champsystem') WHERE title='options'");

  
$optionstemplate=generateoptions();
  
$DB_site->query("UPDATE template SET template='$optionstemplate' WHERE title='options'");

  echo 
"<b>Arcade options updated!</b><br><br>";

  
// go back to change options screen
  
$action "changeoptions";



And I don't mean vB version, I mean arcade version.

mewgood 10-11-2002 02:30 AM

hey
it workd!!!
Thx:D

Link14716 10-11-2002 08:20 PM

Your Welcome. Remember to hit the "Install" buton! ;)

mewgood 10-12-2002 12:17 AM

yep
just did:D

Issy_X 10-31-2002 07:12 PM

This hack is just what I was looking for. I installed it and everything works except for one little thing. And that is that users are gaining the amount of points the have to pay instead of losing them. What did I do wrong. I followed every step exactly.

Link14716 10-31-2002 07:18 PM

How many points do you charge?

Issy_X 10-31-2002 07:20 PM

100 (I changed it to -100 just to see what it would do and it gave the user 5 points for playing a game, very strange)

Link14716 10-31-2002 07:33 PM

It gives the user money from the jackpot using a formula (this is after the game ends).

jackpot/position

So, when the user starts the game, they loose 100 points and that is added to the jackpot. So, if the jackpot is 500, for instance, and the got 2nd place, then they would get half of the jackpot, in this case it'd be 250 points. So they would end up with 150 more points than they had when they started the game.

Deimos 11-08-2002 06:03 AM

I do have one small problem with this hack.
After installing it, I lose user's usernames on every thread?
Um...here's a screenshot of Before and After....

http://www.adam.dresch.btinternet.co.uk/before.JPG

And here's after....

http://www.adam.dresch.btinternet.co.uk/after.JPG

Link14716 11-08-2002 09:24 PM

That is not related to my hack. My hack does not touch anything that deals with usenames. It is possible that the store hack part messed up. Make sure all store hack templates and all edits have been made correctly to functions.php (for the store). :)

tpearl5 11-18-2002 04:44 AM

Is there a way to make the jackpot value increase when a person with a pass plays a game? If everyone has a pass then they'll be no jackpot.

Kars10 11-20-2002 10:01 AM

Sorry Link, but this addon do not work for me. Please have a look at my Proarcade.
If a user is loggedin, unregistered or without a pass...he gets the Arcade-Playon template,...whats the error with it?
If i go to my Database and look at the usertable, all looks ok. I am the only user with a pass and this is written in my field arcadepass-field: 1037613669....
Please help.... :(

Kars10 11-21-2002 07:19 AM

^bumb^

Link14716 11-21-2002 10:24 AM

Quote:

Originally posted by tpearl5
Is there a way to make the jackpot value increase when a person with a pass plays a game? If everyone has a pass then they'll be no jackpot.
When someone with a pass plays a game, the jackpot is increased *after* the game is over. This is to stop people from hitting the link into the game over and over and over...

Link14716 11-21-2002 10:36 AM

Quote:

Originally posted by Minifreunde
^bumb^
I don't see anything wrong with your proarcade.php. Make sure that you ran all of the queries correctly, and check the options you set in the admin CP.

Kars10 11-21-2002 01:00 PM

I promise i run all Querys, ive done all File-edits and all seems fine. But this won?t work for me.
If i looged in, it always tells me "youve got a arcade-pass-play on!" For me this is right, but all other Members and Guests are without a pass, and they get the same message.
If i go to admin-panel and say: Jackpot off, its off. If i say Games per costing, the cost-cell is not there. What can the Problem be?
Is it the store 2 Version??
Im going crazy...:(

tpearl5 11-21-2002 01:31 PM

Quote:

Originally posted by Link14716

When someone with a pass plays a game, the jackpot is increased *after* the game is over. This is to stop people from hitting the link into the game over and over and over...

Humm... it didn't seem to be doing that for me. I'll have to test it further.

Kars10 11-23-2002 05:59 PM

It works now Link!!!
Sorry, ... it was a mistake i made :( ;)

[high]* Minifreunde klicks install![/high]

Link14716 11-23-2002 06:22 PM

Quote:

Originally posted by Minifreunde
It works now Link!!!
Sorry, ... it was a mistake i made :( ;)

* Minifreunde klicks install!

Glad to hear that it works now. :)

And thanks for confirming that this is compatible with Store v2! :)

ad_uk6565 12-01-2002 05:41 AM

<a href="http://www.nintendofire.com/forums/store.php?" target="_blank">http://www.nintendofire.com/forums/store.php?</a>

can someone click on that, and go to arcade pass and tell me why the heck it links to 'action=arcadepass' when that don't work, and it should be 'action=arcadepassadd'...? and how the heck do I change this?

ad_uk6565 12-01-2002 06:09 AM

damn link, your hack's screwed everything up on my forums..let me go back and do it again *sigh*

The_Wanderer 12-12-2002 05:43 PM

hmmm... this might be of use...

bensonfactor 12-18-2002 08:00 PM

I installed it but some of the users who bought a pass get this message:
"You do not have permission to access this page. This could be due to one of several reasons:
You do not have permission to access the page that you were trying to. Are you trying to edit someone else's post or trying to access administrative features? Check that you are allowed to perform this action in the Forum Rules.
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation. "

Any way I can fix this?

Link14716 12-19-2002 07:55 PM

I'd need more information to help you with that.

What page does the error appear on?
Before buying a pass, did they get that message?

Automated 12-22-2002 05:16 PM

What a great hack it stops people registering and not posting!

[high]* Automated click install :p[/high]

apokphp 12-30-2002 05:43 PM

Benson, that is probably a conflict w/ vbProarcade, not the pass. Do you have custom usergroups in vb? If so, you have to change the switch in proarcade.php. You'll see what I mean near the top of the file...it will list all usergroups that can access the arcade.

Just add the custom usergroups to the list via copy/pasting the code lines.

Link: The hack works w/ exception of the Jackpot for me. It gives the player the FULL jackpot regardless of how they do in the game or their rank.

What could be the cause of this?

As I said earlier, it appears all else is ok. I'm still having my members test it out though. :)

ethics 01-27-2003 11:33 PM

I have a weird problem.

In the instructions, it says to:

PHP Code:

-+-+-+
Find:
-+-+-+

$DB_site->query("UPDATE arcadeconfig
                   SET path='
$thepath',usescoreicon='$usescoreicon',usekingicon='$usekingicon'
                       "
.iif(($scoreicon != "") || ($deletescoreicon == 1),",scoreiconname='$scoreicon_name', scoreicondata='$scorei_d'","")."
                       "
.iif(($kingicon != "") || ($deletekingicon == 1),",kingiconname='$kingicon_name', kingicondata='$kingi_d'","")."
                   WHERE arcadeid='
$arcadeid'"); 

The only instance of "$DB_site->query("UPDATE arcadeconfig" I get in that file is the following:

PHP Code:

$DB_site->query("UPDATE arcadeconfig
                   SET active='
$active',path='$thepath'
                       "
.iif(($addgroup != 0) or ($delgroup != 0),",useraccess='$useraccess'","")."
                       ,usescoreicons='
$usescoreicons',usekingicon='$usekingicon',usedetailicons='$usedetailicons'
                       "
.iif(($scoreicondata != "") || ($deletescoreicon == 1),",scoreiconname='$scoreicon_name', scoreicondata='$scoreicondata'","")."
                       "
.iif(($topscoreicondata != "") || ($deletetopscoreicon == 1),",topscoreiconname='$topscoreicon_name', topscoreicondata='$topscoreicondata'","")."
                       "
.iif(($kingicondata != "") || ($deletekingicon == 1),",kingiconname='$kingicon_name', kingicondata='$kingicondata'","")."
                       "
.iif(($userdetailicondata != "") || ($deleteuserdetailicon == 1),",userdetailiconname='$userdetailicon_name', userdetailicondata='$userdetailicondata'","")."
                       "
.iif(($gamedetailicondata != "") || ($deletegamedetailicon == 1),",gamedetailiconname='$gamedetailicon_name', gamedetailicondata='$gamedetailicondata'","")."
                   WHERE arcadeid='
$arcadeid'"); 

It's totally different.

I think this is why I get an SQL error when I try to change the dollar amount to play the game?

This is the error I get:

Database error in vBulletin Control Panel 2.2.8:

Invalid SQL: UPDATE arcadegames
SET name='breakout', title='Breakout', description='A simple Arkanoid-style game -- see how many balls you can keep going at once!', filename='breakout.swf',

active='1', scorevar='$breakoutscore', width='', height='',
codebase='', querystring='', objectparam='',
embedparam='',championactive='1',championtext='Bre akout Champion',championcolor='#ff0000',playcost='50',ja ckpot='20',jackpotadd='5'
WHERE gameid='2'
mysql error: Unknown column 'width' in 'field list'

mysql error number: 1054

Link14716 01-27-2003 11:37 PM

What Arcade version? I think this only works with Beta 1.03 right now...

ethics 01-27-2003 11:39 PM

Quote:

Originally posted by Link14716
What Arcade version? I think this only works with Beta 1.03 right now...
It's whatever your first post of this hack points to. Beta 2 I believe?

If that's the discrepancy, then I can see where the problem comes in.

Any date on the beta 2 integration?

ethics 01-28-2003 12:52 AM

Actually, the hack works, 95% of the way. What I did was use db queries to change the options I needed. :)

DarkDraco07 01-28-2003 02:23 AM

how come when people play snake it give them gil even though they dont get 1st

Link14716 01-28-2003 02:34 AM

It gives people a piece of the jackpot no matter what position they get. If they get 2nd, they get 1/2 of the jackpot, if they get third they get 1/3, fourth 1/4, and so on...

DarkDraco07 01-28-2003 02:57 AM

anyway to stop that?

Link14716 01-28-2003 03:02 AM

Untested but it should work...

Proarcade.php
Find:
PHP Code:

    if ($position == 1) {
    
$jackpotgiven_u=$DB_site->query("UPDATE user SET storep=storep+$jackpotgiven_j[jackpot] WHERE userid='$bbuserinfo[userid]'");
    } else {
    
$jackpotgiven_u=$DB_site->query("UPDATE user SET storep=storep+$jackpotgiven_us WHERE userid='$bbuserinfo[userid]'");
    }
    
$jackpotgiven_r=$DB_site->query("UPDATE arcadegames SET jackpot=jackpot-$jackpotgiven_us WHERE name='$game'"); 

Replace With:
PHP Code:

    if ($position == 1) {
    
$jackpotgiven_u=$DB_site->query("UPDATE user SET storep=storep+$jackpotgiven_j[jackpot] WHERE userid='$bbuserinfo[userid]'");
    
$jackpotgiven_r=$DB_site->query("UPDATE arcadegames SET jackpot='0' WHERE name='$game'");
    } 



All times are GMT. The time now is 04:17 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.01682 seconds
  • Memory Usage 1,902KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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