Plus Emu Commands

ChrisRetr0

Member
Jun 11, 2016
39
0
I've been bored recently & just started coding commands into plus emu,

I'm sure some of you will find these useful.

Commands:
hug
balance
bancount
Enjoy,
Code:
public void hug(string[] Params)
        {
            string text = MergeParams(Params, 1);

            Habbo Habbo1 = this.Session.GetHabbo();
            if (Habbo1.CurrentRoom != null)
            {
                RoomUser User1 = Habbo1.CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Habbo1.Id);
                if (User1 != null)
                {
                    RoomUser User2 = Habbo1.CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(text);
                    if (User2 == null)
                    {
                        this.Session.SendWhisper("Open your eyes! " + text + " is not in the room.");
                        return;
                    }
                    else if (new Vector2D(User1.Coordinate.X, User1.Coordinate.Y).GetDistanceSquared(new Vector2D(User2.Coordinate.X, User2.Coordinate.Y)) > 2)
                    {
                        this.Session.SendWhisper("The user is too far away, try getting closer.");
                        return;
                    }
                    User1.Chat(User1.GetClient(), "*Hugs " + text + "*", true, 0);
                    User1.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ActivateCustomEffect(9);
                }
            }
        }
Code:
public void balance()
        {
            int Credits = Session.GetHabbo().Credits;
            int Pixels = Session.GetHabbo().ActivityPoints;
            uint Rank = Session.GetHabbo().Rank;
            string Output = String.Empty;

            using (IQueryAdapter Adapter = PlusEnvironment.GetDatabaseManager().getQueryreactor())
            {
                Adapter.runFastQuery("SELECT credits, activity_points, rank FROM users WHERE username = @Me");
                Adapter.addParameter("Me", Session.GetHabbo().Username);

                DataTable Table = Adapter.getTable();
                if (Table != null)
                {
                    Output += "Account Balance for " + Session.GetHabbo().Username + "\r";
                    Output += "--------------------------------\r";
                    Output += "Credits: " + Credits.ToString() + "\r";
                    Output += "Pixels: " + Pixels.ToString() + "\r";
                    Output += "Rank: " + Rank.ToString() + "\r";

                    Session.SendNotifWithScroll(Output);
                }
            }
        }
Code:
public void bancount()
        {
            int Count = 0;
            using (IQueryAdapter Adapter = PlusEnvironment.GetDatabaseManager().getQueryreactor())
            {
                Adapter.runFastQuery("SELECT id FROM bans");
                DataTable BanTable = Adapter.getTable();
                if (BanTable != null)
                {
                    Count = BanTable.Rows.Count;
                }
                Session.SendNotif(PlusEnvironment.HotelName + " Has saved you from Disguised & Dillon " + Count.ToString() + " times!");
            }
        }
Can you code :buyroom for me please? ill tip you message me when ur done
 

Users who are viewing this thread

Top