Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk

    Thumbs up [FSoD] Map Scaling || Fullscreen || DevilRotMG

    Hello, you are welcome.

    First contribution, many more to come in future.


    Just realised something. In my code, the kabam . r o is replaced by ****. Please just change this. It should be kabam . r o tmg (Rotmg is 1 word. No space between kabam and the . after it, no space between . and the rotmg after it). Here is example: h t t p s : / / p a s t e b i n . c o m / e L 7 J u 5 G v

    Go to: com/company/assembleegameclient/map/Camera.as


    Replace with:

     
    Code:
    package com.company.assembleegameclient.map {
    import com.company.assembleegameclient.objects.GameObject;
    import com.company.assembleegameclient.parameters.Parameters;
    import com.company.assembleegameclient.util.RandomUtil;
    
    import flash.geom.Matrix3D;
    import flash.geom.PerspectiveProjection;
    import flash.geom.Rectangle;
    import flash.geom.Vector3D;
    
    public class Camera {
    
        public static const lN_:Vector3D = new Vector3D(0, 0, 1);
        public static const CENTER_SCREEN_RECT:Rectangle = new Rectangle(-300, -325, 600, 600);
        public static const OFFSET_SCREEN_RECT:Rectangle = new Rectangle(-300, -450, 600, 600);
        private static const SCREENSHOT_SCREEN_RECT:Rectangle = new Rectangle(-400, -325, 800, 600);
        private static const SLIM_SCREENSHOT_SCREEN_RECT:Rectangle = new Rectangle(-400, -275, 800, 500);
    
        private const MAX_JITTER:Number = 0.5;
        private const JITTER_BUILDUP_MS:int = 10000;
    
        public var x_:Number;
        public var y_:Number;
        public var z_:Number;
        public var angleRad_:Number;
        public var clipRect_:Rectangle;
        public var pp_:PerspectiveProjection;
        public var maxDist_:Number;
        public var maxDistSq_:Number;
        public var isHallucinating_:Boolean = false;
        public var wToS_:Matrix3D;
        public var wToV_:Matrix3D;
        public var vToS_:Matrix3D;
        private var nonPPMatrix_:Matrix3D;
        private var p_:Vector3D;
        private var f_:Vector3D;
        private var u_:Vector3D;
        private var r_:Vector3D;
        private var isJittering_:Boolean = false;
        private var jitter_:Number = 0;
        private var rd_:Vector.<Number>;
    
        public function Camera() {
            this.pp_ = new PerspectiveProjection();
            this.wToS_ = new Matrix3D();
            this.wToV_ = new Matrix3D();
            this.vToS_ = new Matrix3D();
            this.nonPPMatrix_ = new Matrix3D();
            this.p_ = new Vector3D();
            this.f_ = new Vector3D();
            this.u_ = new Vector3D();
            this.r_ = new Vector3D();
            this.rd_ = new Vector.<Number>(16, true);
            super();
            this.pp_.focalLength = 3;
            this.pp_.fieldOfView = 48;
            this.nonPPMatrix_.appendScale(50, 50, 50);
            this.f_.x = 0;
            this.f_.y = 0;
            this.f_.z = -1;
        }
    
        public function configureCamera(_arg1:GameObject, _arg2:Boolean):void {
            var playerRect:Rectangle = ((Parameters.data_.centerOnPlayer) ? CENTER_SCREEN_RECT : OFFSET_SCREEN_RECT);
            var clipRect:Rectangle = playerRect.clone();
            if(Parameters.data_.fullscreenMod) {
                clipRect.x = -(Parameters.data_.mscale * 50 * (1 / 2));
                clipRect.y = -(Parameters.data_.mscale * 50 * (clipRect.y / -600));
                clipRect.width = Parameters.data_.mscale * 50;
                clipRect.height = Parameters.data_.mscale * 50;
            }
            if (Parameters.screenShotMode_) {
                if (!Parameters.screenShotSlimMode_) {
                    clipRect = SCREENSHOT_SCREEN_RECT;
                }
                else {
                    clipRect = SLIM_SCREENSHOT_SCREEN_RECT;
                }
            }
            var _local4:Number = Parameters.data_.cameraAngle;
            this.configure(_arg1.x_, _arg1.y_, 12, _local4, clipRect);
            this.isHallucinating_ = _arg2;
        }
    
        public function startJitter():void {
            this.isJittering_ = true;
            this.jitter_ = 0;
        }
    
        public function update(_arg_1:Number):void {
            if (((this.isJittering_) && ((this.jitter_ < this.MAX_JITTER)))) {
                this.jitter_ = (this.jitter_ + ((_arg_1 * this.MAX_JITTER) / this.JITTER_BUILDUP_MS));
                if (this.jitter_ > this.MAX_JITTER) {
                    this.jitter_ = this.MAX_JITTER;
                }
            }
        }
    
        public function configure(_arg_1:Number, _arg_2:Number, _arg_3:Number, _arg_4:Number, _arg_5:Rectangle):void {
            if (this.isJittering_) {
                _arg_1 = (_arg_1 + RandomUtil.plusMinus(this.jitter_));
                _arg_2 = (_arg_2 + RandomUtil.plusMinus(this.jitter_));
            }
            this.x_ = _arg_1;
            this.y_ = _arg_2;
            this.z_ = _arg_3;
            this.angleRad_ = _arg_4;
            this.clipRect_ = _arg_5;
            this.p_.x = _arg_1;
            this.p_.y = _arg_2;
            this.p_.z = _arg_3;
            this.r_.x = Math.cos(this.angleRad_);
            this.r_.y = Math.sin(this.angleRad_);
            this.r_.z = 0;
            this.u_.x = Math.cos((this.angleRad_ + (Math.PI / 2)));
            this.u_.y = Math.sin((this.angleRad_ + (Math.PI / 2)));
            this.u_.z = 0;
            this.rd_[0] = this.r_.x;
            this.rd_[1] = this.u_.x;
            this.rd_[2] = this.f_.x;
            this.rd_[3] = 0;
            this.rd_[4] = this.r_.y;
            this.rd_[5] = this.u_.y;
            this.rd_[6] = this.f_.y;
            this.rd_[7] = 0;
            this.rd_[8] = this.r_.z;
            this.rd_[9] = -1;
            this.rd_[10] = this.f_.z;
            this.rd_[11] = 0;
            this.rd_[12] = -(this.p_.dotProduct(this.r_));
            this.rd_[13] = -(this.p_.dotProduct(this.u_));
            this.rd_[14] = -(this.p_.dotProduct(this.f_));
            this.rd_[15] = 1;
            this.wToV_.rawData = this.rd_;
            this.vToS_ = this.nonPPMatrix_;
            this.wToS_.identity();
            this.wToS_.append(this.wToV_);
            this.wToS_.append(this.vToS_);
            var _local_6:Number = (this.clipRect_.width / (2 * 50));
            var _local_7:Number = (this.clipRect_.height / (2 * 50));
            this.maxDist_ = (Math.sqrt(((_local_6 * _local_6) + (_local_7 * _local_7))) + 1);
            this.maxDistSq_ = (this.maxDist_ * this.maxDist_);
        }
    
    
    }
    }//package com.company.assembleegameclient.map


    Go to: com/company/assembleegameclient/map/Map.as


    Replace with:

     
    Code:
    // Decompiled by AS3 Sorcerer 1.40
    // https://www.as3sorcerer.com/
    
    //com.company.assembleegameclient.map.Map
    
    package com.company.assembleegameclient.map{
    import flash.filters.ColorMatrixFilter;
    import flash.display.BitmapData;
    import kabam****tmg.game.logging****llingMeanLoopMonitor;
    import com.company.assembleegameclient.objects.BasicObject;
    import flash.utils.Dictionary;
    import flash.display.IGraphicsData;
    import kabam****tmg.stage3D.Object3D.Object3DStage3D;
    import com.company.assembleegameclient.map.mapoverlay.MapOverlay;
    import com.company.assembleegameclient.map.partyoverlay.PartyOverlay;
    import com.company.assembleegameclient.objects.Party;
    import kabam****tmg.core.StaticInjectorContext;
    import kabam****tmg.game.model.GameModel;
    import com.company.assembleegameclient.parameters.Parameters;
    import com.company.assembleegameclient.game.AGameSprite;
    import com.company.assembleegameclient.background.Background;
    import com.company.assembleegameclient.objects.GameObject;
    import kabam****tmg.stage3D.graphic3D.TextureFactory;
    import kabam****tmg.stage3D.GraphicsFillExtra;
    import kabam****tmg.stage3D.graphic3D.Program3DFactory;
    import flash.geom.Point;
    import com.company.assembleegameclient.objects.particles.ParticleEffect;
    import flash.display3D.Context3D;
    import kabam****tmg.stage3D.Render3D;
    import flash.geom.Rectangle;
    import kabam****tmg.stage3D.Renderer;
    import flash.display.GraphicsBitmapFill;
    import flash.display.GraphicsSolidFill;
    import com.company.assembleegameclient.util.ConditionEffect;
    import flash.filters.BlurFilter;
    
    public class Map extends AbstractMap {
    
        public static const CLOTH_BAZAAR:String = "Cloth Bazaar";
        public static const NEXUS:String = "Nexus";
        public static const DAILY_QUEST_ROOM:String = "Daily Quest Room";
        public static const PET_YARD_1:String = "Pet Yard";
        public static const PET_YARD_2:String = "Pet Yard 2";
        public static const PET_YARD_3:String = "Pet Yard 3";
        public static const PET_YARD_4:String = "Pet Yard 4";
        public static const PET_YARD_5:String = "Pet Yard 5";
        public static const GUILD_HALL:String = "Guild Hall";
        public static const NEXUS_EXPLANATION:String = "Nexus_Explanation";
        public static const VAULT:String = "Vault";
        private static const VISIBLE_SORT_FIELDS:Array = ["sortVal_", "objectId_"];
        private static const VISIBLE_SORT_PARAMS:Array = [Array.NUMERIC, Array.NUMERIC];
        protected static const BLIND_FILTER:ColorMatrixFilter = new ColorMatrixFilter([0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 1, 0]);
    
        public static var forceSoftwareRender:Boolean = false;
        public static var texture:BitmapData;
    
        public var ifDrawEffectFlag:Boolean = true;
        public var isBackground:Boolean;
        private var loopMonitor:RollingMeanLoopMonitor;
        private var inUpdate_:Boolean = false;
        private var objsToAdd_:Vector.<BasicObject>;
        private var idsToRemove_:Vector.<int>;
        private var forceSoftwareMap:Dictionary;
        private var lastSoftwareClear:Boolean = false;
        private var graphicsData_:Vector.<IGraphicsData>;
        private var graphicsDataStageSoftware_:Vector.<IGraphicsData>;
        private var graphicsData3d_:Vector.<Object3DStage3D>;
        public var visible_:Array;
        public var visibleUnder_:Array;
        public var visibleSquares_:Vector.<Square>;
        public var visibleHit_:Array;
        public var topSquares_:Vector.<Square>;
    
        public function Map(_arg1:AGameSprite, _arg2:Boolean=false){
            this.isBackground = _arg2;
            this.objsToAdd_ = new Vector.<BasicObject>();
            thi*****sToRemove_ = new Vector.<int>();
            this.forceSoftwareMap = new Dictionary();
            this.graphicsData_ = new Vector.<IGraphicsData>();
            this.graphicsDataStageSoftware_ = new Vector.<IGraphicsData>();
            this.graphicsData3d_ = new Vector.<Object3DStage3D>();
            this.visible_ = [];
            this.visibleUnder_ = [];
            this.visibleSquares_ = new Vector.<Square>();
            this.visibleHit_ = [];
            this.topSquares_ = new Vector.<Square>();
            super();
            gs_ = _arg1;
            mapOverlay_ = new MapOverlay();
            partyOverlay_ = new PartyOverlay(this);
            party_ = new Party(this);
            quest_ = new Quest(this);
            this.loopMonitor = StaticInjectorContext.getInjector().getInstance(RollingMeanLoopMonitor);
            StaticInjectorContext.getInjector().getInstance(GameModel).gameObjects = goDict_;
            this.forceSoftwareMap[PET_YARD_1] = true;
            this.forceSoftwareMap[PET_YARD_2] = true;
            this.forceSoftwareMap[PET_YARD_3] = true;
            this.forceSoftwareMap[PET_YARD_4] = true;
            this.forceSoftwareMap[PET_YARD_5] = true;
            this.forceSoftwareMap["Nexus"] = true;
            this.forceSoftwareMap["Tomb of the Ancients"] = true;
            this.forceSoftwareMap["Tomb of the Ancients (Heroic)"] = true;
            this.forceSoftwareMap["Mad Lab"] = true;
            this.forceSoftwareMap["Guild Hall"] = true;
            this.forceSoftwareMap["Guild Hall 2"] = true;
            this.forceSoftwareMap["Guild Hall 3"] = true;
            this.forceSoftwareMap["Guild Hall 4"] = true;
            this.forceSoftwareMap["Cloth Bazaar"] = true;
            wasLastFrameGpu = Parameters.isGpuRender();
        }
        override public function setProps(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:Boolean, _arg6:Boolean):void{
            width_ = _arg1;
            height_ = _arg2;
            name_ = _arg3;
            back_ = _arg4;
            allowPlayerTeleport_ = _arg5;
            showDisplays_ = _arg6;
            this.forceSoftwareRenderCheck(name_);
        }
        private function forceSoftwareRenderCheck(_arg1:String):void{
            forceSoftwareRender = ((!((this.forceSoftwareMap[_arg1] == null))) || ((WebMain.STAGE.stage3Ds[0].context3D == null)));
        }
        override public function initialize():void{
            squares_.length = (width_ * height_);
            background_ = Background.getBackground(back_);
            if (background_ != null){
                addChild(background_);
            };
            addChild(map_);
            addChild(mapOverlay_);
            addChild(partyOverlay_);
            isPetYard = (name_.substr(0, 8) == "Pet Yard");
        }
        override public function dispose():void{
            var _local1:Square;
            var _local2:GameObject;
            var _local3:BasicObject;
            gs_ = null;
            background_ = null;
            map_ = null;
            mapOverlay_ = null;
            partyOverlay_ = null;
            for each (_local1 in squareList_) {
                _local1.dispose();
            };
            squareList_.length = 0;
            squareList_ = null;
            squares_.length = 0;
            squares_ = null;
            for each (_local2 in goDict_) {
                _local2.dispose();
            };
            goDict_ = null;
            for each (_local3 in boDict_) {
                _local3.dispose();
            };
            boDict_ = null;
            merchLookup_ = null;
            player_ = null;
            party_ = null;
            quest_ = null;
            this.objsToAdd_ = null;
            thi*****sToRemove_ = null;
            TextureFactory.disposeTextures();
            GraphicsFillExtra.dispose();
            Program3DFactory.getInstance().dispose();
        }
        override public function update(_arg1:int, _arg2:int):void{
            var _local3:BasicObject;
            var _local4:int;
            this.inUpdate_ = true;
            for each (_local3 in goDict_) {
                if (!_local3.update(_arg1, _arg2)){
                    thi*****sToRemove_.push(_local3.objectId_);
                };
            };
            for each (_local3 in boDict_) {
                if (!_local3.update(_arg1, _arg2)){
                    thi*****sToRemove_.push(_local3.objectId_);
                };
            };
            this.inUpdate_ = false;
            for each (_local3 in this.objsToAdd_) {
                this.internalAddObj(_local3);
            };
            this.objsToAdd_.length = 0;
            for each (_local4 in thi*****sToRemove_) {
                this.internalRemoveObj(_local4);
            };
            thi*****sToRemove_.length = 0;
            party_.update(_arg1, _arg2);
        }
        override public function pSTopW(_arg1:Number, _arg2:Number):Point{
            var _local3:Square;
            for each (_local3 in this.visibleSquares_) {
                if (((!((_local3.faces_.length == 0))) && (_local3.faces_[0].face_.contains(_arg1, _arg2)))){
                    return (new Point(_local3.center_.x, _local3.center_.y));
                };
            };
            return (null);
        }
        override public function setGroundTile(_arg1:int, _arg2:int, _arg3:uint):void{
            var _local4:int;
            var _local5:int;
            var _local6:Square;
            var _local7:Square = this.getSquare(_arg1, _arg2);
            _local7.setTileType(_arg3);
            var _local8:int = (((_arg1 < (width_ - 1))) ? (_arg1 + 1) : _arg1);
            var _local9:int = (((_arg2 < (height_ - 1))) ? (_arg2 + 1) : _arg2);
            var _local10:int = (((_arg1 > 0)) ? (_arg1 - 1) : _arg1);
            while (_local10 <= _local8) {
                _local4 = (((_arg2 > 0)) ? (_arg2 - 1) : _arg2);
                while (_local4 <= _local9) {
                    _local5 = (_local10 + (_local4 * width_));
                    _local6 = squares_[_local5];
                    if (((!((_local6 == null))) && (((_local6.props_.hasEdge_) || (!((_local6.tileType_ == _arg3))))))){
                        _local6.faces_.length = 0;
                    };
                    _local4++;
                };
                _local10++;
            };
        }
        override public function addObj(_arg1:BasicObject, _arg2:Number, _arg3:Number):void{
            _arg1.x_ = _arg2;
            _arg1.y_ = _arg3;
            if ((_arg1 is ParticleEffect)){
                (_arg1 as ParticleEffect).reducedDrawEnabled = !(Parameters.data_.particleEffect);
            };
            if (this.inUpdate_){
                this.objsToAdd_.push(_arg1);
            }
            else {
                this.internalAddObj(_arg1);
            };
        }
        public function internalAddObj(_arg1:BasicObject):void{
            if (!_arg1.addTo(this, _arg1.x_, _arg1.y_)){
                return;
            };
            var _local2:Dictionary = (((_arg1 is GameObject)) ? goDict_ : boDict_);
            if (_local2[_arg1.objectId_] != null){
                if (!isPetYard){
                    return;
                };
            };
            _local2[_arg1.objectId_] = _arg1;
        }
        override public function removeObj(_arg1:int):void{
            if (this.inUpdate_){
                thi*****sToRemove_.push(_arg1);
            }
            else {
                this.internalRemoveObj(_arg1);
            };
        }
        public function internalRemoveObj(_arg1:int):void{
            var _local2:Dictionary = goDict_;
            var _local3:BasicObject = _local2[_arg1];
            if (_local3 == null){
                _local2 = boDict_;
                _local3 = _local2[_arg1];
                if (_local3 == null){
                    return;
                };
            };
            _local3.removeFromMap();
            delete _local2[_arg1];
        }
        public function getSquare(_arg1:Number, _arg2:Number):Square{
            if ((((((((_arg1 < 0)) || ((_arg1 >= width_)))) || ((_arg2 < 0)))) || ((_arg2 >= height_)))){
                return (null);
            };
            var _local3:int = (int(_arg1) + (int(_arg2) * width_));
            var _local4:Square = squares_[_local3];
            if (_local4 == null){
                _local4 = new Square(this, int(_arg1), int(_arg2));
                squares_[_local3] = _local4;
                squareList_.push(_local4);
            };
            return (_local4);
        }
        public function lookupSquare(_arg1:int, _arg2:int):Square{
            if ((((((((_arg1 < 0)) || ((_arg1 >= width_)))) || ((_arg2 < 0)))) || ((_arg2 >= height_)))){
                return (null);
            };
            return (squares_[(_arg1 + (_arg2 * width_))]);
        }
        override public function draw(_arg1:Camera, _arg2:int):void{
            var _local11:Square;
            var _local12:int;
            var _local13:GameObject;
            var _local14:BasicObject;
            var _local15:Context3D;
            var _local16:int;
            var _local17:Number;
            var _local18:Number;
            var _local19:Number;
            var _local20:uint;
            var _local21:Render3D;
            var _local22:Array;
            var _local23:Number;
            if (wasLastFrameGpu != Parameters.isGpuRender()){
                _local15 = WebMain.STAGE.stage3Ds[0].context3D;
                if ((((((wasLastFrameGpu == true)) && (!((_local15 == null))))) && ((_local15.driverInfo.toLowerCase().indexOf("disposed") == -1)))){
                    _local15.clear();
                    _local15.present();
                }
                else {
                    map_.graphics.clear();
                };
                signalRenderSwitch.dispatch(wasLastFrameGpu);
                wasLastFrameGpu = Parameters.isGpuRender();
            };
            var _local3:Rectangle = _arg1.clipRect_;
            if (((Parameters.data_.fullscreenMod) && (!(this.isBackground)))){
                this.scaleX = (600 / (Parameters.data_.mscale * 50));
                this.scaleY = (600 / (Parameters.data_.mscale * 50));
                x = ((-(_local3.x) * 600) / (Parameters.data_.mscale * 50));
                y = ((-(_local3.y) * 600) / (Parameters.data_.mscale * 50));
            }
            else {
                this.scaleX = (this.scaleY = 1);
                x = -(_local3.x);
                y = -(_local3.y);
            };
            var _local4:Number = ((-(_local3.y) - (_local3.height / 2)) / 50);
            var _local5:Point = new Point((_arg1.x_ + (_local4 * Math.cos((_arg1.angleRad_ - (Math.PI / 2))))), (_arg1.y_ + (_local4 * Math.sin((_arg1.angleRad_ - (Math.PI / 2))))));
            if (background_ != null){
                background_.draw(_arg1, _arg2);
            };
            this.visible_.length = 0;
            this.visibleUnder_.length = 0;
            this.visibleSquares_.length = 0;
            this.visibleHit_.length = 0;
            this.topSquares_.length = 0;
            var _local6:int = _arg1.maxDist_;
            var _local7:int = Math.max(0, (_local5.x - _local6));
            var _local8:int = Math.min((width_ - 1), (_local5.x + _local6));
            var _local9:int = Math.max(0, (_local5.y - _local6));
            var _local10:int = Math.min((height_ - 1), (_local5.y + _local6));
            this.graphicsData_.length = 0;
            this.graphicsDataStageSoftware_.length = 0;
            this.graphicsData3d_.length = 0;
            _local12 = _local7;
            while (_local12 <= _local8) {
                _local16 = _local9;
                while (_local16 <= _local10) {
                    _local11 = squares_[(_local12 + (_local16 * width_))];
                    if (_local11 != null){
                        _local17 = (_local5.x - _local11.center_.x);
                        _local18 = (_local5.y - _local11.center_.y);
                        _local19 = ((_local17 * _local17) + (_local18 * _local18));
                        if (_local19 <= _arg1.maxDistSq_){
                            _local11.lastVisible_ = _arg2;
                            _local11.draw(this.graphicsData_, _arg1, _arg2);
                            this.visibleSquares_.push(_local11);
                            if (_local11.topFace_ != null){
                                this.topSquares_.push(_local11);
                            };
                        };
                    };
                    _local16++;
                };
                _local12++;
            };
            for each (_local13 in goDict_) {
                _local13.drawn_ = false;
                if (!_local13.dead_){
                    _local11 = _local13.square_;
                    if (((!((_local11 == null))) && ((_local11.lastVisible_ == _arg2)))){
                        _local13.drawn_ = true;
                        _local13.computeSortVal(_arg1);
                        if (!(_local13 is ParticleEffect)){
                            this.visibleHit_.push(_local13);
                        };
                        if (_local13.props_.drawUnder_){
                            if (_local13.props_.drawOnGround_){
                                _local13.draw(this.graphicsData_, _arg1, _arg2);
                            };
                            this.visibleUnder_.push(_local13);
                        }
                        else {
                            this.visible_.push(_local13);
                        };
                    };
                };
            };
            for each (_local14 in boDict_) {
                _local14.drawn_ = false;
                _local11 = _local14.square_;
                if (((!((_local11 == null))) && ((_local11.lastVisible_ == _arg2)))){
                    _local14.drawn_ = true;
                    _local14.computeSortVal(_arg1);
                    this.visible_.push(_local14);
                };
            };
            if (this.visibleUnder_.length > 0){
                this.visibleUnder_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
                for each (_local14 in this.visibleUnder_) {
                    if (!(((_local14 is GameObject)) && ((_local14 as GameObject).props_.drawOnGround_))){
                        _local14.draw(this.graphicsData_, _arg1, _arg2);
                    };
                };
            };
            this.visible_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
            if (Parameters.data_.drawShadows){
                for each (_local14 in this.visible_) {
                    if (_local14.hasShadow_){
                        _local14.drawShadow(this.graphicsData_, _arg1, _arg2);
                    };
                };
            };
            for each (_local14 in this.visible_) {
                _local14.draw(this.graphicsData_, _arg1, _arg2);
                if (Parameters.isGpuRender()){
                    _local14.draw3d(this.graphicsData3d_);
                };
            };
            if (this.topSquares_.length > 0){
                for each (_local11 in this.topSquares_) {
                    _local11.drawTop(this.graphicsData_, _arg1, _arg2);
                };
            };
            if (((Parameters.isGpuRender()) && (Renderer.inGame))){
                _local20 = this.getFilterIndex();
                _local21 = StaticInjectorContext.getInjector().getInstance(Render3D);
                _local21.dispatch(this.graphicsData_, this.graphicsData3d_, width_, height_, _arg1, _local20);
                _local12 = 0;
                while (_local12 < this.graphicsData_.length) {
                    if ((((this.graphicsData_[_local12] is GraphicsBitmapFill)) && (GraphicsFillExtra.isSoftwareDraw(GraphicsBitmapFill(this.graphicsData_[_local12]))))){
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[_local12]);
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local12 + 1)]);
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local12 + 2)]);
                    }
                    else {
                        if ((((this.graphicsData_[_local12] is GraphicsSolidFill)) && (GraphicsFillExtra.isSoftwareDrawSolid(GraphicsSolidFill(this.graphicsData_[_local12]))))){
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[_local12]);
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local12 + 1)]);
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local12 + 2)]);
                        };
                    };
                    _local12++;
                };
                if (this.graphicsDataStageSoftware_.length > 0){
                    map_.graphics.clear();
                    map_.graphics.drawGraphicsData(this.graphicsDataStageSoftware_);
                    if (this.lastSoftwareClear){
                        this.lastSoftwareClear = false;
                    };
                }
                else {
                    if (!this.lastSoftwareClear){
                        map_.graphics.clear();
                        this.lastSoftwareClear = true;
                    };
                };
                if ((_arg2 % 149) == 0){
                    GraphicsFillExtra.manageSize();
                };
            }
            else {
                map_.graphics.clear();
                map_.graphics.drawGraphicsData(this.graphicsData_);
            };
            map_.filters.length = 0;
            if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))){
                _local22 = [];
                if (player_.isDrunk()){
                    _local23 = (20 + (10 * Math.sin((_arg2 / 1000))));
                    _local22.push(new BlurFilter(_local23, _local23));
                };
                if (player_.isBlind()){
                    _local22.push(BLIND_FILTER);
                };
                map_.filters = _local22;
            }
            else {
                if (map_.filters.length > 0){
                    map_.filters = [];
                };
            };
            mapOverlay_.draw(_arg1, _arg2);
            partyOverlay_.draw(_arg1, _arg2);
        }
        private function getFilterIndex():uint{
            var _local1:uint;
            if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))){
                if (player_.isPaused()){
                    _local1 = Renderer.STAGE3D_FILTER_PAUSE;
                }
                else {
                    if (player_.isBlind()){
                        _local1 = Renderer.STAGE3D_FILTER_BLIND;
                    }
                    else {
                        if (player_.isDrunk()){
                            _local1 = Renderer.STAGE3D_FILTER_DRUNK;
                        };
                    };
                };
            };
            return (_local1);
        }
    
    }
    }//package com.company.assembleegameclient.map


    Go to: com/company/assembleegameclient/parameters/Parameters.as


    Replace with:

    Under: public static function setDefaults():void {

     
    Code:
    setDefault("mscale", 1.2);


    Go to: com/company/assembleegameclient/ui/options/Options.as


    Replace with:

    Under: private function addGraphicsOptions():void {

     
    Code:
    this.addOptionAndPosition(new ChoiceOption("fullscreenMod", makeOnOffLabels(),[true, false], "Enable Fullscreen Mod", "/mscale <value>", null));


    Go to: kabam/rotmg/chat/control/ParseChatMessageCommand.as


    Replace with:

     
    Code:
    // Decompiled by AS3 Sorcerer 1.40
    // https://www.as3sorcerer.com/
    
    //kabam****tmg.cha*****ntrol.ParseChatMessageCommand
    
    package kabam****tmg.cha*****ntrol{
    import kabam****tmg.ui.model.HUDModel;
    import kabam****tmg.game.signals.AddTextLineSignal;
    import kabam****tmg.chat.model.ChatMessage;
    import com.company.assembleegameclient.parameters.Parameters;
    import kabam****tmg.text.model.TextKey;
    
    public class ParseChatMessageCommand {
    
        [Inject]
        public var data:String;
        [Inject]
        public var hudModel:HUDModel;
        [Inject]
        public var addTextLine:AddTextLineSignal;
    
        public function execute():void{
            var _local1:Array;
            var _local2:Number;
            var _local3:Number;
            if (this.data.charAt(0) == "/"){
                _local1 = this.data.substr(1, this.data.length).split(" ");
                switch (_local1[0]){
                    case "help":
                        this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME, TextKey.HELP_COMMAND));
                        return;
                    case "mscale":
                        if (_local1.length > 1){
                            _local2 = Number(_local1[1]);
                            if ((((_local2 >= 1)) && ((_local2 <= 3)))){
                                _local3 = (_local2 * 10);
                                Parameters.data_.mscale = _local3;
                                Parameters.save();
                                this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME, ("Map scale: " + _local2)));
                            }
                            else {
                                this.addTextLine.dispatch(ChatMessage.make(Parameters.SERVER_CHAT_NAME, "Map scale only accept values between 1.0 to 3.0."));
                            };
                        }
                        else {
                            this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME, ("Map scale: " + (Parameters.data_.mscale / 10))));
                        };
                        return;
                };
            };
            this.hudModel.gameSprite.gsc_.playerText(this.data);
        }
    
    }
    }//package kabam****tmg.cha*****ntrol


    Make sure this is with fresh AS3 source so it won't mess up your current stuff. If yours is edited, take only the code you need (should know what to take and what to leave out).

    Please say down below if works

    - - - Updated - - -

  2. The Following 2 Users Say Thank You to DevilRotMG For This Useful Post:

    FlashFlyyy (06-29-2018),Szopen (06-09-2018)

  3. #2
    Szopen's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    Thanks so much!! Very clear tutorial, everything works good!

  4. The Following User Says Thank You to Szopen For This Useful Post:

    DevilRotMG (06-12-2018)

  5. #3
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Quote Originally Posted by Szopen View Post
    Thanks so much!! Very clear tutorial, everything works good!
    No problem kind man. I appreciate feedback!

  6. #4
    smallpig1's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    3
    My Mood
    Bashful
    Also, I had this problem with RollingMeanLoopMonitor... it says:

    import kabam****tmg.game.logging***llingMeanLoopMonitor;

    Just copy and paste

    import kabam. r o t m g .game.logging. R o l lingMeanLoopMonitor;

    (Map.cs line 9)

    Without the spaces^xd
    Last edited by smallpig1; 06-13-2018 at 07:22 PM. Reason: It ***** out what I wanted to say

  7. #5
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Quote Originally Posted by smallpig1 View Post
    Also, I had this problem with RollingMeanLoopMonitor... it says:

    import kabam****tmg.game.logging***llingMeanLoopMonitor;

    Just copy and paste

    import kabam. r o t m g .game.logging. R o l lingMeanLoopMonitor;

    (Map.cs line 9)

    Without the spaces^xd
    Wait, so does it work?

  8. #6
    smallpig1's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    3
    My Mood
    Bashful
    Yep, works perfectly fine. Just one thing that bugs me... The outline for most items gets bugged if used on cakes domain and probably fsod too.

    Thanks though.

    Also, question... What did you mean by 'fullscreen' in title? I tried to make it go fullscreen and it's still stretched.

    **Edit**

    Just found multiple bugs... Enemies health bars aren't under the enemy when your mscale is higher than 1.

    instead of this v
    >enemy<

    >healthbar<

    it's this v
    >enemy<

    ------>healthbar<

    Also...... when mscale 1 it renders less than regular so while walking around you see the tiles rendering... idk how to explain it's weird... Got D i s c o r d?
    Last edited by smallpig1; 06-13-2018 at 08:42 PM. Reason: noticed something

  9. #7
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Quote Originally Posted by smallpig1 View Post
    Yep, works perfectly fine. Just one thing that bugs me... The outline for most items gets bugged if used on cakes domain and probably fsod too.

    Thanks though.

    Also, question... What did you mean by 'fullscreen' in title? I tried to make it go fullscreen and it's still stretched.

    **Edit**

    Just found multiple bugs... Enemies health bars aren't under the enemy when your mscale is higher than 1.

    instead of this v
    >enemy<

    >healthbar<

    it's this v
    >enemy<

    ------>healthbar<

    Also...... when mscale 1 it renders less than regular so while walking around you see the tiles rendering... idk how to explain it's weird... Got D i s c o r d?
    I don't use *******. Also, I don't get those bugs when I try testing mine. Are you sure you follow exactly as me? Fullscreen as in you can do /mscale 3 and it will be like fullscreen effect (or any /mscale).

  10. #8
    smallpig1's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    3
    My Mood
    Bashful
    This might not work with cakes then? While testing mine it had all the bugs i mentioned but I used cakes to test it on.

  11. #9
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Quote Originally Posted by smallpig1 View Post
    This might not work with cakes then? While testing mine it had all the bugs i mentioned but I used cakes to test it on.
    This is nothing server-sided, so why it matter what source you using? Its all client source, so idk what you doing. Check your hardware acceleration, and make sure you are using Intellij Idea to decompile the client when you make the changes, don't try to export the files with ffdec then save them, won't work.

  12. #10
    kgcgods's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    13
    My Mood
    Bored
    Well im on cakes and it worked perfectly for me.

  13. #11
    Stone2405's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Posts
    117
    Reputation
    10
    Thanks
    9
    My Mood
    Amused
    public function Map(_arg1:AGameSprite, _arg2:Boolean=false){ in Map.as when im building with IntelliJ says AGameSprite is error: type was not found or was not compile-time constant: AGameSprite

  14. #12
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Quote Originally Posted by Stone2405 View Post
    public function Map(_arg1:AGameSprite, _arg2:Boolean=false){ in Map.as when im building with IntelliJ says AGameSprite is error: type was not found or was not compile-time constant: AGameSprite
    Check if you have this line at the top of your code:

    Code:
    import com.company.assembleegameclient.game.AGameSprite;
    If you do, just paste your map.as and I will look into it.

  15. #13
    Stone2405's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Posts
    117
    Reputation
    10
    Thanks
    9
    My Mood
    Amused
    Quote Originally Posted by DevilRotMG View Post
    Check if you have this line at the top of your code:

    Code:
    import com.company.assembleegameclient.game.AGameSprite;
    If you do, just paste your map.as and I will look into it.
    Yes, i have that at top of code.
    Map.as
    // Decompiled by AS3 Sorcerer 1.40
    // https://www.as3sorcerer.com/

    //com.company.assembleegameclient.map.Map

    package com.company.assembleegameclient.map{
    import flash.filters.ColorMatrixFilter;
    import flash.display.BitmapData;
    import kabam****tmg.game.logging****llingMeanLoopMonitor;
    import com.company.assembleegameclient.objects.BasicObjec t;
    import flash.utils.Dictionary;
    import flash.display.IGraphicsData;
    import kabam****tmg.stage3D.Object3D.Object3DStage3D;
    import com.company.assembleegameclient.map.mapoverlay.Map Overlay;
    import com.company.assembleegameclient.map.partyoverlay.P artyOverlay;
    import com.company.assembleegameclient.objects.Party;
    import kabam****tmg.core.StaticInjectorContext;
    import kabam****tmg.game.model.GameModel;
    import com.company.assembleegameclient.parameters.Paramet ers;
    import com.company.assembleegameclient.game.AGameSprite;
    import com.company.assembleegameclient.background.Backgro und;
    import com.company.assembleegameclient.objects.GameObject ;
    import kabam****tmg.stage3D.graphic3D.TextureFactory;
    import kabam****tmg.stage3D.GraphicsFillExtra;
    import kabam****tmg.stage3D.graphic3D.Program3DFactory;
    import flash.geom.Point;
    import com.company.assembleegameclient.objects.particles. ParticleEffect;
    import flash.display3D.Context3D;
    import kabam****tmg.stage3D.Render3D;
    import flash.geom.Rectangle;
    import kabam****tmg.stage3D.Renderer;
    import flash.display.GraphicsBitmapFill;
    import flash.display.GraphicsSolidFill;
    import com.company.assembleegameclient.util.ConditionEffe ct;
    import flash.filters.BlurFilter;

    public class Map extends AbstractMap {

    public static const CLOTH_BAZAAR:String = "Cloth Bazaar";
    public static const NEXUS:String = "Nexus";
    public static const DAILY_QUEST_ROOM:String = "Daily Quest Room";
    public static const PET_YARD_1:String = "Pet Yard";
    public static const PET_YARD_2:String = "Pet Yard 2";
    public static const PET_YARD_3:String = "Pet Yard 3";
    public static const PET_YARD_4:String = "Pet Yard 4";
    public static const PET_YARD_5:String = "Pet Yard 5";
    public static const GUILD_HALL:String = "Guild Hall";
    public static const NEXUS_EXPLANATION:String = "Nexus_Explanation";
    public static const VAULT:String = "Vault";
    private static const VISIBLE_SORT_FIELDS:Array = ["sortVal_", "objectId_"];
    private static const VISIBLE_SORT_PARAMS:Array = [Array.NUMERIC, Array.NUMERIC];
    protected static const BLIND_FILTER:ColorMatrixFilter = new ColorMatrixFilter([0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 1, 0]);

    public static var forceSoftwareRender:Boolean = false;
    public static var texture:BitmapData;

    public var ifDrawEffectFlag:Boolean = true;
    public var isBackground:Boolean;
    private var loopMonitor:RollingMeanLoopMonitor;
    private var inUpdate_:Boolean = false;
    private var objsToAdd_:Vector.<BasicObject>;
    private var idsToRemove_:Vector.<int>;
    private var forceSoftwareMapictionary;
    private var lastSoftwareClear:Boolean = false;
    private var graphicsData_:Vector.<IGraphicsData>;
    private var graphicsDataStageSoftware_:Vector.<IGraphicsData>;
    private var graphicsData3d_:Vector.<Object3DStage3D>;
    public var visible_:Array;
    public var visibleUnder_:Array;
    public var visibleSquares_:Vector.<Square>;
    public var visibleHit_:Array;
    public var topSquares_:Vector.<Square>;

    public function Map(_arg1:AGameSprite, _arg2:Boolean=false){
    this.isBackground = _arg2;
    this.objsToAdd_ = new Vector.<BasicObject>();
    thi*****sToRemove_ = new Vector.<int>();
    this.forceSoftwareMap = new Dictionary();
    this.graphicsData_ = new Vector.<IGraphicsData>();
    this.graphicsDataStageSoftware_ = new Vector.<IGraphicsData>();
    this.graphicsData3d_ = new Vector.<Object3DStage3D>();
    this.visible_ = [];
    this.visibleUnder_ = [];
    this.visibleSquares_ = new Vector.<Square>();
    this.visibleHit_ = [];
    this.topSquares_ = new Vector.<Square>();
    super();
    gs_ = _arg1;
    mapOverlay_ = new MapOverlay();
    partyOverlay_ = new PartyOverlay(this);
    party_ = new Party(this);
    quest_ = new Quest(this);
    this.loopMonitor = StaticInjectorContext.getInjector().getInstance(Ro llingMeanLoopMonitor);
    StaticInjectorContext.getInjector().getInstance(Ga meModel).gameObjects = goDict_;
    this.forceSoftwareMap[PET_YARD_1] = true;
    this.forceSoftwareMap[PET_YARD_2] = true;
    this.forceSoftwareMap[PET_YARD_3] = true;
    this.forceSoftwareMap[PET_YARD_4] = true;
    this.forceSoftwareMap[PET_YARD_5] = true;
    this.forceSoftwareMap["Nexus"] = true;
    this.forceSoftwareMap["Tomb of the Ancients"] = true;
    this.forceSoftwareMap["Tomb of the Ancients (Heroic)"] = true;
    this.forceSoftwareMap["Mad Lab"] = true;
    this.forceSoftwareMap["Guild Hall"] = true;
    this.forceSoftwareMap["Guild Hall 2"] = true;
    this.forceSoftwareMap["Guild Hall 3"] = true;
    this.forceSoftwareMap["Guild Hall 4"] = true;
    this.forceSoftwareMap["Cloth Bazaar"] = true;
    wasLastFrameGpu = Parameters.isGpuRender();
    }
    override public function setProps(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:Boolean, _arg6:Boolean):void{
    width_ = _arg1;
    height_ = _arg2;
    name_ = _arg3;
    back_ = _arg4;
    allowPlayerTeleport_ = _arg5;
    showDisplays_ = _arg6;
    this.forceSoftwareRenderCheck(name_);
    }
    private function forceSoftwareRenderCheck(_arg1:String):void{
    forceSoftwareRender = ((!((this.forceSoftwareMap[_arg1] == null))) || ((WebMain.STAGE.stage3Ds[0].context3D == null)));
    }
    override public function initialize():void{
    squares_.length = (width_ * height_);
    background_ = Background.getBackground(back_);
    if (background_ != null){
    addChild(background_);
    };
    addChild(map_);
    addChild(mapOverlay_);
    addChild(partyOverlay_);
    isPetYard = (name_.substr(0, 8) == "Pet Yard");
    }
    override public function dispose():void{
    var _local1:Square;
    var _local2:GameObject;
    var _local3:BasicObject;
    gs_ = null;
    background_ = null;
    map_ = null;
    mapOverlay_ = null;
    partyOverlay_ = null;
    for each (_local1 in squareList_) {
    _local1.dispose();
    };
    squareList_.length = 0;
    squareList_ = null;
    squares_.length = 0;
    squares_ = null;
    for each (_local2 in goDict_) {
    _local2.dispose();
    };
    goDict_ = null;
    for each (_local3 in boDict_) {
    _local3.dispose();
    };
    boDict_ = null;
    merchLookup_ = null;
    player_ = null;
    party_ = null;
    quest_ = null;
    this.objsToAdd_ = null;
    thi*****sToRemove_ = null;
    TextureFactory.disposeTextures();
    GraphicsFillExtra.dispose();
    Program3DFactory.getInstance().dispose();
    }
    override public function update(_arg1:int, _arg2:int):void{
    var _local3:BasicObject;
    var _local4:int;
    this.inUpdate_ = true;
    for each (_local3 in goDict_) {
    if (!_local3.update(_arg1, _arg2)){
    thi*****sToRemove_.push(_local3.objectId_);
    };
    };
    for each (_local3 in boDict_) {
    if (!_local3.update(_arg1, _arg2)){
    thi*****sToRemove_.push(_local3.objectId_);
    };
    };
    this.inUpdate_ = false;
    for each (_local3 in this.objsToAdd_) {
    this.internalAddObj(_local3);
    };
    this.objsToAdd_.length = 0;
    for each (_local4 in thi*****sToRemove_) {
    this.internalRemoveObj(_local4);
    };
    thi*****sToRemove_.length = 0;
    party_.update(_arg1, _arg2);
    }
    override public function pSTopW(_arg1:Number, _arg2:Number):Point{
    var _local3:Square;
    for each (_local3 in this.visibleSquares_) {
    if (((!((_local3.faces_.length == 0))) && (_local3.faces_[0].face_.contains(_arg1, _arg2)))){
    return (new Point(_local3.center_.x, _local3.center_.y));
    };
    };
    return (null);
    }
    override public function setGroundTile(_arg1:int, _arg2:int, _arg3:uint):void{
    var _local4:int;
    var _local5:int;
    var _local6:Square;
    var _local7:Square = this.getSquare(_arg1, _arg2);
    _local7.setTileType(_arg3);
    var _local8:int = (((_arg1 < (width_ - 1))) ? (_arg1 + 1) : _arg1);
    var _local9:int = (((_arg2 < (height_ - 1))) ? (_arg2 + 1) : _arg2);
    var _local10:int = (((_arg1 > 0)) ? (_arg1 - 1) : _arg1);
    while (_local10 <= _local8) {
    _local4 = (((_arg2 > 0)) ? (_arg2 - 1) : _arg2);
    while (_local4 <= _local9) {
    _local5 = (_local10 + (_local4 * width_));
    _local6 = squares_[_local5];
    if (((!((_local6 == null))) && (((_local6.props_.hasEdge_) || (!((_local6.tileType_ == _arg3))))))){
    _local6.faces_.length = 0;
    };
    _local4++;
    };
    _local10++;
    };
    }
    override public function addObj(_arg1:BasicObject, _arg2:Number, _arg3:Number):void{
    _arg1.x_ = _arg2;
    _arg1.y_ = _arg3;
    if ((_arg1 is ParticleEffect)){
    (_arg1 as ParticleEffect).reducedDrawEnabled = !(Parameters.data_.particleEffect);
    };
    if (this.inUpdate_){
    this.objsToAdd_.push(_arg1);
    }
    else {
    this.internalAddObj(_arg1);
    };
    }
    public function internalAddObj(_arg1:BasicObject):void{
    if (!_arg1.addTo(this, _arg1.x_, _arg1.y_)){
    return;
    };
    var _local2ictionary = (((_arg1 is GameObject)) ? goDict_ : boDict_);
    if (_local2[_arg1.objectId_] != null){
    if (!isPetYard){
    return;
    };
    };
    _local2[_arg1.objectId_] = _arg1;
    }
    override public function removeObj(_arg1:int):void{
    if (this.inUpdate_){
    thi*****sToRemove_.push(_arg1);
    }
    else {
    this.internalRemoveObj(_arg1);
    };
    }
    public function internalRemoveObj(_arg1:int):void{
    var _local2ictionary = goDict_;
    var _local3:BasicObject = _local2[_arg1];
    if (_local3 == null){
    _local2 = boDict_;
    _local3 = _local2[_arg1];
    if (_local3 == null){
    return;
    };
    };
    _local3.removeFromMap();
    delete _local2[_arg1];
    }
    public function getSquare(_arg1:Number, _arg2:Number):Square{
    if ((((((((_arg1 < 0)) || ((_arg1 >= width_)))) || ((_arg2 < 0)))) || ((_arg2 >= height_)))){
    return (null);
    };
    var _local3:int = (int(_arg1) + (int(_arg2) * width_));
    var _local4:Square = squares_[_local3];
    if (_local4 == null){
    _local4 = new Square(this, int(_arg1), int(_arg2));
    squares_[_local3] = _local4;
    squareList_.push(_local4);
    };
    return (_local4);
    }
    public function lookupSquare(_arg1:int, _arg2:int):Square{
    if ((((((((_arg1 < 0)) || ((_arg1 >= width_)))) || ((_arg2 < 0)))) || ((_arg2 >= height_)))){
    return (null);
    };
    return (squares_[(_arg1 + (_arg2 * width_))]);
    }
    override public function draw(_arg1:Camera, _arg2:int):void{
    var _local11:Square;
    var _local12:int;
    var _local13:GameObject;
    var _local14:BasicObject;
    var _local15:Context3D;
    var _local16:int;
    var _local17:Number;
    var _local18:Number;
    var _local19:Number;
    var _local20:uint;
    var _local21:Render3D;
    var _local22:Array;
    var _local23:Number;
    if (wasLastFrameGpu != Parameters.isGpuRender()){
    _local15 = WebMain.STAGE.stage3Ds[0].context3D;
    if ((((((wasLastFrameGpu == true)) && (!((_local15 == null))))) && ((_local15.driverInfo.toLowerCase().indexOf("dispo sed") == -1)))){
    _local15.clear();
    _local15.present();
    }
    else {
    map_.graphics.clear();
    };
    signalRenderSwitch.dispatch(wasLastFrameGpu);
    wasLastFrameGpu = Parameters.isGpuRender();
    };
    var _local3:Rectangle = _arg1.clipRect_;
    if (((Parameters.data_.fullscreenMod) && (!(this.isBackground)))){
    this.scaleX = (600 / (Parameters.data_.mscale * 50));
    this.scaleY = (600 / (Parameters.data_.mscale * 50));
    x = ((-(_local3.x) * 600) / (Parameters.data_.mscale * 50));
    y = ((-(_local3.y) * 600) / (Parameters.data_.mscale * 50));
    }
    else {
    this.scaleX = (this.scaleY = 1);
    x = -(_local3.x);
    y = -(_local3.y);
    };
    var _local4:Number = ((-(_local3.y) - (_local3.height / 2)) / 50);
    var _local5:Point = new Point((_arg1.x_ + (_local4 * Math.cos((_arg1.angleRad_ - (Math.PI / 2))))), (_arg1.y_ + (_local4 * Math.sin((_arg1.angleRad_ - (Math.PI / 2))))));
    if (background_ != null){
    background_.draw(_arg1, _arg2);
    };
    this.visible_.length = 0;
    this.visibleUnder_.length = 0;
    this.visibleSquares_.length = 0;
    this.visibleHit_.length = 0;
    this.topSquares_.length = 0;
    var _local6:int = _arg1.maxDist_;
    var _local7:int = Math.max(0, (_local5.x - _local6));
    var _local8:int = Math.min((width_ - 1), (_local5.x + _local6));
    var _local9:int = Math.max(0, (_local5.y - _local6));
    var _local10:int = Math.min((height_ - 1), (_local5.y + _local6));
    this.graphicsData_.length = 0;
    this.graphicsDataStageSoftware_.length = 0;
    this.graphicsData3d_.length = 0;
    _local12 = _local7;
    while (_local12 <= _local8) {
    _local16 = _local9;
    while (_local16 <= _local10) {
    _local11 = squares_[(_local12 + (_local16 * width_))];
    if (_local11 != null){
    _local17 = (_local5.x - _local11.center_.x);
    _local18 = (_local5.y - _local11.center_.y);
    _local19 = ((_local17 * _local17) + (_local18 * _local18));
    if (_local19 <= _arg1.maxDistSq_){
    _local11.lastVisible_ = _arg2;
    _local11.draw(this.graphicsData_, _arg1, _arg2);
    this.visibleSquares_.push(_local11);
    if (_local11.topFace_ != null){
    this.topSquares_.push(_local11);
    };
    };
    };
    _local16++;
    };
    _local12++;
    };
    for each (_local13 in goDict_) {
    _local13.drawn_ = false;
    if (!_local13.dead_){
    _local11 = _local13.square_;
    if (((!((_local11 == null))) && ((_local11.lastVisible_ == _arg2)))){
    _local13.drawn_ = true;
    _local13.computeSortVal(_arg1);
    if (!(_local13 is ParticleEffect)){
    this.visibleHit_.push(_local13);
    };
    if (_local13.props_.drawUnder_){
    if (_local13.props_.drawOnGround_){
    _local13.draw(this.graphicsData_, _arg1, _arg2);
    };
    this.visibleUnder_.push(_local13);
    }
    else {
    this.visible_.push(_local13);
    };
    };
    };
    };
    for each (_local14 in boDict_) {
    _local14.drawn_ = false;
    _local11 = _local14.square_;
    if (((!((_local11 == null))) && ((_local11.lastVisible_ == _arg2)))){
    _local14.drawn_ = true;
    _local14.computeSortVal(_arg1);
    this.visible_.push(_local14);
    };
    };
    if (this.visibleUnder_.length > 0){
    this.visibleUnder_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
    for each (_local14 in this.visibleUnder_) {
    if (!(((_local14 is GameObject)) && ((_local14 as GameObject).props_.drawOnGround_))){
    _local14.draw(this.graphicsData_, _arg1, _arg2);
    };
    };
    };
    this.visible_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
    if (Parameters.data_.drawShadows){
    for each (_local14 in this.visible_) {
    if (_local14.hasShadow_){
    _local14.drawShadow(this.graphicsData_, _arg1, _arg2);
    };
    };
    };
    for each (_local14 in this.visible_) {
    _local14.draw(this.graphicsData_, _arg1, _arg2);
    if (Parameters.isGpuRender()){
    _local14.draw3d(this.graphicsData3d_);
    };
    };
    if (this.topSquares_.length > 0){
    for each (_local11 in this.topSquares_) {
    _local11.drawTop(this.graphicsData_, _arg1, _arg2);
    };
    };
    if (((Parameters.isGpuRender()) && (Renderer.inGame))){
    _local20 = this.getFilterIndex();
    _local21 = StaticInjectorContext.getInjector().getInstance(Re nder3D);
    _local21.dispatch(this.graphicsData_, this.graphicsData3d_, width_, height_, _arg1, _local20);
    _local12 = 0;
    while (_local12 < this.graphicsData_.length) {
    if ((((this.graphicsData_[_local12] is GraphicsBitmapFill)) && (GraphicsFillExtra.isSoftwareDraw(GraphicsBitmapFi ll(this.graphicsData_[_local12]))))){
    this.graphicsDataStageSoftware_.push(this.graphics Data_[_local12]);
    this.graphicsDataStageSoftware_.push(this.graphics Data_[(_local12 + 1)]);
    this.graphicsDataStageSoftware_.push(this.graphics Data_[(_local12 + 2)]);
    }
    else {
    if ((((this.graphicsData_[_local12] is GraphicsSolidFill)) && (GraphicsFillExtra.isSoftwareDrawSolid(GraphicsSol idFill(this.graphicsData_[_local12]))))){
    this.graphicsDataStageSoftware_.push(this.graphics Data_[_local12]);
    this.graphicsDataStageSoftware_.push(this.graphics Data_[(_local12 + 1)]);
    this.graphicsDataStageSoftware_.push(this.graphics Data_[(_local12 + 2)]);
    };
    };
    _local12++;
    };
    if (this.graphicsDataStageSoftware_.length > 0){
    map_.graphics.clear();
    map_.graphics.drawGraphicsData(this.graphicsDataSt ageSoftware_);
    if (this.lastSoftwareClear){
    this.lastSoftwareClear = false;
    };
    }
    else {
    if (!this.lastSoftwareClear){
    map_.graphics.clear();
    this.lastSoftwareClear = true;
    };
    };
    if ((_arg2 % 149) == 0){
    GraphicsFillExtra.manageSize();
    };
    }
    else {
    map_.graphics.clear();
    map_.graphics.drawGraphicsData(this.graphicsData_) ;
    };
    map_.filters.length = 0;
    if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))){
    _local22 = [];
    if (player_.isDrunk()){
    _local23 = (20 + (10 * Math.sin((_arg2 / 1000))));
    _local22.push(new BlurFilter(_local23, _local23));
    };
    if (player_.isBlind()){
    _local22.push(BLIND_FILTER);
    };
    map_.filters = _local22;
    }
    else {
    if (map_.filters.length > 0){
    map_.filters = [];
    };
    };
    mapOverlay_.draw(_arg1, _arg2);
    partyOverlay_.draw(_arg1, _arg2);
    }
    private function getFilterIndex():uint{
    var _local1:uint;
    if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))){
    if (player_.isPaused()){
    _local1 = Renderer.STAGE3D_FILTER_PAUSE;
    }
    else {
    if (player_.isBlind()){
    _local1 = Renderer.STAGE3D_FILTER_BLIND;
    }
    else {
    if (player_.isDrunk()){
    _local1 = Renderer.STAGE3D_FILTER_DRUNK;
    };
    };
    };
    };
    return (_local1);
    }

    }
    }//package com.company.assembleegameclient.map

  16. #14
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Try this:

    Code:
    package com.company.assembleegameclient.map {
    import com.company.assembleegameclient.background.Background;
    import com.company.assembleegameclient.game.AGameSprite;
    import com.company.assembleegameclient.map.mapoverlay.MapOverlay;
    import com.company.assembleegameclient.map.partyoverlay.PartyOverlay;
    import com.company.assembleegameclient.objects.BasicObject;
    import com.company.assembleegameclient.objects.GameObject;
    import com.company.assembleegameclient.objects.Party;
    import com.company.assembleegameclient.objects.particles.ParticleEffect;
    import com.company.assembleegameclient.parameters.Parameters;
    import com.company.assembleegameclient.util.ConditionEffect;
    
    import flash.display.BitmapData;
    import flash.display.DisplayObject;
    import flash.display.GraphicsBitmapFill;
    import flash.display.GraphicsSolidFill;
    import flash.display.IGraphicsData;
    import flash.filters.BlurFilter;
    import flash.filters.ColorMatrixFilter;
    import flash.geom.ColorTransform;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.utils.Dictionary;
    
    import kabam****tmg.assets.EmbeddedAssets;
    import kabam****tmg.core.StaticInjectorContext;
    import kabam****tmg.game.logging****llingMeanLoopMonitor;
    import kabam****tmg.game.model.GameModel;
    import kabam****tmg.stage3D.GraphicsFillExtra;
    import kabam****tmg.stage3D.Object3D.Object3DStage3D;
    import kabam****tmg.stage3D.Render3D;
    import kabam****tmg.stage3D.Renderer;
    import kabam****tmg.stage3D.graphic3D.Program3DFactory;
    import kabam****tmg.stage3D.graphic3D.TextureFactory;
    
    public class Map extends AbstractMap {
    
        public static const CLOTH_BAZAAR:String = "Cloth Bazaar";
        public static const NEXUS:String = "Nexus";
        public static const DAILY_QUEST_ROOM:String = "Daily Quest Room";
        public static const PET_YARD_1:String = "Pet Yard";
        public static const PET_YARD_2:String = "Pet Yard 2";
        public static const PET_YARD_3:String = "Pet Yard 3";
        public static const PET_YARD_4:String = "Pet Yard 4";
        public static const PET_YARD_5:String = "Pet Yard 5";
        public static const GUILD_HALL:String = "Guild Hall";
        public static const NEXUS_EXPLANATION:String = "Nexus_Explanation";
        public static const VAULT:String = "Vault";
        public static var forceSoftwareRender:Boolean = false;
        private static const VISIBLE_SORT_FIELDS:Array = ["sortVal_", "objectId_"];
        private static const VISIBLE_SORT_PARAMS:Array = [Array.NUMERIC, Array.NUMERIC];
        protected static const BLIND_FILTER:ColorMatrixFilter = new ColorMatrixFilter([0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 1, 0]);
        protected static var BREATH_CT:ColorTransform = new ColorTransform((0xFF / 0xFF), (55 / 0xFF), (0 / 0xFF), 0);
        public static var texture:BitmapData;
    
        public var ifDrawEffectFlag:Boolean = true;
        private var loopMonitor:RollingMeanLoopMonitor;
        private var inUpdate_:Boolean = false;
        private var objsToAdd_:Vector.<BasicObject>;
        private var idsToRemove_:Vector.<int>;
        private var forceSoftwareMap:Dictionary;
        private var lastSoftwareClear:Boolean = false;
        private var darkness:DisplayObject;
        private var graphicsData_:Vector.<IGraphicsData>;
        private var graphicsDataStageSoftware_:Vector.<IGraphicsData>;
        private var graphicsData3d_:Vector.<Object3DStage3D>;
        public var visible_:Array;
        public var visibleUnder_:Array;
        public var visibleSquares_:Vector.<Square>;
        public var topSquares_:Vector.<Square>;
    
        public function Map(_arg_1:AGameSprite) {
            this.objsToAdd_ = new Vector.<BasicObject>();
            thi*****sToRemove_ = new Vector.<int>();
            this.forceSoftwareMap = new Dictionary();
            this.darkness = new EmbeddedAssets.DarknessBackground();
            this.graphicsData_ = new Vector.<IGraphicsData>();
            this.graphicsDataStageSoftware_ = new Vector.<IGraphicsData>();
            this.graphicsData3d_ = new Vector.<Object3DStage3D>();
            this.visible_ = [];
            this.visibleUnder_ = [];
            this.visibleSquares_ = new Vector.<Square>();
            this.topSquares_ = new Vector.<Square>();
            super();
            gs_ = _arg_1;
            hurtOverlay_ = new HurtOverlay();
            gradientOverlay_ = new GradientOverlay();
            mapOverlay_ = new MapOverlay();
            partyOverlay_ = new PartyOverlay(this);
            party_ = new Party(this);
            quest_ = new Quest(this);
            this.loopMonitor = StaticInjectorContext.getInjector().getInstance(RollingMeanLoopMonitor);
            StaticInjectorContext.getInjector().getInstance(GameModel).gameObjects = goDict_;
            this.forceSoftwareMap[PET_YARD_1] = true;
            this.forceSoftwareMap[PET_YARD_2] = true;
            this.forceSoftwareMap[PET_YARD_3] = true;
            this.forceSoftwareMap[PET_YARD_4] = true;
            this.forceSoftwareMap[PET_YARD_5] = true;
            this.forceSoftwareMap["Nexus"] = true;
            this.forceSoftwareMap["Tomb of the Ancients"] = true;
            this.forceSoftwareMap["Tomb of the Ancients (Heroic)"] = true;
            this.forceSoftwareMap["Mad Lab"] = true;
            this.forceSoftwareMap["Guild Hall"] = true;
            this.forceSoftwareMap["Guild Hall 2"] = true;
            this.forceSoftwareMap["Guild Hall 3"] = true;
            this.forceSoftwareMap["Guild Hall 4"] = true;
            this.forceSoftwareMap["Cloth Bazaar"] = true;
            wasLastFrameGpu = Parameters.isGpuRender();
        }
    
        override public function setProps(_arg_1:int, _arg_2:int, _arg_3:String, _arg_4:int, _arg_5:Boolean, _arg_6:Boolean):void {
            width_ = _arg_1;
            height_ = _arg_2;
            name_ = _arg_3;
            back_ = _arg_4;
            allowPlayerTeleport_ = _arg_5;
            showDisplays_ = _arg_6;
            this.forceSoftwareRenderCheck(name_);
        }
    
        private function forceSoftwareRenderCheck(_arg_1:String):void {
            forceSoftwareRender = ((!((this.forceSoftwareMap[_arg_1] == null))) || ((WebMain.STAGE.stage3Ds[0].context3D == null)));
        }
    
        override public function initialize():void {
            squares_.length = (width_ * height_);
            background_ = Background.getBackground(back_);
            if (background_ != null) {
                addChild(background_);
            }
            addChild(map_);
            addChild(hurtOverlay_);
            addChild(gradientOverlay_);
            addChild(mapOverlay_);
            addChild(partyOverlay_);
            isPetYard = (name_.substr(0, 8) == "Pet Yard");
        }
    
        override public function dispose():void {
            var _local_1:Square;
            var _local_2:GameObject;
            var _local_3:BasicObject;
            gs_ = null;
            background_ = null;
            map_ = null;
            hurtOverlay_ = null;
            gradientOverlay_ = null;
            mapOverlay_ = null;
            partyOverlay_ = null;
            for each (_local_1 in squareList_) {
                _local_1.dispose();
            }
            squareList_.length = 0;
            squareList_ = null;
            squares_.length = 0;
            squares_ = null;
            for each (_local_2 in goDict_) {
                _local_2.dispose();
            }
            goDict_ = null;
            for each (_local_3 in boDict_) {
                _local_3.dispose();
            }
            boDict_ = null;
            merchLookup_ = null;
            player_ = null;
            party_ = null;
            quest_ = null;
            this.objsToAdd_ = null;
            thi*****sToRemove_ = null;
            TextureFactory.disposeTextures();
            GraphicsFillExtra.dispose();
            Program3DFactory.getInstance().dispose();
        }
    
        override public function update(_arg_1:int, _arg_2:int):void {
            var _local_3:BasicObject;
            var _local_4:int;
            this.inUpdate_ = true;
            for each (_local_3 in goDict_) {
                if (!_local_3.update(_arg_1, _arg_2)) {
                    thi*****sToRemove_.push(_local_3.objectId_);
                }
            }
            for each (_local_3 in boDict_) {
                if (!_local_3.update(_arg_1, _arg_2)) {
                    thi*****sToRemove_.push(_local_3.objectId_);
                }
            }
            this.inUpdate_ = false;
            for each (_local_3 in this.objsToAdd_) {
                this.internalAddObj(_local_3);
            }
            this.objsToAdd_.length = 0;
            for each (_local_4 in thi*****sToRemove_) {
                this.internalRemoveObj(_local_4);
            }
            thi*****sToRemove_.length = 0;
            party_.update(_arg_1, _arg_2);
        }
    
        override public function pSTopW(_arg_1:Number, _arg_2:Number):Point {
            var _local_3:Square;
            for each (_local_3 in this.visibleSquares_) {
                if (((!((_local_3.faces_.length == 0))) && (_local_3.faces_[0].face_.contains(_arg_1, _arg_2)))) {
                    return (new Point(_local_3.center_.x, _local_3.center_.y));
                }
            }
            return (null);
        }
    
        override public function setGroundTile(_arg_1:int, _arg_2:int, _arg_3:uint):void {
            var _local_8:int;
            var _local_9:int;
            var _local_10:Square;
            var _local_4:Square = this.getSquare(_arg_1, _arg_2);
            _local_4.setTileType(_arg_3);
            var _local_5:int = (((_arg_1 < (width_ - 1))) ? (_arg_1 + 1) : _arg_1);
            var _local_6:int = (((_arg_2 < (height_ - 1))) ? (_arg_2 + 1) : _arg_2);
            var _local_7:int = (((_arg_1 > 0)) ? (_arg_1 - 1) : _arg_1);
            while (_local_7 <= _local_5) {
                _local_8 = (((_arg_2 > 0)) ? (_arg_2 - 1) : _arg_2);
                while (_local_8 <= _local_6) {
                    _local_9 = (_local_7 + (_local_8 * width_));
                    _local_10 = squares_[_local_9];
                    if (((!((_local_10 == null))) && (((_local_10.props_.hasEdge_) || (!((_local_10.tileType_ == _arg_3))))))) {
                        _local_10.faces_.length = 0;
                    }
                    _local_8++;
                }
                _local_7++;
            }
        }
    
        override public function addObj(_arg_1:BasicObject, _arg_2:Number, _arg_3:Number):void {
            _arg_1.x_ = _arg_2;
            _arg_1.y_ = _arg_3;
            if ((_arg_1 is ParticleEffect)) {
                (_arg_1 as ParticleEffect).reducedDrawEnabled = !(Parameters.data_.particleEffect);
            }
            if (this.inUpdate_) {
                this.objsToAdd_.push(_arg_1);
            }
            else {
                this.internalAddObj(_arg_1);
            }
        }
    
        public function internalAddObj(_arg_1:BasicObject):void {
            if (!_arg_1.addTo(this, _arg_1.x_, _arg_1.y_)) {
                return;
            }
            var _local_2:Dictionary = (((_arg_1 is GameObject)) ? goDict_ : boDict_);
            if (_local_2[_arg_1.objectId_] != null) {
                if (!isPetYard) {
                    return;
                }
            }
            _local_2[_arg_1.objectId_] = _arg_1;
        }
    
        override public function removeObj(_arg_1:int):void {
            if (this.inUpdate_) {
                thi*****sToRemove_.push(_arg_1);
            }
            else {
                this.internalRemoveObj(_arg_1);
            }
        }
    
        public function internalRemoveObj(_arg_1:int):void {
            var _local_2:Dictionary = goDict_;
            var _local_3:BasicObject = _local_2[_arg_1];
            if (_local_3 == null) {
                _local_2 = boDict_;
                _local_3 = _local_2[_arg_1];
                if (_local_3 == null) {
                    return;
                }
            }
            _local_3.removeFromMap();
            delete _local_2[_arg_1];
        }
    
        public function getSquare(_arg_1:Number, _arg_2:Number):Square {
            if ((((((((_arg_1 < 0)) || ((_arg_1 >= width_)))) || ((_arg_2 < 0)))) || ((_arg_2 >= height_)))) {
                return (null);
            }
            var _local_3:int = (int(_arg_1) + (int(_arg_2) * width_));
            var _local_4:Square = squares_[_local_3];
            if (_local_4 == null) {
                _local_4 = new Square(this, int(_arg_1), int(_arg_2));
                squares_[_local_3] = _local_4;
                squareList_.push(_local_4);
            }
            return (_local_4);
        }
    
        public function lookupSquare(_arg_1:int, _arg_2:int):Square {
            if ((((((((_arg_1 < 0)) || ((_arg_1 >= width_)))) || ((_arg_2 < 0)))) || ((_arg_2 >= height_)))) {
                return (null);
            }
            return (squares_[(_arg_1 + (_arg_2 * width_))]);
        }
    
        override public function draw(_arg_1:Camera, _arg_2:int):void {
            var _local_6:Square;
            var _local_13:GameObject;
            var _local_14:BasicObject;
            var _local_15:int;
            var _local_16:Number;
            var _local_17:Number;
            var _local_18:Number;
            var _local_19:Number;
            var _local_20:Number;
            var _local_21:uint;
            var _local_22:Render3D;
            var _local_23:int;
            var _local_24:Array;
            var _local_25:Number;
            if (wasLastFrameGpu != Parameters.isGpuRender()) {
                if ((((((wasLastFrameGpu == true)) && (!((WebMain.STAGE.stage3Ds[0].context3D == null))))) && (!(((!((WebMain.STAGE.stage3Ds[0].context3D == null))) && (!((WebMain.STAGE.stage3Ds[0].context3D.driverInfo.toLowerCase().indexOf("disposed") == -1)))))))) {
                    WebMain.STAGE.stage3Ds[0].context3D.clear();
                    WebMain.STAGE.stage3Ds[0].context3D.present();
                }
                else {
                    map_.graphics.clear();
                }
                signalRenderSwitch.dispatch(wasLastFrameGpu);
                wasLastFrameGpu = Parameters.isGpuRender();
            }
            var _local_3:Rectangle = _arg_1.clipRect_;
            if (((Parameters.data_.fullscreenMod) && (!(this.isBackground)))){
    		this.scaleX = (600 / (Parameters.data_.mscale * 50));
    		this.scaleY = (600 / (Parameters.data_.mscale * 50));
    		x = ((-(_local3.x) * 600) / (Parameters.data_.mscale * 50));
    		y = ((-(_local3.y) * 600) / (Parameters.data_.mscale * 50));
    		}
            x = -(_local_3.x);
            y = -(_local_3.y);
            var _local_4:Number = ((-(_local_3.y) - (_local_3.height / 2)) / 50);
            var _local_5:Point = new Point((_arg_1.x_ + (_local_4 * Math.cos((_arg_1.angleRad_ - (Math.PI / 2))))), (_arg_1.y_ + (_local_4 * Math.sin((_arg_1.angleRad_ - (Math.PI / 2))))));
            if (background_ != null) {
                background_.draw(_arg_1, _arg_2);
            }
            this.visible_.length = 0;
            this.visibleUnder_.length = 0;
            this.visibleSquares_.length = 0;
            this.topSquares_.length = 0;
            var _local_7:int = _arg_1.maxDist_;
            var _local_8:int = Math.max(0, (_local_5.x - _local_7));
            var _local_9:int = Math.min((width_ - 1), (_local_5.x + _local_7));
            var _local_10:int = Math.max(0, (_local_5.y - _local_7));
            var _local_11:int = Math.min((height_ - 1), (_local_5.y + _local_7));
            this.graphicsData_.length = 0;
            this.graphicsDataStageSoftware_.length = 0;
            this.graphicsData3d_.length = 0;
            var _local_12:int = _local_8;
            while (_local_12 <= _local_9) {
                _local_15 = _local_10;
                while (_local_15 <= _local_11) {
                    _local_6 = squares_[(_local_12 + (_local_15 * width_))];
                    if (_local_6 != null) {
                        _local_16 = (_local_5.x - _local_6.center_.x);
                        _local_17 = (_local_5.y - _local_6.center_.y);
                        _local_18 = ((_local_16 * _local_16) + (_local_17 * _local_17));
                        if (_local_18 <= _arg_1.maxDistSq_) {
                            _local_6.lastVisible_ = _arg_2;
                            _local_6.draw(this.graphicsData_, _arg_1, _arg_2);
                            this.visibleSquares_.push(_local_6);
                            if (_local_6.topFace_ != null) {
                                this.topSquares_.push(_local_6);
                            }
                        }
                    }
                    _local_15++;
                }
                _local_12++;
            }
            for each (_local_13 in goDict_) {
                _local_13.drawn_ = false;
                if (!_local_13.dead_) {
                    _local_6 = _local_13.square_;
                    if (!(((_local_6 == null)) || (!((_local_6.lastVisible_ == _arg_2))))) {
                        _local_13.drawn_ = true;
                        _local_13.computeSortVal(_arg_1);
                        if (_local_13.props_.drawUnder_) {
                            if (_local_13.props_.drawOnGround_) {
                                _local_13.draw(this.graphicsData_, _arg_1, _arg_2);
                            }
                            else {
                                this.visibleUnder_.push(_local_13);
                            }
                        }
                        else {
                            this.visible_.push(_local_13);
                        }
                    }
                }
            }
            for each (_local_14 in boDict_) {
                _local_14.drawn_ = false;
                _local_6 = _local_14.square_;
                if (!(((_local_6 == null)) || (!((_local_6.lastVisible_ == _arg_2))))) {
                    _local_14.drawn_ = true;
                    _local_14.computeSortVal(_arg_1);
                    this.visible_.push(_local_14);
                }
            }
            if (this.visibleUnder_.length > 0) {
                this.visibleUnder_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
                for each (_local_14 in this.visibleUnder_) {
                    _local_14.draw(this.graphicsData_, _arg_1, _arg_2);
                }
            }
            this.visible_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
            if (Parameters.data_.drawShadows) {
                for each (_local_14 in this.visible_) {
                    if (_local_14.hasShadow_) {
                        _local_14.drawShadow(this.graphicsData_, _arg_1, _arg_2);
                    }
                }
            }
            for each (_local_14 in this.visible_) {
                _local_14.draw(this.graphicsData_, _arg_1, _arg_2);
                if (Parameters.isGpuRender()) {
                    _local_14.draw3d(this.graphicsData3d_);
                }
            }
            if (this.topSquares_.length > 0) {
                for each (_local_6 in this.topSquares_) {
                    _local_6.drawTop(this.graphicsData_, _arg_1, _arg_2);
                }
            }
            if (((((!((player_ == null))) && ((player_.breath_ >= 0)))) && ((player_.breath_ < Parameters.BREATH_THRESH)))) {
                _local_19 = ((Parameters.BREATH_THRESH - player_.breath_) / Parameters.BREATH_THRESH);
                _local_20 = (Math.abs(Math.sin((_arg_2 / 300))) * 0.75);
                BREATH_CT.alphaMultiplier = (_local_19 * _local_20);
                hurtOverlay_.transform.colorTransform = BREATH_CT;
                hurtOverlay_.visible = true;
                hurtOverlay_.x = _local_3.left;
                hurtOverlay_.y = _local_3.top;
            }
            else {
                hurtOverlay_.visible = false;
            }
            if (((!((player_ == null))) && (!(Parameters.screenShotMode_)))) {
                gradientOverlay_.visible = true;
                gradientOverlay_.x = (_local_3.right - 10);
                gradientOverlay_.y = _local_3.top;
            }
            else {
                gradientOverlay_.visible = false;
            }
            if (((Parameters.isGpuRender()) && (Renderer.inGame))) {
                _local_21 = this.getFilterIndex();
                _local_22 = StaticInjectorContext.getInjector().getInstance(Render3D);
                _local_22.dispatch(this.graphicsData_, this.graphicsData3d_, width_, height_, _arg_1, _local_21);
                _local_23 = 0;
                while (_local_23 < this.graphicsData_.length) {
                    if ((((this.graphicsData_[_local_23] is GraphicsBitmapFill)) && (GraphicsFillExtra.isSoftwareDraw(GraphicsBitmapFill(this.graphicsData_[_local_23]))))) {
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[_local_23]);
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 1)]);
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 2)]);
                    }
                    else {
                        if ((((this.graphicsData_[_local_23] is GraphicsSolidFill)) && (GraphicsFillExtra.isSoftwareDrawSolid(GraphicsSolidFill(this.graphicsData_[_local_23]))))) {
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[_local_23]);
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 1)]);
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 2)]);
                        }
                    }
                    _local_23++;
                }
                if (this.graphicsDataStageSoftware_.length > 0) {
                    map_.graphics.clear();
                    map_.graphics.drawGraphicsData(this.graphicsDataStageSoftware_);
                    if (this.lastSoftwareClear) {
                        this.lastSoftwareClear = false;
                    }
                }
                else {
                    if (!this.lastSoftwareClear) {
                        map_.graphics.clear();
                        this.lastSoftwareClear = true;
                    }
                }
                if ((_arg_2 % 149) == 0) {
                    GraphicsFillExtra.manageSize();
                }
            }
            else {
                map_.graphics.clear();
                map_.graphics.drawGraphicsData(this.graphicsData_);
            }
            map_.filters.length = 0;
            if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))) {
                _local_24 = [];
                if (player_.isDrunk()) {
                    _local_25 = (20 + (10 * Math.sin((_arg_2 / 1000))));
                    _local_24.push(new BlurFilter(_local_25, _local_25));
                }
                if (player_.isBlind()) {
                    _local_24.push(BLIND_FILTER);
                }
                map_.filters = _local_24;
            }
            else {
                if (map_.filters.length > 0) {
                    map_.filters = [];
                }
            }
            mapOverlay_.draw(_arg_1, _arg_2);
            partyOverlay_.draw(_arg_1, _arg_2);
            if (((player_) && (player_.isDarkness()))) {
                this.darkness.x = -300;
                this.darkness.y = ((Parameters.data_.centerOnPlayer) ? -525 : -515);
                this.darkness.alpha = 0.95;
                addChild(this.darkness);
            }
            else {
                if (contains(this.darkness)) {
                    removeChild(this.darkness);
                }
            }
        }
    
        private function getFilterIndex():uint {
            var _local_1:uint;
            if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))) {
                if (player_.isPaused()) {
                    _local_1 = Renderer.STAGE3D_FILTER_PAUSE;
                }
                else {
                    if (player_.isBlind()) {
                        _local_1 = Renderer.STAGE3D_FILTER_BLIND;
                    }
                    else {
                        if (player_.isDrunk()) {
                            _local_1 = Renderer.STAGE3D_FILTER_DRUNK;
                        }
                    }
                }
            }
            return (_local_1);
        }
    
    
    }
    }//package com.company.assembleegameclient.map
    Obviously replace the **** with respective file names.

    - - - Updated - - -
    @Stone2405

  17. #15
    Stone2405's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Posts
    117
    Reputation
    10
    Thanks
    9
    My Mood
    Amused
    Quote Originally Posted by DevilRotMG View Post
    Try this:

    Code:
    package com.company.assembleegameclient.map {
    import com.company.assembleegameclient.background.Background;
    import com.company.assembleegameclient.game.AGameSprite;
    import com.company.assembleegameclient.map.mapoverlay.MapOverlay;
    import com.company.assembleegameclient.map.partyoverlay.PartyOverlay;
    import com.company.assembleegameclient.objects.BasicObject;
    import com.company.assembleegameclient.objects.GameObject;
    import com.company.assembleegameclient.objects.Party;
    import com.company.assembleegameclient.objects.particles.ParticleEffect;
    import com.company.assembleegameclient.parameters.Parameters;
    import com.company.assembleegameclient.util.ConditionEffect;
    
    import flash.display.BitmapData;
    import flash.display.DisplayObject;
    import flash.display.GraphicsBitmapFill;
    import flash.display.GraphicsSolidFill;
    import flash.display.IGraphicsData;
    import flash.filters.BlurFilter;
    import flash.filters.ColorMatrixFilter;
    import flash.geom.ColorTransform;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.utils.Dictionary;
    
    import kabam****tmg.assets.EmbeddedAssets;
    import kabam****tmg.core.StaticInjectorContext;
    import kabam****tmg.game.logging****llingMeanLoopMonitor;
    import kabam****tmg.game.model.GameModel;
    import kabam****tmg.stage3D.GraphicsFillExtra;
    import kabam****tmg.stage3D.Object3D.Object3DStage3D;
    import kabam****tmg.stage3D.Render3D;
    import kabam****tmg.stage3D.Renderer;
    import kabam****tmg.stage3D.graphic3D.Program3DFactory;
    import kabam****tmg.stage3D.graphic3D.TextureFactory;
    
    public class Map extends AbstractMap {
    
        public static const CLOTH_BAZAAR:String = "Cloth Bazaar";
        public static const NEXUS:String = "Nexus";
        public static const DAILY_QUEST_ROOM:String = "Daily Quest Room";
        public static const PET_YARD_1:String = "Pet Yard";
        public static const PET_YARD_2:String = "Pet Yard 2";
        public static const PET_YARD_3:String = "Pet Yard 3";
        public static const PET_YARD_4:String = "Pet Yard 4";
        public static const PET_YARD_5:String = "Pet Yard 5";
        public static const GUILD_HALL:String = "Guild Hall";
        public static const NEXUS_EXPLANATION:String = "Nexus_Explanation";
        public static const VAULT:String = "Vault";
        public static var forceSoftwareRender:Boolean = false;
        private static const VISIBLE_SORT_FIELDS:Array = ["sortVal_", "objectId_"];
        private static const VISIBLE_SORT_PARAMS:Array = [Array.NUMERIC, Array.NUMERIC];
        protected static const BLIND_FILTER:ColorMatrixFilter = new ColorMatrixFilter([0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 0, 0, 0.05, 0.05, 0.05, 1, 0]);
        protected static var BREATH_CT:ColorTransform = new ColorTransform((0xFF / 0xFF), (55 / 0xFF), (0 / 0xFF), 0);
        public static var texture:BitmapData;
    
        public var ifDrawEffectFlag:Boolean = true;
        private var loopMonitor:RollingMeanLoopMonitor;
        private var inUpdate_:Boolean = false;
        private var objsToAdd_:Vector.<BasicObject>;
        private var idsToRemove_:Vector.<int>;
        private var forceSoftwareMap:Dictionary;
        private var lastSoftwareClear:Boolean = false;
        private var darkness:DisplayObject;
        private var graphicsData_:Vector.<IGraphicsData>;
        private var graphicsDataStageSoftware_:Vector.<IGraphicsData>;
        private var graphicsData3d_:Vector.<Object3DStage3D>;
        public var visible_:Array;
        public var visibleUnder_:Array;
        public var visibleSquares_:Vector.<Square>;
        public var topSquares_:Vector.<Square>;
    
        public function Map(_arg_1:AGameSprite) {
            this.objsToAdd_ = new Vector.<BasicObject>();
            thi*****sToRemove_ = new Vector.<int>();
            this.forceSoftwareMap = new Dictionary();
            this.darkness = new EmbeddedAssets.DarknessBackground();
            this.graphicsData_ = new Vector.<IGraphicsData>();
            this.graphicsDataStageSoftware_ = new Vector.<IGraphicsData>();
            this.graphicsData3d_ = new Vector.<Object3DStage3D>();
            this.visible_ = [];
            this.visibleUnder_ = [];
            this.visibleSquares_ = new Vector.<Square>();
            this.topSquares_ = new Vector.<Square>();
            super();
            gs_ = _arg_1;
            hurtOverlay_ = new HurtOverlay();
            gradientOverlay_ = new GradientOverlay();
            mapOverlay_ = new MapOverlay();
            partyOverlay_ = new PartyOverlay(this);
            party_ = new Party(this);
            quest_ = new Quest(this);
            this.loopMonitor = StaticInjectorContext.getInjector().getInstance(RollingMeanLoopMonitor);
            StaticInjectorContext.getInjector().getInstance(GameModel).gameObjects = goDict_;
            this.forceSoftwareMap[PET_YARD_1] = true;
            this.forceSoftwareMap[PET_YARD_2] = true;
            this.forceSoftwareMap[PET_YARD_3] = true;
            this.forceSoftwareMap[PET_YARD_4] = true;
            this.forceSoftwareMap[PET_YARD_5] = true;
            this.forceSoftwareMap["Nexus"] = true;
            this.forceSoftwareMap["Tomb of the Ancients"] = true;
            this.forceSoftwareMap["Tomb of the Ancients (Heroic)"] = true;
            this.forceSoftwareMap["Mad Lab"] = true;
            this.forceSoftwareMap["Guild Hall"] = true;
            this.forceSoftwareMap["Guild Hall 2"] = true;
            this.forceSoftwareMap["Guild Hall 3"] = true;
            this.forceSoftwareMap["Guild Hall 4"] = true;
            this.forceSoftwareMap["Cloth Bazaar"] = true;
            wasLastFrameGpu = Parameters.isGpuRender();
        }
    
        override public function setProps(_arg_1:int, _arg_2:int, _arg_3:String, _arg_4:int, _arg_5:Boolean, _arg_6:Boolean):void {
            width_ = _arg_1;
            height_ = _arg_2;
            name_ = _arg_3;
            back_ = _arg_4;
            allowPlayerTeleport_ = _arg_5;
            showDisplays_ = _arg_6;
            this.forceSoftwareRenderCheck(name_);
        }
    
        private function forceSoftwareRenderCheck(_arg_1:String):void {
            forceSoftwareRender = ((!((this.forceSoftwareMap[_arg_1] == null))) || ((WebMain.STAGE.stage3Ds[0].context3D == null)));
        }
    
        override public function initialize():void {
            squares_.length = (width_ * height_);
            background_ = Background.getBackground(back_);
            if (background_ != null) {
                addChild(background_);
            }
            addChild(map_);
            addChild(hurtOverlay_);
            addChild(gradientOverlay_);
            addChild(mapOverlay_);
            addChild(partyOverlay_);
            isPetYard = (name_.substr(0, 8) == "Pet Yard");
        }
    
        override public function dispose():void {
            var _local_1:Square;
            var _local_2:GameObject;
            var _local_3:BasicObject;
            gs_ = null;
            background_ = null;
            map_ = null;
            hurtOverlay_ = null;
            gradientOverlay_ = null;
            mapOverlay_ = null;
            partyOverlay_ = null;
            for each (_local_1 in squareList_) {
                _local_1.dispose();
            }
            squareList_.length = 0;
            squareList_ = null;
            squares_.length = 0;
            squares_ = null;
            for each (_local_2 in goDict_) {
                _local_2.dispose();
            }
            goDict_ = null;
            for each (_local_3 in boDict_) {
                _local_3.dispose();
            }
            boDict_ = null;
            merchLookup_ = null;
            player_ = null;
            party_ = null;
            quest_ = null;
            this.objsToAdd_ = null;
            thi*****sToRemove_ = null;
            TextureFactory.disposeTextures();
            GraphicsFillExtra.dispose();
            Program3DFactory.getInstance().dispose();
        }
    
        override public function update(_arg_1:int, _arg_2:int):void {
            var _local_3:BasicObject;
            var _local_4:int;
            this.inUpdate_ = true;
            for each (_local_3 in goDict_) {
                if (!_local_3.update(_arg_1, _arg_2)) {
                    thi*****sToRemove_.push(_local_3.objectId_);
                }
            }
            for each (_local_3 in boDict_) {
                if (!_local_3.update(_arg_1, _arg_2)) {
                    thi*****sToRemove_.push(_local_3.objectId_);
                }
            }
            this.inUpdate_ = false;
            for each (_local_3 in this.objsToAdd_) {
                this.internalAddObj(_local_3);
            }
            this.objsToAdd_.length = 0;
            for each (_local_4 in thi*****sToRemove_) {
                this.internalRemoveObj(_local_4);
            }
            thi*****sToRemove_.length = 0;
            party_.update(_arg_1, _arg_2);
        }
    
        override public function pSTopW(_arg_1:Number, _arg_2:Number):Point {
            var _local_3:Square;
            for each (_local_3 in this.visibleSquares_) {
                if (((!((_local_3.faces_.length == 0))) && (_local_3.faces_[0].face_.contains(_arg_1, _arg_2)))) {
                    return (new Point(_local_3.center_.x, _local_3.center_.y));
                }
            }
            return (null);
        }
    
        override public function setGroundTile(_arg_1:int, _arg_2:int, _arg_3:uint):void {
            var _local_8:int;
            var _local_9:int;
            var _local_10:Square;
            var _local_4:Square = this.getSquare(_arg_1, _arg_2);
            _local_4.setTileType(_arg_3);
            var _local_5:int = (((_arg_1 < (width_ - 1))) ? (_arg_1 + 1) : _arg_1);
            var _local_6:int = (((_arg_2 < (height_ - 1))) ? (_arg_2 + 1) : _arg_2);
            var _local_7:int = (((_arg_1 > 0)) ? (_arg_1 - 1) : _arg_1);
            while (_local_7 <= _local_5) {
                _local_8 = (((_arg_2 > 0)) ? (_arg_2 - 1) : _arg_2);
                while (_local_8 <= _local_6) {
                    _local_9 = (_local_7 + (_local_8 * width_));
                    _local_10 = squares_[_local_9];
                    if (((!((_local_10 == null))) && (((_local_10.props_.hasEdge_) || (!((_local_10.tileType_ == _arg_3))))))) {
                        _local_10.faces_.length = 0;
                    }
                    _local_8++;
                }
                _local_7++;
            }
        }
    
        override public function addObj(_arg_1:BasicObject, _arg_2:Number, _arg_3:Number):void {
            _arg_1.x_ = _arg_2;
            _arg_1.y_ = _arg_3;
            if ((_arg_1 is ParticleEffect)) {
                (_arg_1 as ParticleEffect).reducedDrawEnabled = !(Parameters.data_.particleEffect);
            }
            if (this.inUpdate_) {
                this.objsToAdd_.push(_arg_1);
            }
            else {
                this.internalAddObj(_arg_1);
            }
        }
    
        public function internalAddObj(_arg_1:BasicObject):void {
            if (!_arg_1.addTo(this, _arg_1.x_, _arg_1.y_)) {
                return;
            }
            var _local_2:Dictionary = (((_arg_1 is GameObject)) ? goDict_ : boDict_);
            if (_local_2[_arg_1.objectId_] != null) {
                if (!isPetYard) {
                    return;
                }
            }
            _local_2[_arg_1.objectId_] = _arg_1;
        }
    
        override public function removeObj(_arg_1:int):void {
            if (this.inUpdate_) {
                thi*****sToRemove_.push(_arg_1);
            }
            else {
                this.internalRemoveObj(_arg_1);
            }
        }
    
        public function internalRemoveObj(_arg_1:int):void {
            var _local_2:Dictionary = goDict_;
            var _local_3:BasicObject = _local_2[_arg_1];
            if (_local_3 == null) {
                _local_2 = boDict_;
                _local_3 = _local_2[_arg_1];
                if (_local_3 == null) {
                    return;
                }
            }
            _local_3.removeFromMap();
            delete _local_2[_arg_1];
        }
    
        public function getSquare(_arg_1:Number, _arg_2:Number):Square {
            if ((((((((_arg_1 < 0)) || ((_arg_1 >= width_)))) || ((_arg_2 < 0)))) || ((_arg_2 >= height_)))) {
                return (null);
            }
            var _local_3:int = (int(_arg_1) + (int(_arg_2) * width_));
            var _local_4:Square = squares_[_local_3];
            if (_local_4 == null) {
                _local_4 = new Square(this, int(_arg_1), int(_arg_2));
                squares_[_local_3] = _local_4;
                squareList_.push(_local_4);
            }
            return (_local_4);
        }
    
        public function lookupSquare(_arg_1:int, _arg_2:int):Square {
            if ((((((((_arg_1 < 0)) || ((_arg_1 >= width_)))) || ((_arg_2 < 0)))) || ((_arg_2 >= height_)))) {
                return (null);
            }
            return (squares_[(_arg_1 + (_arg_2 * width_))]);
        }
    
        override public function draw(_arg_1:Camera, _arg_2:int):void {
            var _local_6:Square;
            var _local_13:GameObject;
            var _local_14:BasicObject;
            var _local_15:int;
            var _local_16:Number;
            var _local_17:Number;
            var _local_18:Number;
            var _local_19:Number;
            var _local_20:Number;
            var _local_21:uint;
            var _local_22:Render3D;
            var _local_23:int;
            var _local_24:Array;
            var _local_25:Number;
            if (wasLastFrameGpu != Parameters.isGpuRender()) {
                if ((((((wasLastFrameGpu == true)) && (!((WebMain.STAGE.stage3Ds[0].context3D == null))))) && (!(((!((WebMain.STAGE.stage3Ds[0].context3D == null))) && (!((WebMain.STAGE.stage3Ds[0].context3D.driverInfo.toLowerCase().indexOf("disposed") == -1)))))))) {
                    WebMain.STAGE.stage3Ds[0].context3D.clear();
                    WebMain.STAGE.stage3Ds[0].context3D.present();
                }
                else {
                    map_.graphics.clear();
                }
                signalRenderSwitch.dispatch(wasLastFrameGpu);
                wasLastFrameGpu = Parameters.isGpuRender();
            }
            var _local_3:Rectangle = _arg_1.clipRect_;
            if (((Parameters.data_.fullscreenMod) && (!(this.isBackground)))){
    		this.scaleX = (600 / (Parameters.data_.mscale * 50));
    		this.scaleY = (600 / (Parameters.data_.mscale * 50));
    		x = ((-(_local3.x) * 600) / (Parameters.data_.mscale * 50));
    		y = ((-(_local3.y) * 600) / (Parameters.data_.mscale * 50));
    		}
            x = -(_local_3.x);
            y = -(_local_3.y);
            var _local_4:Number = ((-(_local_3.y) - (_local_3.height / 2)) / 50);
            var _local_5:Point = new Point((_arg_1.x_ + (_local_4 * Math.cos((_arg_1.angleRad_ - (Math.PI / 2))))), (_arg_1.y_ + (_local_4 * Math.sin((_arg_1.angleRad_ - (Math.PI / 2))))));
            if (background_ != null) {
                background_.draw(_arg_1, _arg_2);
            }
            this.visible_.length = 0;
            this.visibleUnder_.length = 0;
            this.visibleSquares_.length = 0;
            this.topSquares_.length = 0;
            var _local_7:int = _arg_1.maxDist_;
            var _local_8:int = Math.max(0, (_local_5.x - _local_7));
            var _local_9:int = Math.min((width_ - 1), (_local_5.x + _local_7));
            var _local_10:int = Math.max(0, (_local_5.y - _local_7));
            var _local_11:int = Math.min((height_ - 1), (_local_5.y + _local_7));
            this.graphicsData_.length = 0;
            this.graphicsDataStageSoftware_.length = 0;
            this.graphicsData3d_.length = 0;
            var _local_12:int = _local_8;
            while (_local_12 <= _local_9) {
                _local_15 = _local_10;
                while (_local_15 <= _local_11) {
                    _local_6 = squares_[(_local_12 + (_local_15 * width_))];
                    if (_local_6 != null) {
                        _local_16 = (_local_5.x - _local_6.center_.x);
                        _local_17 = (_local_5.y - _local_6.center_.y);
                        _local_18 = ((_local_16 * _local_16) + (_local_17 * _local_17));
                        if (_local_18 <= _arg_1.maxDistSq_) {
                            _local_6.lastVisible_ = _arg_2;
                            _local_6.draw(this.graphicsData_, _arg_1, _arg_2);
                            this.visibleSquares_.push(_local_6);
                            if (_local_6.topFace_ != null) {
                                this.topSquares_.push(_local_6);
                            }
                        }
                    }
                    _local_15++;
                }
                _local_12++;
            }
            for each (_local_13 in goDict_) {
                _local_13.drawn_ = false;
                if (!_local_13.dead_) {
                    _local_6 = _local_13.square_;
                    if (!(((_local_6 == null)) || (!((_local_6.lastVisible_ == _arg_2))))) {
                        _local_13.drawn_ = true;
                        _local_13.computeSortVal(_arg_1);
                        if (_local_13.props_.drawUnder_) {
                            if (_local_13.props_.drawOnGround_) {
                                _local_13.draw(this.graphicsData_, _arg_1, _arg_2);
                            }
                            else {
                                this.visibleUnder_.push(_local_13);
                            }
                        }
                        else {
                            this.visible_.push(_local_13);
                        }
                    }
                }
            }
            for each (_local_14 in boDict_) {
                _local_14.drawn_ = false;
                _local_6 = _local_14.square_;
                if (!(((_local_6 == null)) || (!((_local_6.lastVisible_ == _arg_2))))) {
                    _local_14.drawn_ = true;
                    _local_14.computeSortVal(_arg_1);
                    this.visible_.push(_local_14);
                }
            }
            if (this.visibleUnder_.length > 0) {
                this.visibleUnder_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
                for each (_local_14 in this.visibleUnder_) {
                    _local_14.draw(this.graphicsData_, _arg_1, _arg_2);
                }
            }
            this.visible_.sortOn(VISIBLE_SORT_FIELDS, VISIBLE_SORT_PARAMS);
            if (Parameters.data_.drawShadows) {
                for each (_local_14 in this.visible_) {
                    if (_local_14.hasShadow_) {
                        _local_14.drawShadow(this.graphicsData_, _arg_1, _arg_2);
                    }
                }
            }
            for each (_local_14 in this.visible_) {
                _local_14.draw(this.graphicsData_, _arg_1, _arg_2);
                if (Parameters.isGpuRender()) {
                    _local_14.draw3d(this.graphicsData3d_);
                }
            }
            if (this.topSquares_.length > 0) {
                for each (_local_6 in this.topSquares_) {
                    _local_6.drawTop(this.graphicsData_, _arg_1, _arg_2);
                }
            }
            if (((((!((player_ == null))) && ((player_.breath_ >= 0)))) && ((player_.breath_ < Parameters.BREATH_THRESH)))) {
                _local_19 = ((Parameters.BREATH_THRESH - player_.breath_) / Parameters.BREATH_THRESH);
                _local_20 = (Math.abs(Math.sin((_arg_2 / 300))) * 0.75);
                BREATH_CT.alphaMultiplier = (_local_19 * _local_20);
                hurtOverlay_.transform.colorTransform = BREATH_CT;
                hurtOverlay_.visible = true;
                hurtOverlay_.x = _local_3.left;
                hurtOverlay_.y = _local_3.top;
            }
            else {
                hurtOverlay_.visible = false;
            }
            if (((!((player_ == null))) && (!(Parameters.screenShotMode_)))) {
                gradientOverlay_.visible = true;
                gradientOverlay_.x = (_local_3.right - 10);
                gradientOverlay_.y = _local_3.top;
            }
            else {
                gradientOverlay_.visible = false;
            }
            if (((Parameters.isGpuRender()) && (Renderer.inGame))) {
                _local_21 = this.getFilterIndex();
                _local_22 = StaticInjectorContext.getInjector().getInstance(Render3D);
                _local_22.dispatch(this.graphicsData_, this.graphicsData3d_, width_, height_, _arg_1, _local_21);
                _local_23 = 0;
                while (_local_23 < this.graphicsData_.length) {
                    if ((((this.graphicsData_[_local_23] is GraphicsBitmapFill)) && (GraphicsFillExtra.isSoftwareDraw(GraphicsBitmapFill(this.graphicsData_[_local_23]))))) {
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[_local_23]);
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 1)]);
                        this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 2)]);
                    }
                    else {
                        if ((((this.graphicsData_[_local_23] is GraphicsSolidFill)) && (GraphicsFillExtra.isSoftwareDrawSolid(GraphicsSolidFill(this.graphicsData_[_local_23]))))) {
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[_local_23]);
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 1)]);
                            this.graphicsDataStageSoftware_.push(this.graphicsData_[(_local_23 + 2)]);
                        }
                    }
                    _local_23++;
                }
                if (this.graphicsDataStageSoftware_.length > 0) {
                    map_.graphics.clear();
                    map_.graphics.drawGraphicsData(this.graphicsDataStageSoftware_);
                    if (this.lastSoftwareClear) {
                        this.lastSoftwareClear = false;
                    }
                }
                else {
                    if (!this.lastSoftwareClear) {
                        map_.graphics.clear();
                        this.lastSoftwareClear = true;
                    }
                }
                if ((_arg_2 % 149) == 0) {
                    GraphicsFillExtra.manageSize();
                }
            }
            else {
                map_.graphics.clear();
                map_.graphics.drawGraphicsData(this.graphicsData_);
            }
            map_.filters.length = 0;
            if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))) {
                _local_24 = [];
                if (player_.isDrunk()) {
                    _local_25 = (20 + (10 * Math.sin((_arg_2 / 1000))));
                    _local_24.push(new BlurFilter(_local_25, _local_25));
                }
                if (player_.isBlind()) {
                    _local_24.push(BLIND_FILTER);
                }
                map_.filters = _local_24;
            }
            else {
                if (map_.filters.length > 0) {
                    map_.filters = [];
                }
            }
            mapOverlay_.draw(_arg_1, _arg_2);
            partyOverlay_.draw(_arg_1, _arg_2);
            if (((player_) && (player_.isDarkness()))) {
                this.darkness.x = -300;
                this.darkness.y = ((Parameters.data_.centerOnPlayer) ? -525 : -515);
                this.darkness.alpha = 0.95;
                addChild(this.darkness);
            }
            else {
                if (contains(this.darkness)) {
                    removeChild(this.darkness);
                }
            }
        }
    
        private function getFilterIndex():uint {
            var _local_1:uint;
            if (((!((player_ == null))) && (!(((player_.condition_[ConditionEffect.CE_FIRST_BATCH] & ConditionEffect.MAP_FILTER_BITMASK) == 0))))) {
                if (player_.isPaused()) {
                    _local_1 = Renderer.STAGE3D_FILTER_PAUSE;
                }
                else {
                    if (player_.isBlind()) {
                        _local_1 = Renderer.STAGE3D_FILTER_BLIND;
                    }
                    else {
                        if (player_.isDrunk()) {
                            _local_1 = Renderer.STAGE3D_FILTER_DRUNK;
                        }
                    }
                }
            }
            return (_local_1);
        }
    
    
    }
    }//package com.company.assembleegameclient.map
    Obviously replace the **** with respective file names.

    - - - Updated - - -
    @Stone2405
    Well it gave even more errors - six. Three with RollingMeanLoopMonitor, two with _local3 and one with isBackground. Gonna give up i think.

Page 1 of 2 12 LastLast

Similar Threads

  1. [NR-Core] Map Scale command
    By Zolmex in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 12
    Last Post: 03-01-2018, 02:58 AM
  2. [FSOD] Lair of Draconis [MAP][BEHAVIOR][SETPIECES]
    By HGAEHaeheadhetdhtertherh in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 38
    Last Post: 06-18-2017, 02:53 PM
  3. [FSOD] + [AS3] How to change the map thats in the client
    By SeXZeFPS in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 16
    Last Post: 03-17-2017, 01:06 PM
  4. [Help Request] Maps/loading problem in editor FSOD
    By OGgurk in forum Realm of the Mad God Private Servers Help
    Replies: 0
    Last Post: 06-05-2016, 07:04 PM
  5. request: fullscreen without scaling
    By sha in forum Realm of the Mad God Hacks & Cheats
    Replies: 54
    Last Post: 08-26-2012, 05:10 AM