Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Tutorials
[RP/ROLEPLAY] HOW TO EDIT COMMANDS IN THE EMU
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Gang67" data-source="post: 420807" data-attributes="member: 75598"><p><strong><u><span style="font-size: 22px">Explanation</span></u></strong></p><p><span style="font-size: 12px">I'm sure there are plenty of other tutorials on how to do this and I'm sure most people already know how to do this but some people don't. This may not be the best tutorial but I would just like to help any new people to the community. I will be using the flux files which many people currently use. If you have any issues then please comment below and I will help you out. I am using Visual Studio 2017 in this tutorial and it will be similar to other versions which you may be using. <span style="color: #ff0000">You may need some knowledge on C# depending on what you would like to do</span> but you can learn by online tutorials.</span></p><p><strong><u><span style="font-size: 22px">Requirements/Downloads</span></u></strong></p><p>[SPOILER="Downloads"]</p><p>FluxRP Emulator: <a href="https://mega.nz/#!MhIgVK7A!MAI_qm5J9WVnvz84CO-gr4zxkzZSeJgWnSZ8tWirH0k" target="_blank">https://mega.nz/#!MhIgVK7A!MAI_qm5J9WVnvz84CO-gr4zxkzZSeJgWnSZ8tWirH0k</a> </p><p>How to setup FluxRP Emulator: <a href="https://devbest.com/threads/rp-roleplay-how-to-make-a-habbo-rp.84235/" target="_blank">https://devbest.com/threads/rp-roleplay-how-to-make-a-habbo-rp.84235/</a></p><p>Visual Studio Community 2017: <a href="https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15" target="_blank">https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15</a></p><p>[/SPOILER]</p><p></p><p><strong><u><span style="font-size: 22px">Setting up Visual Studio</span></u></strong> </p><p>[SPOILER="Packages"]</p><p><span style="font-size: 12px"><strong>1.</strong> When you install the installer you should be prompted with this screen [<a href="http://prntscr.com/gyyxie" target="_blank">http://prntscr.com/gyyxie</a>] you must ensure that the '.NET desktop development' box is ticked. [<a href="http://prntscr.com/gyyxie" target="_blank">http://prntscr.com/gyyxie</a>]</span></p><p><span style="font-size: 12px"><strong>2.</strong> Click the install button in the bottom right [<a href="http://prntscr.com/gyyzw7" target="_blank">http://prntscr.com/gyyzw7</a>] (I already have it so it says Close for me)</span></p><p>[/SPOILER]</p><p></p><p><strong><u><span style="font-size: 22px">Opening up the Solution</span></u></strong></p><p><strong><u><span style="font-size: 22px">[SPOILER="Finding the file"][/SPOILER]</span>[SPOILER="Finding the file"][/spoiler]</u>[SPOILER="Finding the file"][/spoiler]</strong>[SPOILER="Finding the file"]</p><p><span style="font-size: 12px"><strong>1. </strong>You need to go to your emu file [<a href="http://prntscr.com/gyz0mf" target="_blank">http://prntscr.com/gyz0mf</a>]</span></p><p><span style="font-size: 12px"><strong>2.</strong> Open up the emu file and in it you should see 'Plus.sln' [<a href="http://prntscr.com/gyz0zp" target="_blank">http://prntscr.com/gyz0zp</a>] </span></p><p><span style="font-size: 12px"> It will take some time to open, just wait!</span></p><p><span style="font-size: 12px"> When it is fully loaded it should look like this: [<a href="http://prntscr.com/gyz21g" target="_blank">http://prntscr.com/gyz21g</a>] (May be a different colour)</span></p><p>[/SPOILER]<strong><u><span style="font-size: 22px"></span></u></strong></p><p><strong><u><span style="font-size: 22px">[SPOILER="Finding the command file"][/SPOILER]</span>[SPOILER="Finding the command file"][/spoiler]</u>[SPOILER="Finding the command file"][/spoiler]</strong>[SPOILER="Finding the command file"]</p><p><span style="font-size: 12px">Commands aren't just based inside the same files, some commands use timers which are based in a different folder. For now on you should only be editing commands and adding very small commands which don't involve things such as timers if you're new to this/C#. This may not be the best description as I myself is quite new to all this!</span></p><p><span style="font-size: 12px"><strong>1. </strong>On the right hand side you should see loads of folders, you need to open up 'HabboHotel' by double clicking it [<a href="http://prntscr.com/gyz3qx" target="_blank">http://prntscr.com/gyz3qx</a>]</span></p><p><span style="font-size: 12px"><strong>2. </strong>Inside the HabboHotel folder there should then be a 'Misc' folder, open it up by double clicking it [<a href="http://prntscr.com/gyz4ju" target="_blank">http://prntscr.com/gyz4ju</a>]</span></p><p><span style="font-size: 12px"><strong>3. </strong>Inside the Misc folder there should be a class (.cs) file called 'ChatCommandHandler', open it up by double clicking it [<a href="http://prntscr.com/gyz5o7" target="_blank">http://prntscr.com/gyz5o7</a>]</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px"><span style="color: #ff0000">ALTERNATIVE</span></span></p><p></p><p>Search for 'ChatCommandHandler' inside the search box [<a href="http://prntscr.com/gyz6oe" target="_blank">http://prntscr.com/gyz6oe</a>]</p><p>[/SPOILER]<strong><u><span style="font-size: 22px"></span></u></strong></p><p><strong><u><span style="font-size: 22px">Editing Commands (Little C# Lesson)</span></u></strong></p><p><span style="font-size: 12px">Firstly, as I mentioned before I am still learning myself so the things I may say some of you pros may know a better way of doing stuff etc. But just remember I am new myself, thank you.</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px">[SPOILER="Searching through the file"]</span></p><p><span style="font-size: 12px">To search through the file you can do [CTRL + F] and enter what you would like to search [<a href="http://prntscr.com/gyz88b" target="_blank">http://prntscr.com/gyz88b</a>]</span></p><p><span style="font-size: 12px">[/SPOILER]</span></p><p><span style="font-size: 12px">[SPOILER="Alternate ways to say the commands"]</span></p><p><span style="font-size: 12px">Summary: To add a new way to say the command you use the case "": function, a good way of looking at it is as an if statement. So, case ("cmnds") would be like saying if the user enters cmnds</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px">You can add/remove ways to say the commands. For example for the command :stun, we could also add another way to say it by saying :taser and it'd do the same thing</span></p><p><span style="font-size: 12px">To do this you need to firstly, find the command you want to edit. For this example I will be using :commands [<a href="http://prntscr.com/gyz98i" target="_blank">http://prntscr.com/gyz98i</a>]</span></p><p><span style="font-size: 12px">We will be focusing on the section that says case "[command]": [<a href="http://prntscr.com/gyz9oy" target="_blank">http://prntscr.com/gyz9oy</a>]</span></p><p><span style="font-size: 12px">If I would like to add another way to say :commands I could add something such as :cmnds, to do this I would add a new case below the current ones</span></p><p><span style="font-size: 12px"><strong>This is the original:</strong></span></p><p><span style="font-size: 12px"><strong>[CODE] #region :commands (INCOMPLETE)</strong></span></p><p><span style="font-size: 12px"><strong> case "commands":</strong></span></p><p><span style="font-size: 12px"><strong> case "cmds":[/CODE]</strong></span></p><p><span style="font-size: 12px"><strong></strong></span></p><p><span style="font-size: 12px"><strong></strong></span></p><p><span style="font-size: 12px"><strong>This is my edit to add the ability to add :cmnds [<a href="http://prntscr.com/gyzbiy" target="_blank">http://prntscr.com/gyzbiy</a>]</strong></span></p><p><span style="font-size: 12px"><strong></strong></span></p><p><span style="font-size: 12px"><strong>[CODE] #region :commands (INCOMPLETE)</strong></span></p><p><span style="font-size: 12px"><strong> case "commands":</strong></span></p><p><span style="font-size: 12px"><strong> case "cmds":</strong></span></p><p><span style="font-size: 12px"><strong> case "cmnds":[/CODE]</strong></span></p><p><span style="font-size: 12px"><strong></strong></span></p><p><span style="font-size: 12px"><strong><span style="color: #ff0000">When you're doing this do not forgot to add the speech marks and also the colon at the end</span></strong></span></p><p><span style="font-size: 12px"><strong></strong></span></p><p><span style="font-size: 12px">[/SPOILER]</span></p><p><span style="font-size: 12px">[SPOILER="Editing If statements/conditions"]</span></p><p><span style="font-size: 12px">If statements are used to make programs robust (not break-able) so for example if I had a user in cuffs, without IF statements the user would be able to still walk and anyone would be able to cuff anyone, whether they're stunned or not.</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px">What this means [<a href="http://prntscr.com/gyzdt7" target="_blank">http://prntscr.com/gyzdt7</a>]:</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px">[CODE] bool isclose = false;</span></p><p><span style="font-size: 12px">[/CODE]</span></p><p><span style="font-size: 12px">means 'The user is not close'</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px">[CODE] if (!JobManager.validJob(Session.GetRoleplay().JobId, Session.GetRoleplay().JobRank))</span></p><p><span style="font-size: 12px">[/CODE]</span></p><p><span style="font-size: 12px">means 'If the users Job is not the valid job id'</span></p><p><span style="font-size: 12px">[CODE] Session.SendWhisper("Your job cannot do this!", false, 34);</span></p><p><span style="font-size: 12px">[/CODE]</span></p><p><span style="font-size: 12px">means 'Send the user a whisper saying "Your job cannot do this" '</span></p><p><span style="font-size: 12px">[CODE] if (!Session.GetRoleplay().JobHasRights("police")</span></p><p><span style="font-size: 12px"> && !Session.GetRoleplay().JobHasRights("gov")</span></p><p><span style="font-size: 12px"> && !Session.GetRoleplay().JobHasRights("swat"))</span></p><p><span style="font-size: 12px"> Session.SendWhisper("Your job cannot do this!");[/CODE]</span></p><p><span style="font-size: 12px">means 'If the session does not have Job Rights (police) and/or does not have job rights (gov) and/or doesnt have job rights (swat), send the user a whisper saying "Your job cannot do this!"</span></p><p><span style="font-size: 12px">[/SPOILER]</span></p><p><strong><u><span style="font-size: 22px">Debugging</span></u></strong></p><p><strong><u><span style="font-size: 22px">[SPOILER="Debugging"][/SPOILER]</span>[SPOILER="Debugging"][/spoiler]</u>[SPOILER="Debugging"][/spoiler]</strong>[SPOILER="Debugging"]</p><p><span style="font-size: 12px">You can not just simply save the emu file and expect it to update, you must start debugging. This is very easy. To do this you need to click 'Start' in the top bar [<a href="http://prntscr.com/gyzgtr" target="_blank">http://prntscr.com/gyzgtr</a>]</span></p><p><span style="font-size: 12px">Allow it to debug for about 10 seconds then you can stop the debugging [<a href="http://prntscr.com/gyzhp5" target="_blank">http://prntscr.com/gyzhp5</a>]</span></p><p><span style="font-size: 12px">If you have an error it will not allow you to debug. Also if you try editing the code while you're debugging at the same time it wont let you. As well as if you try debugging whilst your original emu is open you'll recieve an error</span></p><p><span style="font-size: 12px"></span>[/SPOILER]<span style="font-size: 12px"></span></p><p><span style="font-size: 12px">This isn't the best of content as it doesn't provide how to add commands etc. If you would like more detail, please comment exactly what you would like to know! Thank you.</span></p><p><span style="font-size: 12px">Previous thread (How to make a Habbo RP): <a href="https://devbest.com/threads/rp-roleplay-how-to-make-a-habbo-rp.84235/" target="_blank">https://devbest.com/threads/rp-roleplay-how-to-make-a-habbo-rp.84235/</a></span></p><p><span style="font-size: 12px"><span style="color: #00ffff">Credits to those who provided the FluxRP Files ([USER=66757]@HendeR[/USER])</span></span></p><p><span style="font-size: 12px"><span style="color: #000000">-Abdi</span></span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px"></span></p><p></p><p></p><p></p></blockquote><p></p>
[QUOTE="Gang67, post: 420807, member: 75598"] [B][U][SIZE=6]Explanation[/SIZE][/U][/B] [SIZE=3]I'm sure there are plenty of other tutorials on how to do this and I'm sure most people already know how to do this but some people don't. This may not be the best tutorial but I would just like to help any new people to the community. I will be using the flux files which many people currently use. If you have any issues then please comment below and I will help you out. I am using Visual Studio 2017 in this tutorial and it will be similar to other versions which you may be using. [COLOR=#ff0000]You may need some knowledge on C# depending on what you would like to do[/COLOR] but you can learn by online tutorials.[/SIZE] [B][U][SIZE=6]Requirements/Downloads[/SIZE][/U][/B] [SPOILER="Downloads"] FluxRP Emulator: [URL]https://mega.nz/#!MhIgVK7A!MAI_qm5J9WVnvz84CO-gr4zxkzZSeJgWnSZ8tWirH0k[/URL] How to setup FluxRP Emulator: [URL]https://devbest.com/threads/rp-roleplay-how-to-make-a-habbo-rp.84235/[/URL] Visual Studio Community 2017: [URL]https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15[/URL] [/SPOILER] [B][U][SIZE=6]Setting up Visual Studio[/SIZE][/U][/B] [SPOILER="Packages"] [SIZE=3][B]1.[/B] When you install the installer you should be prompted with this screen [[URL]http://prntscr.com/gyyxie[/URL]] you must ensure that the '.NET desktop development' box is ticked. [[URL]http://prntscr.com/gyyxie[/URL]] [B]2.[/B] Click the install button in the bottom right [[URL]http://prntscr.com/gyyzw7[/URL]] (I already have it so it says Close for me)[/SIZE] [/SPOILER] [B][U][SIZE=6]Opening up the Solution [SPOILER="Finding the file"][/SPOILER][/SIZE][SPOILER="Finding the file"][/spoiler][/U][SPOILER="Finding the file"][/spoiler][/B][SPOILER="Finding the file"] [SIZE=3][B]1. [/B]You need to go to your emu file [[URL]http://prntscr.com/gyz0mf[/URL]] [B]2.[/B] Open up the emu file and in it you should see 'Plus.sln' [[URL]http://prntscr.com/gyz0zp[/URL]] It will take some time to open, just wait! When it is fully loaded it should look like this: [[URL]http://prntscr.com/gyz21g[/URL]] (May be a different colour)[/SIZE] [B][U][SIZE=6][/SIZE][/U][/B][/SPOILER][B][U][SIZE=6] [SPOILER="Finding the command file"][/SPOILER][/SIZE][SPOILER="Finding the command file"][/spoiler][/U][SPOILER="Finding the command file"][/spoiler][/B][SPOILER="Finding the command file"] [SIZE=3]Commands aren't just based inside the same files, some commands use timers which are based in a different folder. For now on you should only be editing commands and adding very small commands which don't involve things such as timers if you're new to this/C#. This may not be the best description as I myself is quite new to all this! [B]1. [/B]On the right hand side you should see loads of folders, you need to open up 'HabboHotel' by double clicking it [[URL]http://prntscr.com/gyz3qx[/URL]] [B]2. [/B]Inside the HabboHotel folder there should then be a 'Misc' folder, open it up by double clicking it [[URL]http://prntscr.com/gyz4ju[/URL]] [B]3. [/B]Inside the Misc folder there should be a class (.cs) file called 'ChatCommandHandler', open it up by double clicking it [[URL]http://prntscr.com/gyz5o7[/URL]] [COLOR=#ff0000]ALTERNATIVE[/COLOR][/SIZE] Search for 'ChatCommandHandler' inside the search box [[URL]http://prntscr.com/gyz6oe[/URL]] [B][U][SIZE=6][/SIZE][/U][/B][/SPOILER][B][U][SIZE=6] Editing Commands (Little C# Lesson)[/SIZE][/U][/B] [SIZE=3]Firstly, as I mentioned before I am still learning myself so the things I may say some of you pros may know a better way of doing stuff etc. But just remember I am new myself, thank you. [SPOILER="Searching through the file"] To search through the file you can do [CTRL + F] and enter what you would like to search [[URL]http://prntscr.com/gyz88b[/URL]] [/SPOILER] [SPOILER="Alternate ways to say the commands"] Summary: To add a new way to say the command you use the case "": function, a good way of looking at it is as an if statement. So, case ("cmnds") would be like saying if the user enters cmnds You can add/remove ways to say the commands. For example for the command :stun, we could also add another way to say it by saying :taser and it'd do the same thing To do this you need to firstly, find the command you want to edit. For this example I will be using :commands [[URL]http://prntscr.com/gyz98i[/URL]] We will be focusing on the section that says case "[command]": [[URL]http://prntscr.com/gyz9oy[/URL]] If I would like to add another way to say :commands I could add something such as :cmnds, to do this I would add a new case below the current ones [B]This is the original:[/B] [B][CODE] #region :commands (INCOMPLETE) case "commands": case "cmds":[/CODE] This is my edit to add the ability to add :cmnds [[URL]http://prntscr.com/gyzbiy[/URL]] [CODE] #region :commands (INCOMPLETE) case "commands": case "cmds": case "cmnds":[/CODE] [COLOR=#ff0000]When you're doing this do not forgot to add the speech marks and also the colon at the end[/COLOR] [/B] [/SPOILER] [SPOILER="Editing If statements/conditions"] If statements are used to make programs robust (not break-able) so for example if I had a user in cuffs, without IF statements the user would be able to still walk and anyone would be able to cuff anyone, whether they're stunned or not. What this means [[URL]http://prntscr.com/gyzdt7[/URL]]: [CODE] bool isclose = false; [/CODE] means 'The user is not close' [CODE] if (!JobManager.validJob(Session.GetRoleplay().JobId, Session.GetRoleplay().JobRank)) [/CODE] means 'If the users Job is not the valid job id' [CODE] Session.SendWhisper("Your job cannot do this!", false, 34); [/CODE] means 'Send the user a whisper saying "Your job cannot do this" ' [CODE] if (!Session.GetRoleplay().JobHasRights("police") && !Session.GetRoleplay().JobHasRights("gov") && !Session.GetRoleplay().JobHasRights("swat")) Session.SendWhisper("Your job cannot do this!");[/CODE] means 'If the session does not have Job Rights (police) and/or does not have job rights (gov) and/or doesnt have job rights (swat), send the user a whisper saying "Your job cannot do this!" [/SPOILER][/SIZE] [B][U][SIZE=6]Debugging [SPOILER="Debugging"][/SPOILER][/SIZE][SPOILER="Debugging"][/spoiler][/U][SPOILER="Debugging"][/spoiler][/B][SPOILER="Debugging"] [SIZE=3]You can not just simply save the emu file and expect it to update, you must start debugging. This is very easy. To do this you need to click 'Start' in the top bar [[URL]http://prntscr.com/gyzgtr[/URL]] Allow it to debug for about 10 seconds then you can stop the debugging [[URL]http://prntscr.com/gyzhp5[/URL]] If you have an error it will not allow you to debug. Also if you try editing the code while you're debugging at the same time it wont let you. As well as if you try debugging whilst your original emu is open you'll recieve an error [/SIZE][/SPOILER][SIZE=3] This isn't the best of content as it doesn't provide how to add commands etc. If you would like more detail, please comment exactly what you would like to know! Thank you. Previous thread (How to make a Habbo RP): [URL]https://devbest.com/threads/rp-roleplay-how-to-make-a-habbo-rp.84235/[/URL] [COLOR=#00ffff]Credits to those who provided the FluxRP Files ([USER=66757]@HendeR[/USER])[/COLOR] [COLOR=#000000]-Abdi[/COLOR] [/SIZE] [B][U][SIZE=6][/SIZE][/U][/B] [B][U][SIZE=6][/SIZE][/U][/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
[RP/ROLEPLAY] HOW TO EDIT COMMANDS IN THE EMU
Top