SolvedHelp with adding mscale to fsod

Posts 1–9 of 9 · Page 1 of 1
Help with adding mscale to fsod
alright so I'm starting a server and wanna know how to implement /mscale to the server

I know it has something to do with adding fullscreen or something but yeah any instructions to adding it will help a ton.

cheeerrrss
Quote Originally Posted by 9Gold View Post
alright so I'm starting a server and wanna know how to implement /mscale to the server

I know it has something to do with adding fullscreen or something but yeah any instructions to adding it will help a ton.

cheeerrrss
Just look at Nilly's Client code.
Quote Originally Posted by lkdjnfoskjednfblksjdfn View Post
Just look at Nilly's Client code.
which parts?
decompile nillys reborn client the latest version using as3 sorcerer. Take a 27.7.X2 Client Source, replace the com with the nillys reborn com and do the same with kabam. Search up mscale and copy all that crap you need. :P
Quote Originally Posted by ArtisanHD View Post
decompile nillys reborn client the latest version using as3 sorcerer. Take a 27.7.X2 Client Source, replace the com with the nillys reborn com and do the same with kabam. Search up mscale and copy all that crap you need. :P
Thats not how it works......

- - - Updated - - -

Quote Originally Posted by 9Gold View Post
which parts?
There is a leaked version of nilly's client somewhere on some github, where I think it could be in. Idk if the dude made the repo private. I have the client source somewhere on an old dusty harddrive xD
1. Go to Gamesprite.as and Find public function connect():void and replace with

Code:
 
public function connect():void
        {
            if (!this.isGameStarted)
            {
                this.isGameStarted = true;
                Renderer.inGame = true;
                gsc_.connect();
                this.idleWatcher_.start(this);
                lastUpdate_ = getTimer();
                stage.addEventListener(MoneyChangedEvent.MONEY_CHANGED, this.onMoneyChanged);
                stage.addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
                this.parent.parent.setChildIndex((this.parent.parent as Layers).top, 0);
                if (Parameters.data_.mscale == undefined)
                {
                    Parameters.data_.mscale = "1.0";
                    Parameters.save();
                };
                if (Parameters.data_.stageScale == undefined)
                {
                    Parameters.data_.stageScale = StageScaleMode.NO_SCALE;
                    Parameters.save();
                };
                if (Parameters.data_.uiscale == undefined)
                {
                    Parameters.data_.uiscale = true;
                    Parameters.save();
                };
                stage.scaleMode = Parameters.data_.stageScale;
                stage.addEventListener(Event.RESIZE, this.onScreenResize);
                stage.dispatchEvent(new Event(Event.RESIZE));
                LoopedProcess.addProcess(new LoopedCallback(100, this.updateNearestInteractive));
            };
        }
- - - Updated - - -

2. Go to Camera.as and find public function correctViewingArea(_arg_1:Boolean):Rectangle and replace with
Code:
 
public function correctViewingArea(_arg_1:Boolean):Rectangle
        {
            var _local_2:Number;
            var _local_3:Number;
            var _local_4:Number;
            var _local_5:Number;
            if (Parameters.data_.stageScale == StageScaleMode.NO_SCALE)
            {
                _local_2 = Parameters.data_.mscale;
                _local_3 = (WebMain.sWidth / _local_2);
                _local_4 = (WebMain.sHeight / _local_2);
                _local_5 = ((Parameters.data_.uiscale) ? (((200 * WebMain.sHeight) / 600) / _local_2) : (200 / _local_2));
                if (_arg_1)
                {
                    return (new Rectangle(-((_local_3 - _local_5) / 2), -((_local_4 * 13) / 24), _local_3, _local_4));
                };
                return (new Rectangle(-((_local_3 - _local_5) / 2), -((_local_4 * 3) / 4), _local_3, _local_4));
            };
            if (_arg_1)
            {
                return (new Rectangle(-300, -325, 600, 600));
            };
            return (new Rectangle(-300, -450, 600, 600));
        }
- - - Updated - - -

3. Go to Map.as and find public function correctMapView(_arg_1:Camera):Point and replace with

Code:
public function correctMapView(_arg_1:Camera):Point
        {
            var _local_2:Rectangle = _arg_1.clipRect_;
            if (stage.scaleMode == StageScaleMode.NO_SCALE)
            {
                x = ((-(_local_2.x) * 800) / (WebMain.sWidth / Parameters.data_.mscale));
                y = ((-(_local_2.y) * 600) / (WebMain.sHeight / Parameters.data_.mscale));
            }
            else
            {
                x = -(_local_2.x);
                y = -(_local_2.y);
            };
            var _local_3:Number = ((-(_local_2.x) - (_local_2.width / 2)) / 50);
            var _local_4:Number = ((-(_local_2.y) - (_local_2.height / 2)) / 50);
            var _local_5:Number = Math.sqrt(((_local_3 * _local_3) + (_local_4 * _local_4)));
            var _local_6:Number = ((_arg_1.angleRad_ - (Math.PI / 2)) - Math.atan2(_local_3, _local_4));
            return (new Point((_arg_1.x_ + (_local_5 * Math.cos(_local_6))), (_arg_1.y_ + (_local_5 * Math.sin(_local_6)))));
        }
- - - Updated - - -

4. Go to GameObjectArrow and add this or replace the old correctQuestNote

Code:
public function correctQuestNote(_arg_1:Rectangle):Rectangle
        {
            var _local_2:Rectangle = _arg_1.clone();
            if (stage.scaleMode == StageScaleMode.NO_SCALE)
            {
                if (Parameters.data_.uiscale)
                {
                    this.scaleY = (this.scaleX = ((((stage.stageWidth < stage.stageHeight) ? stage.stageWidth : stage.stageHeight) / Parameters.data_["mscale"]) / 600));
                }
                else
                {
                    this.scaleX = 1;
                    this.scaleY = 1;
                };
                _local_2.right = (_local_2.right - ((((800 - this.go_.map_.gs_.hudView.x) * stage.stageWidth) / Parameters.data_.mscale) / 800));
            }
            else
            {
                this.scaleX = (this.scaleY = 1);
            };
            return (_local_2);
        }
- - - Updated - - -

5. Go to ParseChatMessageCommand and add

Code:
if (_arg_1 == "/mscale")
            {
                this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME, (("Map Scale: " + Parameters.data_.mscale) + " - Usage: /mscale <any decimal number>.")));
                return (true);
            };
            var _local_3:Array = _arg_1.match("/mscale (\\d*\\.*\\d+)$");
            if (_local_3 != null)
            {
                Parameters.data_["mscale"] = _local_3[1];
                Parameters.save();
                _local_2.dispatchEvent(new Event(Event.RESIZE));
                this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME, ("Map Scale: " + _local_3[1])));
                return (true);
            };
Quote Originally Posted by TheRealLawFTW View Post
1. Go to Gamesprite.as and Find public function connect():void and replace with

Code:
 
public function connect():void
        {
            if (!this.isGameStarted)
            {
                this.isGameStarted = true;
                Renderer.inGame = true;
                gsc_.connect();
                this.idleWatcher_.start(this);
                lastUpdate_ = getTimer();
                stage.addEventListener(MoneyChangedEvent.MONEY_CHANGED, this.onMoneyChanged);
                stage.addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
                this.parent.parent.setChildIndex((this.parent.parent as Layers).top, 0);
                if (Parameters.data_.mscale == undefined)
                {
                    Parameters.data_.mscale = "1.0";
                    Parameters.save();
                };
                if (Parameters.data_.stageScale == undefined)
                {
                    Parameters.data_.stageScale = StageScaleMode.NO_SCALE;
                    Parameters.save();
                };
                if (Parameters.data_.uiscale == undefined)
                {
                    Parameters.data_.uiscale = true;
                    Parameters.save();
                };
                stage.scaleMode = Parameters.data_.stageScale;
                stage.addEventListener(Event.RESIZE, this.onScreenResize);
                stage.dispatchEvent(new Event(Event.RESIZE));
                LoopedProcess.addProcess(new LoopedCallback(100, this.updateNearestInteractive));
            };
        }
- - - Updated - - -

2. Go to Camera.as and find public function correctViewingArea(_arg_1:Boolean):Rectangle and replace with
Code:
 
public function correctViewingArea(_arg_1:Boolean):Rectangle
        {
            var _local_2:Number;
            var _local_3:Number;
            var _local_4:Number;
            var _local_5:Number;
            if (Parameters.data_.stageScale == StageScaleMode.NO_SCALE)
            {
                _local_2 = Parameters.data_.mscale;
                _local_3 = (WebMain.sWidth / _local_2);
                _local_4 = (WebMain.sHeight / _local_2);
                _local_5 = ((Parameters.data_.uiscale) ? (((200 * WebMain.sHeight) / 600) / _local_2) : (200 / _local_2));
                if (_arg_1)
                {
                    return (new Rectangle(-((_local_3 - _local_5) / 2), -((_local_4 * 13) / 24), _local_3, _local_4));
                };
                return (new Rectangle(-((_local_3 - _local_5) / 2), -((_local_4 * 3) / 4), _local_3, _local_4));
            };
            if (_arg_1)
            {
                return (new Rectangle(-300, -325, 600, 600));
            };
            return (new Rectangle(-300, -450, 600, 600));
        }
- - - Updated - - -

3. Go to Map.as and find public function correctMapView(_arg_1:Camera):Point and replace with

Code:
public function correctMapView(_arg_1:Camera):Point
        {
            var _local_2:Rectangle = _arg_1.clipRect_;
            if (stage.scaleMode == StageScaleMode.NO_SCALE)
            {
                x = ((-(_local_2.x) * 800) / (WebMain.sWidth / Parameters.data_.mscale));
                y = ((-(_local_2.y) * 600) / (WebMain.sHeight / Parameters.data_.mscale));
            }
            else
            {
                x = -(_local_2.x);
                y = -(_local_2.y);
            };
            var _local_3:Number = ((-(_local_2.x) - (_local_2.width / 2)) / 50);
            var _local_4:Number = ((-(_local_2.y) - (_local_2.height / 2)) / 50);
            var _local_5:Number = Math.sqrt(((_local_3 * _local_3) + (_local_4 * _local_4)));
            var _local_6:Number = ((_arg_1.angleRad_ - (Math.PI / 2)) - Math.atan2(_local_3, _local_4));
            return (new Point((_arg_1.x_ + (_local_5 * Math.cos(_local_6))), (_arg_1.y_ + (_local_5 * Math.sin(_local_6)))));
        }
- - - Updated - - -

4. Go to GameObjectArrow and add this or replace the old correctQuestNote

Code:
public function correctQuestNote(_arg_1:Rectangle):Rectangle
        {
            var _local_2:Rectangle = _arg_1.clone();
            if (stage.scaleMode == StageScaleMode.NO_SCALE)
            {
                if (Parameters.data_.uiscale)
                {
                    this.scaleY = (this.scaleX = ((((stage.stageWidth < stage.stageHeight) ? stage.stageWidth : stage.stageHeight) / Parameters.data_["mscale"]) / 600));
                }
                else
                {
                    this.scaleX = 1;
                    this.scaleY = 1;
                };
                _local_2.right = (_local_2.right - ((((800 - this.go_.map_.gs_.hudView.x) * stage.stageWidth) / Parameters.data_.mscale) / 800));
            }
            else
            {
                this.scaleX = (this.scaleY = 1);
            };
            return (_local_2);
        }
- - - Updated - - -

5. Go to ParseChatMessageCommand and add

Code:
if (_arg_1 == "/mscale")
            {
                this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME, (("Map Scale: " + Parameters.data_.mscale) + " - Usage: /mscale <any decimal number>.")));
                return (true);
            };
            var _local_3:Array = _arg_1.match("/mscale (\\d*\\.*\\d+)$");
            if (_local_3 != null)
            {
                Parameters.data_["mscale"] = _local_3[1];
                Parameters.save();
                _local_2.dispatchEvent(new Event(Event.RESIZE));
                this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME, ("Map Scale: " + _local_3[1])));
                return (true);
            };
I'm getting a problem with _arg_1 and _local_2 in ParseChatMessageCommand (its red)

Also getting red highlight with sWidth and sHeight
Quote Originally Posted by 9Gold View Post
I'm getting a problem with _arg_1 and _local_2 in ParseChatMessageCommand (its red)

Also getting red highlight with sWidth and sHeight
pretty sure _arg_1 has to be _arg1, and _local_2 has to be _local2
Quote Originally Posted by MikeRaarupBirk View Post
pretty sure _arg_1 has to be _arg1, and _local_2 has to be _local2
Oh right I'll try that now!
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us