View Single Post
  #620  
Old 04-13-2003, 11:04 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tutorial: How to modify games

For those of you who want to modify games but aren't sure how to get started here's a little tutorial to help you out.

The first thing you'll need to do is find the score variable. You could just search through the code in the .fla and find it yourself, but this is how I do it.

I use a program called flash tool set which can be downloaded here: Flash Tool Set

Open the .swf file with F.T.S. and look up at the top toolbar.. Click the "aB" text icon.

Screenshot 1

You'll see a list of variables used within the game.. Most of the time it will list the score variable.. For this particular game you can see that the score variable is gScore.

Screenshot 2


Now that you know the score variable, open the game's .fla file with Flash MX.

Up at the top (center frame) you'll see the actions layer. Find the "game over" section of that layer (usually at or close to the end) and click it.

Screenshot 3

Now look just below the frame that shows the images and you'll see the contents. Up at the top right hand corner click the little list icon and select "expert mode" (see screenshot below).

Screenshot 4

Then insert the vbproarcade code in the text area.

Screenshot 5

In the top lefthand corner click file and then save. Now click file again and select "export movie".. It will then export your modified .fla as a .swf file. Upload it and test to make sure it works.

Some games aren't as easy so you might have to experiment a little.

On games that don't end by themselves (such as roulette), you'll have to add a "submit score" button.

Just go to the layer where you want the button to appear, then look up at the top and click window + common libraries + buttons. Choose the button that you want then left click on it and drag it to the scene. Once you have it in the scene just paste this code into the text area for the action:

Code for buttons

Code:
on (release) {
	// set up vars to return
vpaver = "100B2";
scorevariable = score;
action = "gameover";
game = gamename;
score_loc = location + "/proarcade.php";

// this needs to match the Admin CP value
// and should be between 0 and 31
hashoffset = 5;

// do security shuffle to return newhash
subhash1 = gamehash.substr(0,hashoffset);
subhash2 = gamehash.substr(hashoffset);
newhash = subhash2.concat(subhash1);

// redirect back to vbProArcade
getURL (score_loc, "_self", "POST");
}
Then you can add some text like "save score" on the button.. Don't forget to change the score variable to match the one in the game.

Hopefully this is helpful to some of you guys. I figure if more people know how to modify the games we'll have a lot more games to choose from.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01693 seconds
  • Memory Usage 1,777KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete