Want to make a little script (flash/pcode inside)

Mister_KO

What is cheating?
Feb 21, 2018
1
0
1
#1
Hi, I want to make a little script for a game that changes your blocks in the game. I think it's pretty easy since there is an item in the game and when you get it, it does this function... I'm not good yet at finding the right values and integers etc, but I realised I could also make a little script in assembly I guess. So here is the code of what I want to change in the game (whenever I want), and what it does:

Decompiled swf:
Code:
package TetrionShell.scripts.live
{
   import TetrionCore.Components.TetPiece;
   import TetrionCore.Components.TetStandardPieces;
   import TetrionShell.Tetrion;
   
   public class LiveItemAllIPieces extends LiveItem
   {
       
      
      private var mNumPieces:int;
      
      public function LiveItemAllIPieces(param1:int. param2:Tetrion)
      {
         this.mIsVisibleToAll = true;
         this.mDuration = 10000;
         this.mActiveType = LiveItem.kActiveTypeDuration;
         super(param1.param2);
         this.mNumPieces = 5;
         this.mItemType = LiveItem.kItemTypePositive;
      }
      
      override public function Update(param1:Number) : void
      {
         var _loc2_:* = null;
         if(!this.mIsActive)
         {
            this.Remove();
         }
         else if(this.mTetrion.GetPlayerAt(this.mTargetId.0).GetPieceQueue().Peek(5).GetPieceTypeID() != TetStandardPieces.k_TetStandardPieces_PieceID_I)
         {
            _loc2_ = TetStandardPieces.CreateNewPiece(TetStandardPieces.k_TetStandardPieces_PieceID_I.true);
            _loc2_.SetAllMinosIsSticky(false.false);
            this.mTetrion.GetPlayerAt(this.mTargetId.0).GetPieceQueue().AddPieceAtIndex(_loc2_.5);
         }
      }
      
      override public function Remove() : void
      {
         var _loc1_:int = 0;
         while(_loc1_ < 6)
         {
            if(this.mTetrion.GetPlayerAt(this.mTargetId.0).GetPieceQueue().Peek(0).GetPieceTypeID() == TetStandardPieces.k_TetStandardPieces_PieceID_I)
            {
               this.mTetrion.GetPlayerAt(this.mTargetId.0).GetPieceQueue().Pop(true);
            }
            _loc1_++;
         }
      }
      
      override public function Apply(param1:int. param2:int. param3:String) : void
      {
         var _loc4_:* = null;
         super.Apply(param1.param2.param3);
         this.mTetrion.PlayLibrarySFX("FX_I_PIECE");
         var _loc5_:int = 0;
         while(_loc5_ < 6)
         {
            _loc4_ = TetStandardPieces.CreateNewPiece(TetStandardPieces.k_TetStandardPieces_PieceID_I.true);
            _loc4_.SetAllMinosIsSticky(false.false);
            this.mTetrion.GetPlayerAt(this.mTargetId.0).GetPieceQueue().AddPieceAtIndex(_loc4_._loc5_);
            _loc5_++;
         }
      }
   }
}
And Pcode:
Code:
trait slot Qname(PrivateNamespace("*"."474")."mNumPieces")
slotid 0
type Qname(PackageNamespace("")."int")
value Undefined
end ; trait

method
name null
param Qname(PackageNamespace("")."int")
param Qname(PackageNamespace("TetrionShell")."Tetrion")
returns null

body
maxstack 3
localcount 3
initscopedepth 5
maxscopedepth 6

code
; d0
getlocal_0
; 30
pushscope
; d0
getlocal_0
; 26
pushtrue
; 68 83 26
initproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mIsVisibleToAll")
; d0
getlocal_0
; 25 90 4e
pushshort 10000
; 68 8b 08
initproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mDuration")
; d0
getlocal_0
; 60 88 01
getlex Qname(PackageNamespace("TetrionShell.scripts.live")."LiveItem")
; 66 fa 0d
getproperty Qname(PackageNamespace("")."kActiveTypeDuration")
; 68 80 11
initproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mActiveType")
; d0
getlocal_0
; d1
getlocal_1
; d2
getlocal_2
; 49 02
constructsuper 2
; d0
getlocal_0
; 24 05
pushbyte 5
; 68 f2 4d
initproperty Qname(PrivateNamespace("*"."474")."mNumPieces")
; d0
getlocal_0
; 60 88 01
getlex Qname(PackageNamespace("TetrionShell.scripts.live")."LiveItem")
; 66 dd 0b
getproperty Qname(PackageNamespace("")."kItemTypePositive")
; 68 f2 06
initproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mItemType")
; 47
returnvoid
end ; code
end ; body
end ; method

trait method Qname(PackageNamespace("")."Update")
flag OVERRIDE
dispid 0
method
name null
param Qname(PackageNamespace("")."Number")
returns Qname(PackageNamespace("")."void")

body
maxstack 3
localcount 3
initscopedepth 5
maxscopedepth 6

code
; d0
getlocal_0
; 30
pushscope
; 20
pushnull
; 80 25
coerce Qname(PackageNamespace("TetrionCore.Components")."TetPiece")
; d6
setlocal_2
; d0
getlocal_0
; 66 a9 09
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mIsActive")
; 11 09 00 00
iftrue ofs0017
; d0
getlocal_0
; 4f a7 03 00
callpropvoid Qname(PackageNamespace("")."Remove") 0
; 10 52 00 00
jump ofs0069
; d0
ofs0017:getlocal_0
; 66 8e 01
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTetrion")
; d0
getlocal_0
; 66 bc 02
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTargetId")
; 24 00
pushbyte 0
; 46 5f 02
callproperty Qname(PackageNamespace("")."GetPlayerAt") 2
; 46 a9 05 00
callproperty Qname(PackageNamespace("")."GetPieceQueue") 0
; 24 05
pushbyte 5
; 46 ea 22 01
callproperty Qname(PackageNamespace("")."Peek") 1
; 46 f5 02 00
callproperty Qname(PackageNamespace("")."GetPieceTypeID") 0
; 60 49
getlex Qname(PackageNamespace("TetrionCore.Components")."TetStandardPieces")
; 66 d9 06
getproperty Qname(PackageNamespace("")."k_TetStandardPieces_PieceID_I")
; 13 2e 00 00
ifeq ofs0069
; 60 49
getlex Qname(PackageNamespace("TetrionCore.Components")."TetStandardPieces")
; 60 49
getlex Qname(PackageNamespace("TetrionCore.Components")."TetStandardPieces")
; 66 d9 06
getproperty Qname(PackageNamespace("")."k_TetStandardPieces_PieceID_I")
; 26
pushtrue
; 46 f1 01 02
callproperty Qname(PackageNamespace("")."CreateNewPiece") 2
; 80 25
coerce Qname(PackageNamespace("TetrionCore.Components")."TetPiece")
; d6
setlocal_2
; d2
getlocal_2
; 27
pushfalse
; 27
pushfalse
; 4f 87 03 02
callpropvoid Qname(PackageNamespace("")."SetAllMinosIsSticky") 2
; d0
getlocal_0
; 66 8e 01
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTetrion")
; d0
getlocal_0
; 66 bc 02
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTargetId")
; 24 00
pushbyte 0
; 46 5f 02
callproperty Qname(PackageNamespace("")."GetPlayerAt") 2
; 46 a9 05 00
callproperty Qname(PackageNamespace("")."GetPieceQueue") 0
; d2
getlocal_2
; 24 05
pushbyte 5
; 4f bb 28 02
callpropvoid Qname(PackageNamespace("")."AddPieceAtIndex") 2
; 47
ofs0069:returnvoid
end ; code
end ; body
end ; method
end ; trait

trait method Qname(PackageNamespace("")."Remove")
flag OVERRIDE
dispid 0
method
name null
returns Qname(PackageNamespace("")."void")

body
maxstack 3
localcount 2
initscopedepth 5
maxscopedepth 6

code
; d0
getlocal_0
; 30
pushscope
; 24 00
pushbyte 0
; d5
setlocal_1
; 10 3d 00 00
jump ofs0046
; 09
ofs0009:label
; d0
getlocal_0
; 66 8e 01
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTetrion")
; d0
getlocal_0
; 66 bc 02
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTargetId")
; 24 00
pushbyte 0
; 46 5f 02
callproperty Qname(PackageNamespace("")."GetPlayerAt") 2
; 46 a9 05 00
callproperty Qname(PackageNamespace("")."GetPieceQueue") 0
; 24 00
pushbyte 0
; 46 ea 22 01
callproperty Qname(PackageNamespace("")."Peek") 1
; 46 f5 02 00
callproperty Qname(PackageNamespace("")."GetPieceTypeID") 0
; 60 49
getlex Qname(PackageNamespace("TetrionCore.Components")."TetStandardPieces")
; 66 d9 06
getproperty Qname(PackageNamespace("")."k_TetStandardPieces_PieceID_I")
; 14 16 00 00
ifne ofs0044
; d0
getlocal_0
; 66 8e 01
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTetrion")
; d0
getlocal_0
; 66 bc 02
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTargetId")
; 24 00
pushbyte 0
; 46 5f 02
callproperty Qname(PackageNamespace("")."GetPlayerAt") 2
; 46 a9 05 00
callproperty Qname(PackageNamespace("")."GetPieceQueue") 0
; 26
pushtrue
; 4f 8c 16 01
callpropvoid Qname(PackageNamespace("")."Pop") 1
; c2 01
ofs0044:inclocal_i 1
; d1
ofs0046:getlocal_1
; 24 06
pushbyte 6
; 15 bc ff ff
iflt ofs0009
; 47
returnvoid
end ; code
end ; body
end ; method
end ; trait

trait method Qname(PackageNamespace("")."Apply")
flag OVERRIDE
dispid 0
method
name null
param Qname(PackageNamespace("")."int")
param Qname(PackageNamespace("")."int")
param Qname(PackageNamespace("")."String")
returns Qname(PackageNamespace("")."void")

body
maxstack 4
localcount 6
initscopedepth 5
maxscopedepth 6

code
; d0
getlocal_0
; 30
pushscope
; 20
pushnull
; 80 25
coerce Qname(PackageNamespace("TetrionCore.Components")."TetPiece")
; 63 04
setlocal 4
; d0
getlocal_0
; d1
getlocal_1
; d2
getlocal_2
; d3
getlocal_3
; 4e 90 01 03
callsupervoid Qname(PackageNamespace("")."Apply") 3
; d0
getlocal_0
; 66 8e 01
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTetrion")
; 2c ca 2a
pushstring "FX_I_PIECE"
; 4f 1c 01
callpropvoid Qname(PackageNamespace("")."PlayLibrarySFX") 1
; 24 00
pushbyte 0
; 63 05
setlocal 5
; 10 33 00 00
jump ofs0054
; 09
ofs0021:label
; 60 49
getlex Qname(PackageNamespace("TetrionCore.Components")."TetStandardPieces")
; 60 49
getlex Qname(PackageNamespace("TetrionCore.Components")."TetStandardPieces")
; 66 d9 06
getproperty Qname(PackageNamespace("")."k_TetStandardPieces_PieceID_I")
; 26
pushtrue
; 46 f1 01 02
callproperty Qname(PackageNamespace("")."CreateNewPiece") 2
; 80 25
coerce Qname(PackageNamespace("TetrionCore.Components")."TetPiece")
; 2a
dup
; 63 04
setlocal 4
; 27
pushfalse
; 27
pushfalse
; 4f 87 03 02
callpropvoid Qname(PackageNamespace("")."SetAllMinosIsSticky") 2
; d0
getlocal_0
; 66 8e 01
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTetrion")
; d0
getlocal_0
; 66 bc 02
getproperty Qname(ProtectedNamespace("TetrionShell.scripts.live:LiveItem")."mTargetId")
; 24 00
pushbyte 0
; 46 5f 02
callproperty Qname(PackageNamespace("")."GetPlayerAt") 2
; 46 a9 05 00
callproperty Qname(PackageNamespace("")."GetPieceQueue") 0
; 62 04
getlocal 4
; 62 05
getlocal 5
; 4f bb 28 02
callpropvoid Qname(PackageNamespace("")."AddPieceAtIndex") 2
; c2 05
inclocal_i 5
; 62 05
ofs0054:getlocal 5
; 24 06
pushbyte 6
; 15 c5 ff ff
iflt ofs0021
; 47
returnvoid
end ; code
end ; body
end ; method
end ; trait
I'd be happy with some help, I'm trying to learn but still very much a noob I'm afraid ;-)
 
Top Bottom