Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Plus Emulator] SmokeWeed Command

Newbie Spellweaver
Joined
Jan 15, 2017
Messages
24
Reaction score
4
Hello to all friends of Ragezone I am here to post you a command that I did.
well let's start!
Go to :
HabboHotel\Rooms\Chat\Commands\User
Create File , called :SmokeWeedCommand.cs

PHP:
http://pastebin.com/BH7ynvYT

And Go To CommandManager and add
PHP:
this.Register("smoke", new SmokeWeedCommand());



The command texts are translated in my language, I had no desire to translate them into English.
 
Newbie Spellweaver
Joined
Jan 15, 2017
Messages
24
Reaction score
4
HAHHAH, ​
 
Newbie Spellweaver
Joined
Jun 8, 2006
Messages
10
Reaction score
1
What a mistake you from?


Well, I copy the PHP code and put it in to the file I have to create. That SmokeWeedCommand.cs
Than I put the lines in commandmanager, but it won't work.
 
Newbie Spellweaver
Joined
Jan 15, 2017
Messages
24
Reaction score
4
  • namespace Plus.HabboHotel.Rooms.Chat.Commands.User
  • {
  • internal class SmokeWeedCommand : IChatCommand
  • {
  • public string PermissionRequired
  • {
  • get
  • {
  • return "command_smoke";
 
Newbie Spellweaver
Joined
Jun 8, 2006
Messages
10
Reaction score
1
I don't understand. I have this:

namespace Plus.HabboHotel.Rooms.Chat.Commands
{
public class CommandManager
{
/// <summary>
/// Command Prefix only applies to custom commands.
/// </summary>
private string _prefix = ":";

/// <summary>
/// Commands registered for use.
/// </summary>
private readonly Dictionary<string, IChatCommand> _commands;

/// <summary>
/// The default initializer for the CommandManager
/// </summary>
public CommandManager(string Prefix)
{
this._prefix = Prefix;
this._commands = new Dictionary<string, IChatCommand>();

this.RegisterVIP();
this.RegisterUser();
this.RegisterEvents();
this.RegisterModerator();
this.RegisterAdministrator();
}

/// <summary>
/// Request the text to parse and check for commands that need to be executed.
/// </summary>
/// <param name="Session">Session calling this method.</param>
/// <param name="Message">The message to parse.</param>
/// <returns>True if parsed or false if not.</returns>
public bool Parse(GameClient Session, string Message)
{
if (Session == null || Session.GetHabbo() == null || Session.GetHabbo().CurrentRoom == null)
return false;

if (!Message.StartsWith(_prefix))
return false;
 
Newbie Spellweaver
Joined
Jan 15, 2017
Messages
24
Reaction score
4
INSERT INTO `permissions_commands` VALUES ('command_smoke, '1', '0');
 
Junior Spellweaver
Joined
Nov 5, 2013
Messages
147
Reaction score
57
Funny idea but you could learn more about the language that you are coding and make a better code than this.

You don't know exactly what the Thread.Sleep function does, right?

You could learn what is a Thread too..





Try to know what you're writing and you'll be a great programmer :)
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
Why? HAHAHA
Thread.Sleep? I guess in the head of someone new, it seems like a good idea.

What you should be doing is either making a timer to handle each stage of the smoking command to send different messages, or:

Including a SmokingStage integer variable in the Habbo or RoomUser class and a double or DateTime variable to know when the next message is due, then incrementing the SmokingStage integer everytime the next message is sent. (That's how I do it)
 

u20

Newbie Spellweaver
Joined
Sep 27, 2016
Messages
26
Reaction score
5
Thread.Sleep(1000);
Thread.Sleep(2000);
Thread.Sleep(2000);
Thread.Sleep(2000);
Thread.Sleep(2000);
Thread.Sleep(2000);

Did you smoke weed when you created this:stupid:

Love u, btw he's italian, but me too.
You know.. italian..

OT: Roas great idea, bad execution.
 
Back
Top