Neopets system includes: Difference between revisions

From Computers Wiki
Jump to navigationJump to search
(→‎BIOS: Found the circuit background)
(→‎NP6: Start figuring out NeoStatus)
Line 38: Line 38:
== NP6 ==
== NP6 ==


This file is set to SWF version 6 (Flash 6).
This file is set to SWF version 6 (Flash 6). This analysis was done with the v7 version.


=== Reporting cheaters ===
=== Reporting cheaters ===
Line 47: Line 47:


gameMsg is similar, except that " - old call -" is appended to "append" before anything happens, and the game then opens http://www.neopets.com/games/cheatmonster.phtml in a new window.
gameMsg is similar, except that " - old call -" is appended to "append" before anything happens, and the game then opens http://www.neopets.com/games/cheatmonster.phtml in a new window.

=== Dictionary support ===

This is in the same object and frame, but DoAction [7].

It loads "http://www.neopets.com/games/utilities/flash_dictionary/flash_dictionary_en_vVERSION.swf", where VERSION is the value of _level0.game_dict_ver. While live site games using NP8 use dict version 62, I can't find any versions for this URL from v7 anymore. However, the dictionary can check if something is a word, a bad word, dictionary word, and/or Neopian word. Words can also be scrambled and selected randomly.

=== NeoStatus ===

These URLs are hit:

* NEOSTATUS_URL = http://www.neopets.com/neostatus.phtml
* PROCESS_URL = http://www.neopets.com/process_click.phtml

There is an idea of events, which have a tag name, status code, and offset. When creating an event, a base_multiple is also needed. This sets "multiple" to <code>base_multiple * 2</code> and "active" to <code>random(offset) + 1 == 1</code>.

{| class="wikitable"
! Tag Name !! Status Code !! Offset
|-
| Game Started || 900 || 1
|-
| Multiplayer Game Started 1 || 901 || 1
|-
| Multiplayer Game Started 2 || 902 || 1
|-
| Multiplayer Game Started 3 || 903 || 1
|-
| Multiplayer Game Started 4 || 904 || 1
|-
| Game Finished || 1000 || 1
|-
| Sent Score || 1001 || 1
|-
| Reached Level ''n (where 1 <= n <= 100)'' || 7000 + n || 10
|-
| Sponsor Item Shown || 8010 || 30
|-
| Sponsor Logo Shown || 8020 || 10
|-
| Sponsor Item Collected || 8030 || 30
|-
| Sponsor Banner Shown || 8040 || 30
|}


== NP8 ==
== NP8 ==

Revision as of 04:37, 18 May 2023

The Neopets system includes are a set of Flash SWFs that are included and used by the Flash games.

This page is going to suck until I better understand Flash development and reverse engineering.

Old versions

The promotional disc[1] has the following old versions of the system includes:

  • /system/bios.swf, 6441 bytes, modified 2007-06-04
  • /system/np6_include_v7.swf, 49408 bytes, modified 2007-03-06
  • /system/np8_include_v7.swf, 54949 bytes, modified 2007-03-06

BIOS

This file is set to SWF version 6 (Flash 6 minimum). Based on my not-good understanding of ActionScript, it appears to do the following things:

On frame 1

  • Check how the BIOS is loaded
    • Check if String(this) == "_level0"; if so, trace "Bios: Error, load this externally!" and stop the movie
    • Check if String(this).split(".")[0] == "_level0"; if not, set a local flag to false, which appears to change some sort of progress meter display slightly and set a translation string path to use non-local paths
    • Else, set the local flag to true and set a separate offline flag to 1
  • Set up the loading fade-in effect for the "NEO*BIOS 330-MEGA" chip
  • Wait for itself to finish loading
  • If the local flag is true, open system/np6_include_v7.swf onto the target "_level100" and wait for it to finish loading
  • Play this movie's parent's parent

On the "bios" sprite

  • If the parent is _level0, print "BIOS must be loaded by another file!" and stop the movie
  • copyInProps, which seems to copy the properties of the BIOS child of either _level10 (if loaded) (not 100) or _level0 (if _level10 not loaded) onto this object
  • addProtoCode, which seems to change Object.toString to be a serialization system like {key1:value1,key2:{k3:v3,k4:v4}}, but with a new line for each level, and adjustable indentation for each level
  • If fully loaded, make the parent invisible, and finish
  • If not fully loaded, load "http://images.neopets.com/games/high_scores/include_movie.swf" onto the target _level100 and wait for it to finish loading

Other notes

The circuit background appears to actually be stored in the game resources instead of in the BIOS movie itself.

NP6

This file is set to SWF version 6 (Flash 6). This analysis was done with the v7 version.

Reporting cheaters

This is in DefineSprite (51) -> frame 1 (wait) -> DoAction.

There are two mechanisms, called gameMsg and msg. They take two parameters: index and append. They create a "body" string of the format "game_id - game_filename - game_username", then append "append" if it isn't undefined. This is then POSTed to "http://www.neopets.com/games/dgs/dgs_protocol.phtml?id=index&subject=game_id&body=body" in obfuscated fashion, and the variables from the response loaded to _level0.

gameMsg is similar, except that " - old call -" is appended to "append" before anything happens, and the game then opens http://www.neopets.com/games/cheatmonster.phtml in a new window.

Dictionary support

This is in the same object and frame, but DoAction [7].

It loads "http://www.neopets.com/games/utilities/flash_dictionary/flash_dictionary_en_vVERSION.swf", where VERSION is the value of _level0.game_dict_ver. While live site games using NP8 use dict version 62, I can't find any versions for this URL from v7 anymore. However, the dictionary can check if something is a word, a bad word, dictionary word, and/or Neopian word. Words can also be scrambled and selected randomly.

NeoStatus

These URLs are hit:

There is an idea of events, which have a tag name, status code, and offset. When creating an event, a base_multiple is also needed. This sets "multiple" to base_multiple * 2 and "active" to random(offset) + 1 == 1.

Tag Name Status Code Offset
Game Started 900 1
Multiplayer Game Started 1 901 1
Multiplayer Game Started 2 902 1
Multiplayer Game Started 3 903 1
Multiplayer Game Started 4 904 1
Game Finished 1000 1
Sent Score 1001 1
Reached Level n (where 1 <= n <= 100) 7000 + n 10
Sponsor Item Shown 8010 30
Sponsor Logo Shown 8020 10
Sponsor Item Collected 8030 30
Sponsor Banner Shown 8040 30

NP8

This file is set to SWF version 8 (Flash 8).

References