dimanche 31 mai 2015

Editing a Sprite variable in a SWF With C#

so i am trying to develop a trainer for a game silly i know but none the less i want to know how to edit a sprite variable with in the Action script of the game through a button and a text

// Action script...

// [Initial MovieClip Action of sprite 2248]
#initclip 12
class gameData
{
    var PLAYERID, PLAYERNAME, LASTMODIFIED, DIFFICULTY, CLEVEL, MONEY, AMMO_TOTAL, POINTS;
    function gameData(_PLAYERNAME)
    {
        var _loc2 = new Date();
        PLAYERID = String(_loc2.getTime());
        PLAYERID = PLAYERID + String(Math.round(Math.random() * 99999));
        PLAYERNAME = _PLAYERNAME;
        LASTMODIFIED = new Date();
        DIFFICULTY = 1;
        CLEVEL = 1;
        MONEY = 0;
        AMMO_TOTAL = [60000, 0, 0, 0, 0, 0];
        POINTS = 0;
    } // End of the function
    static function saveGame(_GAME)
    {
        _global.CGAME.LASTMODIFIED = new Date();
        gameData.saveGames(_global.GAMES);
    } // End of the function
    static function saveGames(_GAMES)
    {
        var _loc1 = SharedObject.getLocal(gameData.GAMEID);
        _loc1.data.GAMES = _GAMES;
        _loc1.flush();
    } // End of the function
    static function newGame(_NAME, _DIFFICULTY)
    {
        var _loc1 = SharedObject.getLocal(gameData.GAMEID);
        var _loc2 = _loc1.data.GAMES;
        if (_loc2 == undefined)
        {
            _loc1.data.GAMES = new Array();
        } // end if
        var _loc3 = new gameData(_name, _DIFFICULTY, _loc2.length);
        _loc1.data.GAMES.push(_loc3);
        _loc1.flush();
    } // End of the function
    static function deleteGame(_INDEX)
    {
        var _loc1 = SharedObject.getLocal(gameData.GAMEID);
        var _loc2 = _loc1.data.GAMES;
        if (_INDEX < 0)
        {
            return;
        } // end if
        if (_INDEX > _loc2.length - 1)
        {
            return;
        } // end if
        _loc2.splice(_INDEX, 1);
        _loc1.flush();
    } // End of the function
    static function getGames()
    {
        var _loc1 = SharedObject.getLocal(gameData.GAMEID);
        var _loc2 = _loc1.data.GAMES;
        if (_loc2 == undefined)
        {
            _loc1.data.GAMES = [];
            _loc1.flush();
        } // end if
        return (_loc1.data.GAMES);
    } // End of the function
    static var GAMEID = "qigames_13DaysNightmare_12";
} // End of Class
#endinitclip

that is the action script sprite i want to edit specifically

var _loc2 = new Date();
        PLAYERID = String(_loc2.getTime());
        PLAYERID = PLAYERID + String(Math.round(Math.random() * 99999));
        PLAYERNAME = _PLAYERNAME;
        LASTMODIFIED = new Date();
        DIFFICULTY = 1;
        CLEVEL = 1;
        MONEY = 0;
        AMMO_TOTAL = [60000, 0, 0, 0, 0, 0];
        POINTS = 0;

i decompiled the swf and can edit the main root or the MainMovie with a button and a text box but i cant seem to figure out of to change the values in the sprite

    ![this is how i edit root variables
  }
Game.SetVariable("_root.EXamplevar", textbox1.Text); 
  {][2]

please help sorry if what i explained was confusing

Aucun commentaire:

Enregistrer un commentaire