• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Plus Emulator] SmokeWeed Command

Junior Spellweaver
Joined
Nov 5, 2013
Messages
147
Reaction score
57
Using RoomUserManager.OnCycle for a lot of things can have unforseen consequences (I was using it for many functions in an early RP emulator of mine and it cause rooms to crash frequently) so it's best to have a new thread to handle un-room related cycles :)
Yes, but, where? i mean, where this new Thread will be? inside the Habbo User class (Habbo.cs) or in the emu system class (Game.cs or other)?

And, i guess it's better to make worker/manager (idk how you call that xd, whatever) to handle timeout or cycle functions... That's what i'm doing on my emu. I'm using this method to handle the Teleport Interaction:
0d8ae4bdfc1fe45bb115dc77508da378 - [Plus Emulator] SmokeWeed Command - RaGEZONE Forums
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
Yes, but, where? i mean, where this new Thread will be? inside the Habbo User class (Habbo.cs) or in the emu system class (Game.cs or other)?

I have a Task that runs once a second for most RP functions in my emulator, located inside a Roleplay class which is inside the Habbo class.

(Habbo.Roleplay.PlayerTask)
 
Newbie Spellweaver
Joined
Jun 8, 2006
Messages
10
Reaction score
1
So, is there someone that can explain me how I get this to work?
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
12
Reaction score
1
I have a Task that runs once a second for most RP functions in my emulator, located inside a Roleplay class which is inside the Habbo class.

(Habbo.Roleplay.PlayerTask)

I'm very new to coding, and I use Thread.Sleep(2000); quite frequently. (In like 8 commands or so). would I even notice the difference if I changed it? I mean, ofc its better to do it the "right" way, but in terms of performance?
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
I'm very new to coding, and I use Thread.Sleep(2000); quite frequently. (In like 8 commands or so). would I even notice the difference if I changed it? I mean, ofc its better to do it the "right" way, but in terms of performance?
Yes you would notice a performance increase. If you got time when you read this, look up the disadvantages of using Thread.sleep.
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
12
Reaction score
1
Yes you would notice a performance increase. If you got time when you read this, look up the disadvantages of using Thread.sleep.
Yeah I read up on it and will change my code. Had no idea.. Thank you for pointing me in the right direction.
 
Newbie Spellweaver
Joined
Jan 15, 2017
Messages
24
Reaction score
4
Hello , Thank you very much , I'll take it how council :D
 
Junior Spellweaver
Joined
Jun 16, 2016
Messages
119
Reaction score
41
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.
I have this command a long time ago out ZiptoEMU, Credits to the makers from ziptoemu <3
 
Back
Top