Results 1 to 2 of 2

Thread: Game Code Editing

  1. #1
    Dom~'s Avatar
    Joined
    Jun 2012
    Posts
    1,336
    Userbars
    12
    Thanks
    1,519
    Thanked
    545/352
    DL/UL
    108/0
    Mentioned
    369 times
    Time Online
    49d 8h 40m
    Avg. Time Online
    16m

    Game Code Editing

    So I have been playing a game, and wanted to mod it, online game though, so I downloaded it and opened it up, decompiled it, and found the slots script which dictates which slots you have open.
    I was wondering if anyone could change the script around so all slots are open?
    Code:
    package org.osflash.signals
    {
       public final class SlotList extends Object
       {
          
          public function SlotList(param1:ISlot, param2:SlotList = null)
          {
             super();
             if(!param1 && !param2)
             {
                if(NIL)
                {
                   throw new ArgumentError("Parameters head and tail are null. Use the NIL element instead.");
                }
                else
                {
                   this.nonEmpty = false;
                }
             }
             else if(!param1)
             {
                throw new ArgumentError("Parameter head cannot be null.");
             }
             else
             {
                this.head = param1;
                this.tail = param2 || NIL;
                this.nonEmpty = true;
             }
             
          }
          
          public static const NIL:SlotList = new SlotList(null,null);
          
          public var head:ISlot;
          
          public var tail:SlotList;
          
          public var nonEmpty:Boolean = false;
          
          public function get length() : uint
          {
             if(!this.nonEmpty)
             {
                return 0;
             }
             if(this.tail == NIL)
             {
                return 1;
             }
             var _loc1_:uint = 0;
             var _loc2_:SlotList = this;
             while(_loc2_.nonEmpty)
             {
                _loc1_++;
                _loc2_ = _loc2_.tail;
             }
             return _loc1_;
          }
          
          public function prepend(param1:ISlot) : SlotList
          {
             return new SlotList(param1,this);
          }
          
          public function append(param1:ISlot) : SlotList
          {
             if(!param1)
             {
                return this;
             }
             if(!this.nonEmpty)
             {
                return new SlotList(param1);
             }
             if(this.tail == NIL)
             {
                return new SlotList(param1).prepend(this.head);
             }
             var _loc2_:SlotList = new SlotList(this.head);
             var _loc3_:SlotList = _loc2_;
             var _loc4_:SlotList = this.tail;
             while(_loc4_.nonEmpty)
             {
                _loc3_ = _loc3_.tail = new SlotList(_loc4_.head);
                _loc4_ = _loc4_.tail;
             }
             _loc3_.tail = new SlotList(param1);
             return _loc2_;
          }
          
          public function insertWithPriority(param1:ISlot) : SlotList
          {
             var _loc6_:SlotList = null;
             if(!this.nonEmpty)
             {
                return new SlotList(param1);
             }
             var _loc2_:int = param1.priority;
             if(_loc2_ > this.head.priority)
             {
                return this.prepend(param1);
             }
             var _loc3_:SlotList = new SlotList(this.head);
             var _loc4_:SlotList = _loc3_;
             var _loc5_:SlotList = this.tail;
             while(_loc5_.nonEmpty)
             {
                if(_loc2_ > _loc5_.head.priority)
                {
                   _loc6_ = _loc5_.prepend(param1);
                   return new SlotList(this.head,_loc6_);
                }
                _loc4_ = _loc4_.tail = new SlotList(_loc5_.head);
                _loc5_ = _loc5_.tail;
             }
             _loc4_.tail = new SlotList(param1);
             return _loc3_;
          }
          
          public function filterNot(param1:Function) : SlotList
          {
             if(!this.nonEmpty || param1 == null)
             {
                return this;
             }
             if(param1 == this.head.listener)
             {
                return this.tail;
             }
             var _loc2_:SlotList = new SlotList(this.head);
             var _loc3_:SlotList = _loc2_;
             var _loc4_:SlotList = this.tail;
             while(_loc4_.nonEmpty)
             {
                if(_loc4_.head.listener == param1)
                {
                   _loc3_.tail = _loc4_.tail;
                   return _loc2_;
                }
                _loc3_ = _loc3_.tail = new SlotList(_loc4_.head);
                _loc4_ = _loc4_.tail;
             }
             return this;
          }
          
          public function contains(param1:Function) : Boolean
          {
             if(!this.nonEmpty)
             {
                return false;
             }
             var _loc2_:SlotList = this;
             while(_loc2_.nonEmpty)
             {
                if(_loc2_.head.listener == param1)
                {
                   return true;
                }
                _loc2_ = _loc2_.tail;
             }
             return false;
          }
          
          public function find(param1:Function) : ISlot
          {
             if(!this.nonEmpty)
             {
                return null;
             }
             var _loc2_:SlotList = this;
             while(_loc2_.nonEmpty)
             {
                if(_loc2_.head.listener == param1)
                {
                   return _loc2_.head;
                }
                _loc2_ = _loc2_.tail;
             }
             return null;
          }
          
          public function toString() : String
          {
             var _loc1_:String = "";
             var _loc2_:SlotList = this;
             while(_loc2_.nonEmpty)
             {
                _loc1_ = _loc1_ + (_loc2_.head + " -> ");
                _loc2_ = _loc2_.tail;
             }
             _loc1_ = _loc1_ + "NIL";
             return "[List " + _loc1_ + "]";
          }
       }
    }
    [11:06 PN] domenick: you cant fix stupid
    [11:06 PM] andrew: unfortunately not lol

  2. #2

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m
    Only way to do this is bytehacking , we used to do it in unreal engine games for e.g say we have this code

    if (lives == 0)
    gameover()

    in uscript:
    if = 07 in hex
    ( = B1 in hex
    lives would be a varible so lets say for e.g the export table says the value is 255 , then he hex is FF
    == is 75 in hex


    so we now search for 07B1FF75 and change this so the == becomes < so change B1 to B3

    Aobing works on same princible look into that i think its easier but you get the idea

  3. The Following User Says Thank You to DarkByte For This Useful Post:

    Zachafer (07-30-2015)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •