Any Emulator - Coding addons for your Emulator

Status
Not open for further replies.

Jaden

not so active
Aug 24, 2014
886
263
The Title makes this self explanitory...
What i'm doing is coding you addons like commands... i.e Buyroom sellroom...
maybe Profiles or such don't ask for that...
other commands that are completely outrageous and you know they are... YOU CAN ASK :D!!!!
I'm an outrageous person and don't under estimate this thread because seconds later you're emulator will have some crazy shit on it i.e
some shit like fastwalk or so...
Don't matter what you request as long as it dosent have anything to do with packets...
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
On a Phoenix Related note...
You can look in the development section to see a new Phoenix build that i may be developing if its worth it....
Tbh if you don't want to use my Phoenix and think its unsafe or whatever... i'll leave it open sourced...
Aaron? Yeah i want him to help too we'll see..
<-- I'm Posting the thread now but... i'm editing the thread later to code some example commands... -->

Just know.. The Sky is the limit Hotel Owners/Developers... Request below!
 

Jaden

not so active
Aug 24, 2014
886
263
UPDATE:
You can request addons for any emulator now but if i don't know the emulator i'll tell you. (Except Swift)
Probably the only mercury im doing...
Mercury Buyroom/sellroom (Alot of steps)
THESE WHERE NOT TESTED
Code:
Go to HabboHotel.Rooms.Room
Add
internal bool ForSale;
internal int SalePrice;
after
internal bool isCycling = false;

add
this.ForSale = false;
this.SalePrice = 0;
under
this.RoomChat = Chat;

Now go to
Mercury.Messages.GameClientMessageHandler.cs
look for internal void MoveItem()
Add anywhere
if (Room.ForSale)
            {
                Session.SendWhisper("You cannot edit the room whilst it's for sale.");
                Session.SendWhisper("Cancel the sale of this room by doing ':sellroom 0' (without '')");
                return;
            }
add the same code for voids...
internal void TriggerItem() &
internal void TakeItem()

Then Go to chatCommandHandler and add
                        case "buyroom":
                        {
                            if (!this.Session.GetHabbo().GotCommand("buyroom"))
                            {
                                Room Room = Session.GetHabbo().CurrentRoom;
                                RoomUser RoomOwner = Room.GetRoomUserManager().GetRoomUserByHabbo(Room.Owner);
                                if (Room == null)
                                {
                                    return true;
                                }
                                if (Room.Owner == Session.GetHabbo().Username)
                                {
                                    SendChatMessage(Session, "You already own this room!");
                                    return true;
                                }

                                if (!Room.ForSale)
                                {
                                    SendChatMessage(Session, "This room is not for sale!");
                                    return true;
                                }

                                if (Session.GetHabbo().Credits < Room.SalePrice)
                                {
                                    SendChatMessage(Session, "You do not have enough credits to buy this room!");
                                    return true;
                                }

                                if (RoomOwner == null || RoomOwner.GetClient() == null)
                                {
                                    SendChatMessage(Session, "An unknown error occured, this room is no longer for sale.");
                                    Room.ForSale = false;
                                    Room.SalePrice = 0;
                                    return true;
                                }
                                GameClient Owner = RoomOwner.GetClient();

                                Session.GetHabbo().Credits -= Room.SalePrice;
                                Session.GetHabbo().UpdateCreditsBalance();
                                Owner.GetHabbo().Credits += Room.SalePrice;
                                Owner.GetHabbo().UpdateCreditsBalance();

                                Room.Owner = Session.GetHabbo().Username;
                                Room.OwnerId = (int)Session.GetHabbo().Id;
                                Room.RoomData.Owner = Session.GetHabbo().Username;
                                Room.RoomData.OwnerId = (int)Session.GetHabbo().Id;
                                uint RoomId = Room.RoomId;



                                using (IQueryAdapter dbClient = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.runFastQuery("UPDATE rooms SET owner='" + Session.GetHabbo().Username + "' WHERE id='" + Room.RoomId + "' LIMIT 1");
                                }
                                Session.GetHabbo().UsersRooms.Add(Room.RoomData);
                                Owner.GetHabbo().UsersRooms.Remove(Room.RoomData);
                                MercuryEnvironment.GetGame().GetRoomManager().UnloadRoom(Room);



                                RoomData Data = MercuryEnvironment.GetGame().GetRoomManager().GenerateRoomData(Room.RoomId);
                                Data.SerializeRoomData(new ServerMessage(), true, Session, false);
                                Session.GetMessageHandler().PrepareRoomForUser(Room.RoomId, "");

                            }
                            return true;
                        }
And then your done!
Forgot sellroom command
Code:
                    case "sellroom":
                    {
                        if (!this.Session.GetHabbo().GotCommand("sellroom"))
                        {
                            Room Room = Session.GetHabbo().CurrentRoom;
                            Int32 Value = 0;
                            if (Room == null)
                                return true;

                            if (!Room.CheckRights(Session, true))
                                return true;

                            if (Params.Length == 1)
                            {
                                Session.SendNotif("In order to sell a room, you must include a value. \n\nPLEASE NOTE:\nIf you sell a room you CANNOT get any of it back!");
                                return true;
                            }
                            else if (Room.Group != null)
                            {
                                Session.SendNotif("You cannot sell a room with a group on it.\n Delete the group first by typing :deletegroup");
                                return true;
                            }
                            else if (!MercuryEnvironment.IsNum(Params[1]))
                            {
                                SendChatMessage(Session, "You must enter a number!");
                                return true;
                            }
                            else
                                Value = Convert.ToInt32(Params[1]);

                            if (Value < 0)
                            {
                                SendChatMessage(Session, "You can not sell a room for less than 0 credits!");
                                return true;
                            }

                            if (Room.ForSale)
                            {
                                Room.SalePrice = Value;
                            }
                            else
                            {
                                Room.ForSale = true;
                                Room.SalePrice = Value;
                            }

                            foreach (RoomUser User in Room.GetRoomUserManager().GetRoomUsers())
                            {
                                User.SendChatMsg("This room is for sale! The current asking price is " + Value + " credits! Buy it by saying :buyroom");
                            }

                            Session.SendNotif("In order to sell a room, you must include a value. \n\nPLEASE NOTE:\nIf you sell a room you CANNOT get any of it back!\n\n" +
                            "You can cancel selling a room by typing ':buyroom 0' (Without '')");

                        }
                        return true;
                    }

Allaround me Phoenix (Tested on Habtown.co.uk)
Code:
case number:
                    {
                        if (Session.GetHabbo().Rank > 5)
                        {
                            class2 = Phoenix.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            for (int i = 0; i < class2.RoomUser_0.Length; i++)
                            {
                                RoomUser class7 = class2.RoomUser_0[i];
                                RoomUser class6 = class2.method_53(Session.GetHabbo().Id);
                                class7.MoveTo(class6.int_3, class6.int_4 - 1);
                            }
                            return true;
                        }
                    }
 
Last edited:

Tiny

Owner, Swift Industry
Aug 14, 2013
616
61
I need r63 groups, slap kiss commands, fastwalk etc. Could you please do it for me (open source)
 

Ecko1223

Member
Feb 28, 2013
344
43
Things like,

alleyesonme
allaroundme
fly
fastwalk
Rotation command, something that lets you turn a certain degree
Mostly the unique r63b commands would be great for phoenix.
 
Last edited:

Jaden

not so active
Aug 24, 2014
886
263
in game groups like rehab did?
When i start my Phoenix development... but Groups are already implemented into phoenix its just you :)
I need r63 groups, slap kiss commands, fastwalk etc. Could you please do it for me (open source)
Wait for R63 Groups i currently don't have a development hotel for phoneix. Kiss comand and fastwak coming right up
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
I want to add these now because buy/sell rooms was my favorite commands on Force
 

Ecko1223

Member
Feb 28, 2013
344
43
Here's something i made quickly. Frequently asked questions in-game. Here's what it looks like in-game,

Place this in your chatcommandhandler, at the bottom. Here's where to place,
Code:
 public static string text_faqcmd { get; set; }

Place this in your chatcommandhandler. Edit the questions and answers to what you want. Leave the \n's though
Code:
case 9373:
                            string text_faqcmd = "Frequently Asked Questions\n\n";
                            text_faqcmd = text_faqcmd + "Q: Can I Be Staff?\n";
                            text_faqcmd = text_faqcmd + "A: Yes, apply for staff. Look at the bottom left corner for apps.\n\n";
                            text_faqcmd = text_faqcmd + "Q: How Do I Earn Diamonds?\n";
                            text_faqcmd = text_faqcmd + "A: You earn them by winning events. Also, you get 1 every 2 mins\n\n";
                            text_faqcmd = text_faqcmd + "Q: Can I Be A Mentor?\n";
                            text_faqcmd = text_faqcmd + "A: Be nice and help users alot, and we reward with mentor status\n\n";
                            text_faqcmd = text_faqcmd + "Q: I Got Scammed?\n";
                            text_faqcmd = text_faqcmd + "A: Find a member of staff. We need proof for us to do anything\n\n";
                            text_faqcmd = text_faqcmd + "Q: I Bought Something With My Money?\n";
                            text_faqcmd = text_faqcmd + "A: If you have bought something on the site, see a owner in-game\n\n";
                            text_faqcmd = text_faqcmd + "Q: Do I Get Something For Advertising?\n";
                            text_faqcmd = text_faqcmd + "A: When you adverise/invite, your chances increase for getting staff, and we reward rares and sometimes vip status\n\n";
                            text_faqcmd = text_faqcmd + "Q: Can I Have Credits And Diamonds For Free?\n";
                            text_faqcmd = text_faqcmd + "A: We don't give out anything out, unless it's a reward for an event, or something that someone has purchased with money\n\n";
                            text_faqcmd = text_faqcmd + "Q: When Does The Weekly Shops Change?\n";
                            text_faqcmd = text_faqcmd + "A: They change every Sunday\n\n";

                            Session.SendNotification(text_faqcmd, 2);
                            return true;
Place this where the other commands are in the chatcommandhandler. Its so it shows up in your, :commands.
Code:
if (Session.GetHabbo().Rank > 0)
                                                        {
                                                            text7 = text7 + ":faq - Shows a list of our frequently asked questions" + "\r\r";
                                                        }
Place this in the rolemanager where all the commands are, image provided,
Code:
this.dictionary_4.Add("faq", 9373);
 

Jaden

not so active
Aug 24, 2014
886
263
Here's something i made quickly. Frequently asked questions in-game. Here's what it looks like in-game,

Place this in your chatcommandhandler, at the bottom. Here's where to place,
Code:
 public static string text_faqcmd { get; set; }

Place this in your chatcommandhandler. Edit the questions and answers to what you want. Leave the \n's though
Code:
case 9373:
                            string text_faqcmd = "Frequently Asked Questions\n\n";
                            text_faqcmd = text_faqcmd + "Q: Can I Be Staff?\n";
                            text_faqcmd = text_faqcmd + "A: Yes, apply for staff. Look at the bottom left corner for apps.\n\n";
                            text_faqcmd = text_faqcmd + "Q: How Do I Earn Diamonds?\n";
                            text_faqcmd = text_faqcmd + "A: You earn them by winning events. Also, you get 1 every 2 mins\n\n";
                            text_faqcmd = text_faqcmd + "Q: Can I Be A Mentor?\n";
                            text_faqcmd = text_faqcmd + "A: Be nice and help users alot, and we reward with mentor status\n\n";
                            text_faqcmd = text_faqcmd + "Q: I Got Scammed?\n";
                            text_faqcmd = text_faqcmd + "A: Find a member of staff. We need proof for us to do anything\n\n";
                            text_faqcmd = text_faqcmd + "Q: I Bought Something With My Money?\n";
                            text_faqcmd = text_faqcmd + "A: If you have bought something on the site, see a owner in-game\n\n";
                            text_faqcmd = text_faqcmd + "Q: Do I Get Something For Advertising?\n";
                            text_faqcmd = text_faqcmd + "A: When you adverise/invite, your chances increase for getting staff, and we reward rares and sometimes vip status\n\n";
                            text_faqcmd = text_faqcmd + "Q: Can I Have Credits And Diamonds For Free?\n";
                            text_faqcmd = text_faqcmd + "A: We don't give out anything out, unless it's a reward for an event, or something that someone has purchased with money\n\n";
                            text_faqcmd = text_faqcmd + "Q: When Does The Weekly Shops Change?\n";
                            text_faqcmd = text_faqcmd + "A: They change every Sunday\n\n";

                            Session.SendNotification(text_faqcmd, 2);
                            return true;
Place this where the other commands are in the chatcommandhandler. Its so it shows up in your, :commands.
Code:
if (Session.GetHabbo().Rank > 0)
                                                        {
                                                            text7 = text7 + ":faq - Shows a list of our frequently asked questions" + "\r\r";
                                                        }
Place this in the rolemanager where all the commands are, image provided,
Code:
this.dictionary_4.Add("faq", 9373);
Thanks for sharing with us
 

Twan

Active Member
Feb 14, 2011
198
44
internal bool isCycling = false;
doesnt exist in my emulator, ive paste the Room.cs to some other places but GameClientMessageHandler.cs dont recognize them.
 

Jaden

not so active
Aug 24, 2014
886
263
internal bool isCycling = false;
doesnt exist in my emulator, ive paste the Room.cs to some other places but GameClientMessageHandler.cs dont recognize them.
You an add it anywhere under an internal int...
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
hello, thank's for your service,

Sell something like cocke, pepsi, food, phone to other

EMu: REALITYRP
What are you talking about? You can easily just make a furniture that gives people the item Lol. Pepsi is already a item
 

Jaden

not so active
Aug 24, 2014
886
263
you doesnt own this Thread.
i asked for a command to SELL furni for energy and stamina like fish, pepsi etc..
Reality i don't recommend using but if you must i recommand using a bot ai instead of like a sell command keyword can be like
Iphone
Joey *Pulls an Iphone 6s under the counter and offers it to Username*
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
you doesnt own this Thread.
i asked for a command to SELL furni for energy and stamina like fish, pepsi etc..
Thats what they make trade..? And thats why they make furniture such that converts to coins/pixels
 
Status
Not open for further replies.

Users who are viewing this thread

Top