[PlusEmu] Disable Command Sex
Hello everyone, soon they launched the sex command, but they launched anyway with no way to disable it or something, so I decided to create a way to disable it, after the user has disabled the command and it restarts its Client will not need to rewrite the command again because it will already be disabled, to revert and reuse the sex command normally as before just use the same command that used to disable it.
OBS: In spoilers they have printscreens.
To begin, open the file "Plus Emulator.sln".
Open the CommandManager file, which is located at:
HabboHotel/Rooms/Chat/Commands/CommandManager.cs
Look for this:
Code:
private void RegisterUser()
{
And add this:
Code:
this.Register("disablesex", new DisableSexCommand());
Go to HabboHotel/Rooms/Chat/Commands/User and create a new class called "DisableSexCommand.cs".
And add this inside the .cs file:
Code:
using Plus.Database.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Plus.HabboHotel.Rooms.Chat.Commands.User{
class DisableSexCommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_disable_sex"; }
} public string Parameters
{
get { return ""; }
} public string Description
{
get { return "Enables or disables the sex command."; }
}
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
Session.GetHabbo().AllowSex = !Session.GetHabbo().AllowSex;
Session.SendWhisper("You " + (Session.GetHabbo().AllowSex == true ? "allows" : "does not allow") + " the sex command.");
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.SetQuery("UPDATE `users` SET `allow_sex` = @AllowSex WHERE `id` = '" +
Session.GetHabbo().Id + "'");
dbClient.AddParameter("AllowSex",
PlusEnvironment.BoolToEnum(Session.GetHabbo().AllowSex));
dbClient.RunQuery();
}
}
}
}
Go to the file of your command .cs sex that is in:
HabboHotel/Rooms/Chat/Commands/User/Fun
For example mine is "SexCommand.cs".
Search for:
Code:
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
if (Params.Length == 1)
{
Session.SendWhisper("Enter the username of the person with whom you want to have sex.");
return;
}
And below add this:
Code:
if (!TargetUser.GetClient().GetHabbo().AllowSex && !Session.GetHabbo().GetPermissions().HasRight("sex"))
{
Session.SendWhisper("Oops, this user has disabled the sex command!");
return;
}
Go to HabboHotel/Users/Habbo.cs and add this code to line 80.
Code:
private bool _allowSex;
In the same file we will still look for this code:
Code:
int GOTWPoints, bool IgnoreInvites, double TimeMuted, double TradingLock, bool AllowGifts, int FriendBarState, bool DisableForcedEffects, bool AllowMimic, int VIPRank)
And we substitute for this:
Code:
int GOTWPoints, bool IgnoreInvites, double TimeMuted, double TradingLock, bool AllowGifts, int FriendBarState, bool DisableForcedEffects, bool AllowMimic, bool AllowSex, int VIPRank)
In the same file we still look for:
Code:
this._allowMimic = AllowMimic;
And we add this code below:
Code:
this._allowSex = AllowSex;
In the same file we still look for:
Code:
public bool AllowMimic
{
get { return this._allowMimic; }
set { this._allowMimic = value; }
}
And we add this code below:
Code:
public bool AllowSex
{
get { return this._allowSex; }
set { this._allowSex = value; }
}
Now we go to HabboHotel/Users/Authenticator/HabboFactory/Authenticator.cs, we search for "rank_vip" in this same file and add that behind it.
Code:
PlusEnvironment.EnumToBool(Row["allow_sex"].ToString()),
Let's go to HabboHotel/Users/UserDataManagement/UserDataFactory.cs and look for this:
Code:
"SELECT `id`,`username`,`rank`,`motto`,`look`,`gender`,`last_online`,`credits`,`activity_points`,`home_room`,`block_newfriends`,`hide_online`,`hide_inroom`,`vip`,`account_created`,`vip_points`,`machine_id`,`volume`,`chat_preference`,`focus_preference`, `pets_muted`,`bots_muted`,`advertising_report_blocked`,`last_change`,`gotw_points`,`ignore_invites`,`time_muted`,`allow_gifts`,`friend_bar_state`,`disable_forced_effects`,`allow_mimic`,`allow_sex`,`rank_vip` FROM `users` WHERE `auth_ticket` = @sso LIMIT 1"
And behind " `rank_vip` "we added this:
And to finish we look again for this:
Code:
SELECT `id`,`username`,`rank`,`motto`,`look`,`gender`,`last_online`,`credits`,`activity_points`,`home_room`,`block_newfriends`,`hide_online`,`hide_inroom`,`vip`,`account_created`,`vip_points`,`machine_id`,`volume`,`chat_preference`, `focus_preference`, `pets_muted`,`bots_muted`,`advertising_report_blocked`,`last_change`,`gotw_points`,`ignore_invites`,`time_muted`,`allow_gifts`,`friend_bar_state`,`disable_forced_effects`,`allow_mimic`,`rank_vip` FROM `users` WHERE `id` = @id LIMIT 1"
And do the same thing we had done before, which is to add allow_sex behind rank_vip.
To conclude with a golden key, run this SQL code:
Code:
ALTER TABLE `users`ADD COLUMN `allow_sex` ENUM('0','1') NOT NULL DEFAULT '1' AFTER `allow_mimic`;
Now we debug and test.
I'm sorry for my English, I'm Brazilian.
Hugs! :):
Re: [PlusEmu] Disable Command Sex
If I understand properly this is so people can't just walk up to you and rape you right?
Re: [PlusEmu] Disable Command Sex
Quote:
Originally Posted by
Jmandupree
If I understand properly this is so people can't just walk up to you and rape you right?
Yes that's right.
Re: [PlusEmu] Disable Command Sex
About sex command, do you mean the enable?
Sent from my iPhone using Tapatalk
Re: [PlusEmu] Disable Command Sex
Quote:
Originally Posted by
Paylee
About sex command, do you mean the enable?
Sent from my iPhone using Tapatalk
No, the command is to disable the sex
Re: [PlusEmu] Disable Command Sex
This is disturbing... and not to forget to mention that there actually is a "sex command"..
Sick people nowadays.
Re: [PlusEmu] Disable Command Sex
I know a faster way to disable the sex command => Just delete it.
Good release anyway :)
Re: [PlusEmu] Disable Command Sex
Quote:
Originally Posted by
Joopie
This is disturbing... and not to forget to mention that there actually is a "sex command"..
Sick people nowadays.
The amount of times people have asked me to add it to Arcturus is quite sad.
Re: [PlusEmu] Disable Command Sex
or you just do the simple thing and not add a command that basically promotes rape
Re: [PlusEmu] Disable Command Sex
Quote:
Originally Posted by
</Meap>
or you just do the simple thing and not add a command that basically promotes rape
In my RP emulator it's possible to get married and have sex only with the person you're married to. It's amusing to watch, however with the phrases I typed for the intercourse itself, I felt quite dirty.
In saying that, it's still funny as hell to see people getting arrested on a roleplay for indecent exposure.
Re: [PlusEmu] Disable Command Sex
Closed due to obvious reasons, I don't want it to escalate between 13yo's. Thanks for the fix tough.