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 Releases
Server Releases
Plus Emu Commands
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="Altercationz" data-source="post: 371876" data-attributes="member: 59038"><p>due to high demand i've coded these for sledmore's plus edit.</p><p>Enjoy.</p><p>[CODE]</p><p>using System;</p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Chat;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun</p><p>{</p><p> class Hug : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_hug"; }</p><p> }</p><p> public string Parameters</p><p> {</p><p> get { return "%username%"; }</p><p> }</p><p> public string Description</p><p> {</p><p> get { return "Hug another user"; }</p><p> }</p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("You must enter a username!");</p><p> return;</p><p> }</p><p></p><p> GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);</p><p> if (TargetClient == null)</p><p> {</p><p> Session.SendWhisper("That user cannot be found, maybe they're offline or not in the room.");</p><p> return;</p><p> }</p><p></p><p> RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);</p><p> if (User == null)</p><p> {</p><p> Session.SendWhisper("The user cannot be found, maybe they're offline or not in the room.");</p><p> return;</p><p> }</p><p> RoomUser User2 = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);</p><p> if (User2 == null)</p><p> return;</p><p></p><p> if (!((Math.Abs(User.X - User2.X) >= 2 && (Math.Abs(User.Y - User2.Y) >= 2))))</p><p> {</p><p></p><p> Room.SendMessage(new ChatComposer(User.VirtualId, "Hugs " + User2 + "*", 0, User.LastBubble));</p><p> User.ApplyEffect(9);</p><p> }</p><p> else</p><p> {</p><p> Session.SendWhisper("That user is too far away, try getting closer.");</p><p> return;</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>[CODE]</p><p>using System;</p><p>using System.Linq;</p><p>using Plus.Database.Interfaces;</p><p>using System.Data;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.User</p><p>{</p><p> class BanCountCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_bancount"; }</p><p> }</p><p> public string Parameters</p><p> {</p><p> get { return ""; }</p><p> }</p><p> public string Description</p><p> {</p><p> get { return "See how many users are currently banned"; }</p><p> }</p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> int Count = 0;</p><p> using (IQueryAdapter Adapter = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> Adapter.RunQuery("SELECT id FROM bans");</p><p> DataTable BanTable = Adapter.getTable();</p><p> if (BanTable != null)</p><p> {</p><p> Count = BanTable.Rows.Count;</p><p> }</p><p></p><p> Session.SendNotification("Pace Has saved you from Disguised & Gilbert" + Count.ToString() + " times!");</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="Altercationz, post: 371876, member: 59038"] due to high demand i've coded these for sledmore's plus edit. Enjoy. [CODE] using System; using Plus.HabboHotel.Rooms; using Plus.HabboHotel.GameClients; using Plus.Communication.Packets.Outgoing.Rooms.Chat; namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun { class Hug : IChatCommand { public string PermissionRequired { get { return "command_hug"; } } public string Parameters { get { return "%username%"; } } public string Description { get { return "Hug another user"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("You must enter a username!"); return; } GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("That user cannot be found, maybe they're offline or not in the room."); return; } RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (User == null) { Session.SendWhisper("The user cannot be found, maybe they're offline or not in the room."); return; } RoomUser User2 = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username); if (User2 == null) return; if (!((Math.Abs(User.X - User2.X) >= 2 && (Math.Abs(User.Y - User2.Y) >= 2)))) { Room.SendMessage(new ChatComposer(User.VirtualId, "Hugs " + User2 + "*", 0, User.LastBubble)); User.ApplyEffect(9); } else { Session.SendWhisper("That user is too far away, try getting closer."); return; } } } } [/CODE] [CODE] using System; using System.Linq; using Plus.Database.Interfaces; using System.Data; namespace Plus.HabboHotel.Rooms.Chat.Commands.User { class BanCountCommand : IChatCommand { public string PermissionRequired { get { return "command_bancount"; } } public string Parameters { get { return ""; } } public string Description { get { return "See how many users are currently banned"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { int Count = 0; using (IQueryAdapter Adapter = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { Adapter.RunQuery("SELECT id FROM bans"); DataTable BanTable = Adapter.getTable(); if (BanTable != null) { Count = BanTable.Rows.Count; } Session.SendNotification("Pace Has saved you from Disguised & Gilbert" + Count.ToString() + " times!"); } } } } [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
Plus Emu Commands
Top