Jaden
not so active
The way it was implemented on it's release followed many bad practice methods, so I'll just release mine from a while back cause y not?
(I put it in a folder called Builder under the namespace Plus.HabboHotel.Roleplay.Commands.Builder just change that to where the files you create are located.)
SetStackHeightCommand.cs
ClearStackHeightCommand.cs
Add in the Register function corresponding to the folder you put it in.
Anywhere in your Habbo.cs (Habbo class)
Find in your RoomItemHandling.cs
Add under it
Debug/compile and then you're set.
(I put it in a folder called Builder under the namespace Plus.HabboHotel.Roleplay.Commands.Builder just change that to where the files you create are located.)
SetStackHeightCommand.cs
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plus.HabboHotel.GameClients;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Chat.Commands;
namespace Plus.HabboHotel.Roleplay.Commands.Builder
{
internal sealed class SetStackHeightCommand : IChatCommand
{
public string PermissionRequired => "";
public string Parameters => "%height%";
public string Description => "something.";
public void Execute(GameClient session, Room room, string[] Params)
{
if (Params.Length == 1)
return;
if (!double.TryParse(Params[1], out session.GetHabbo().StackHeight))
session.SendWhisper("Please enter a valid integer or double value.");
}
}
}
ClearStackHeightCommand.cs
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plus.HabboHotel.GameClients;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Chat.Commands;
namespace Plus.HabboHotel.Roleplay.Commands.Builder
{
internal sealed class ClearStackHeightCommand : IChatCommand
{
public string PermissionRequired => "";
public string Parameters => "";
public string Description => "something.";
public void Execute(GameClient session, Room room, string[] Params)
{
session.GetHabbo().StackHeight = 0;
}
}
}
Add in the Register function corresponding to the folder you put it in.
Code:
Register("setsh", new SetStackHeightCommand());
Register("clearsh", new ClearStackHeightCommand());
Anywhere in your Habbo.cs (Habbo class)
Code:
public double StackHeight;
Find in your RoomItemHandling.cs
Code:
Double newZ = _room.GetGameMap().Model.SqFloorHeight[newX, newY];
Add under it
Code:
if (Math.Abs(Session.GetHabbo().StackHeight) > Math.Pow(1, -9))
newZ = Session.GetHabbo().StackHeight;
Debug/compile and then you're set.