CachedIndexes = new Dictionary<uint, ServerMessage>();
To
PHP Code:
CachedIndexes = new Dictionary<uint, ServerMessage>(); CachedIndexesBuilders = new Dictionary<uint, ServerMessage>(); for (uint i = 1; i < 9; i++) { CachedIndexes.Add(i, CatalogPacket.ComposeIndex(i)); CachedIndexesBuilders.Add(i, CatalogPacket.ComposeIndexBuilders(i)); }
After that "if"
PHP Code:
if (catalogPage.Layout == "vip_buy" || catalogPage.Layout == "club_buy" || HabboClubItems.Contains(item))
Add
PHP Code:
if (catalogPage.Layout == "builders_club_addons") { string[] array = item.Name.Split(new char[] { '_' }); int dayLength; if (item.Name.Contains("45furnis")) { dayLength = 45; } else { if (item.Name.Contains("250furnis")) { dayLength = 250; } else { if (item.Name.Contains("600furnis")) { dayLength = 600; } else { dayLength = 31; } } } Session.GetHabbo().GetSubscriptionManager().AddSubscriptionBuilders(dayLength);
return; } }
On CatalogPackets.cs Add
PHP Code:
internal static ServerMessage ComposeIndexBuilders(uint Rank) { var Pages = MercuryEnvironment.GetGame().GetCatalog().Categories.Values.OfType<CatalogPage>(); ServerMessage Message = new ServerMessage(Outgoing.CatalogueIndexMessageComposer); var SortedPages = Pages.Where(x => x.ParentId == -2 && x.MinRank <= Rank).OrderBy(x => x.OrderNum);
Message.AppendBoolean(true); Message.AppendInt32(0); Message.AppendInt32(-1); Message.AppendString("root"); Message.AppendString(string.Empty); Message.AppendInt32(0); Message.AppendInt32(SortedPages.Count()); foreach (CatalogPage Cat in SortedPages) { Message.AppendBoolean(Cat.Visible); Message.AppendInt32(Cat.IconImage); Message.AppendInt32(Cat.PageId); Message.AppendString(Cat.CodeName); Message.AppendString(Cat.Caption); Message.AppendInt32(Cat.FlatOffers.Count); foreach (int i in Cat.FlatOffers.Keys) { Message.AppendInt32(i); }
int builders_expire = (int)dRow["builders_expire"]; int builders_items = (int)dRow["builders_items"]; int builders_items_rest = (int)dRow["builders_items_rest"];
internal int builders_expire; internal int builders_items; internal int builders_items_rest;
Replace
PHP Code:
internal Habbo
To
PHP Code:
internal Habbo(uint Id, string Username, string RealName, uint Rank, string Motto, string Look, string Gender, int Credits, int ActivityPoints, double LastActivityPointsUpdate, bool Muted, uint HomeRoom, int Respect, int DailyRespectPoints, int DailyPetRespectPoints, bool HasFriendRequestsDisabled, uint currentQuestID, int currentQuestProgress, int achievementPoints, int RegTimestamp, int LastOnline, bool AppearOffline, bool HideInRoom, bool VIP, double CreateDate, bool Online, string Citizenship, int BelCredits, HashSet<GroupUser> Groups, uint FavId, int LastChange, bool TradeLocked, int TradeLockExpire, bool NUXPassed, int builders_expire, int builders_items, int builders_items_rest)
handlers.Add(Incoming.PlaceBuildersFurniture, new StaticRequestHandler(SharedPacketLib.PlaceBuildersFurniture)); handlers.Add(Incoming.BuildersClubHowManyItemsHave, new StaticRequestHandler(SharedPacketLib.BuildersClubHowManyItemsHave));
INSERT INTO `catalog_pages` (`id`, `parent_id`, `code_name`, `caption`, `icon_image`, `visible`, `enabled`, `min_rank`, `club_only`, `order_num`, `page_layout`, `page_headline`, `page_teaser`, `page_special`, `page_text1`, `page_text2`, `page_text_details`, `page_text_teaser`, `vip_only`, `page_link_description`, `page_link_pagename`) VALUES (149, -2, 'builders_club', 'Blocos Builders', 2005, '1', '1', 1, '0', 3, 'builders_3x3', '', 'landing_view_blocks', '', 'Use os blocos de construção para criar estruturas legais em suas salas ! Quem sabe ... talvez você é o vencedor de um concurso .', '', '', '', '0', '', ''), (300, -2, 'builders_club', 'Clube de Arquitetos', 193, '1', '1', 1, '0', 1, 'builders_club_frontpage', '<b><font color="#cc6600" size="16">O que é o Clube do Arquiteto?</font></b><br><br>Você sempre sonhou em construir quartos com Mobis virtualmente ilimitados? Está cansado de ter que contar moedas ou mobis para terminar um quarto? O Clube do Arquiteto é a solução!<br><br><b><font color="#cc6600" size="16">é fácil demais!</font></b><br><img src="http://images.habbo.com/c_images/catalogue/bc_instr_1.png"/><br><br><br><br><br><br><br><br><ul><li>Escolha um dos <a href="event:navigator/tab/me">seus quartos</a> (ou faça um novo).</li><li>Abra o Depósito do Clube do Arquiteto</li><li>Arraste objetos e coloque-os em seu quarto</li></ul><br><br><i>Dica: Se quiser recolher todos os Mobis do Clube do Arquiteto de uma vez, digite":pickallbc" no chat e clique em ENTER.</i><br><br>Clique aqui para mais informaçoes <a href="event:habbopages/builders-club/info">sobre as vantagens que do Clube do Arquiteto oferece.</a> Caso siga com dúvidas, visite nossas <a href="event:habbopages/builders-club/faq">FAQs</a>!', '', '', '', '', '', '', '0', '', ''), (301, -2, 'builders_club', 'Upgrades do CA', 194, '1', '1', 1, '0', 2, 'builders_club_addons', '<b><font color="#d85b00" size="16">\r\nUpgrades do Clube do Arquiteto\r\n</font></b><br><br>\r\n<font align="justify">Você alcançou o <b>Limite de Mobis </b> mas quer <b> continuar construindo? </b> Não há problema, faça um upgrade!\r\n ', '', '', '', '', '', '', '0', '', '');
Fix Nº 6
Sayall and ShoutAll
Spoiler:
PHP Code:
#region sayall :sayall case "sayall": if (Session.GetHabbo().Rank > 8) // change user rank {
string message = MergeParams(Params, 1); if (message != "") { foreach (RoomUser user in Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUsers()) { user.Chat(user.GetClient(), message, false, 0); }
} }
return true; #endregion
PHP Code:
#region shoutall :shoutall case "shoutall": if (Session.GetHabbo().Rank > 8) // change user rank {
string message = MergeParams(Params, 1); if (message != "") { foreach (RoomUser user in Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUsers()) { user.Chat(user.GetClient(), message, true, 0); }
} }
return true; #endregion
Fix Nº 7
Room Cycle Fix
Spoiler:
Change
PHP Code:
if (this.IdleTime >= 10/* && usersQueueToEnter.Count == 0*/)
To
PHP Code:
if (this.IdleTime >= 60/* && usersQueueToEnter.Count == 0*/)
Fix Nº 8
New Wireds
Spoiler:
Change the ItemsCoincide.cs To
PHP Code:
using Mercury.HabboHotel.Items; using Mercury.HabboHotel.Pathfinding; using System; using System.Collections.Generic;
public WiredItemType Type { get { return this.mType; } } public RoomItem Item { get { return this.mItem; } set { this.mItem = value; } } public Room Room { get { return this.mRoom; } } public List<RoomItem> Items { get { return this.mItems; } set { this.mItems = value; } } public string OtherString { get { return mString; } set { mString = value; } } public string OtherExtraString { get { return mExtra; } set { mExtra = value; } } public string OtherExtraString2 { get { return mExtra2; } set { mExtra2 = value; } } public bool OtherBool { get { return true; } set { } }
ServerMessage serverMessage2 = new ServerMessage(Outgoing.PickUpFloorItemMessageComposer); serverMessage2.AppendString(Item.Id + string.Empty); serverMessage2.AppendBoolean(false); if (WasPicked) { serverMessage2.AppendUInt(Item.UserID); } else { serverMessage2.AppendInt32(-1); } serverMessage2.AppendInt32(0);
Updated on 10/13/2014
BUGS NOT FIXED:
Quote:
1-
Spoiler:
PHP Code:
Error en thread Room cycle task for room 16: System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.HashSet`1.Enumerator.MoveNext() at Mercury.HabboHotel.Rooms.RoomManager.UnloadRoom(Room Room) in c:\Users\Administrator\Desktop\Mercury v2\HabboHotel\Rooms\RoomManager.cs:line 629 at Mercury.HabboHotel.Rooms.Room.ProcessRoom() in c:\Users\Administrator\Desktop\Mercury v2\HabboHotel\Rooms\Room.cs:line 771
-
-
-
-
-
-
PARTIAL FIXES
Quote:
-
-
-
-
-
-
#1 - MERCURY EMULATOR WAS NOT CREATED BY ME THE CREDITS OF MERCURY GO TO FINN
#2 - DO NOT ASK FOR HELP HERE, ASK QUESTIONS IN THE HELP SECTION
THIS IS NOT A HELP THREAD. IF YOU ARE GETTING AN ERROR, POST A HELP THREAD, IT IS PROBABLY NOT A BUG! IF SOMETHING DOES NOT WORK THAT SHOULD WORK, POST IT HERE! -Wreckless
18-09-14
Leans
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Bots are kinda messed up. They aren't walkable when u pick them up their chat is still there when you change the old speech to a new speech it does exactly what it does when u pick it up no name here is an image. http://i.gyazo.com/5be8972488076db6b5a9fa7f7cad275a.png
- - - Updated - - -
Another thing there is a problem with the room unload
Code:
Error en thread Room cycle task for room 16:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.HashSet`1.Enumerator.MoveNext()
at Mercury.HabboHotel.Rooms.RoomManager.UnloadRoom(Room Room) in c:\Users\Administrator\Desktop\Mercury v2\HabboHotel\Rooms\RoomManager.cs:line 629
at Mercury.HabboHotel.Rooms.Room.ProcessRoom() in c:\Users\Administrator\Desktop\Mercury v2\HabboHotel\Rooms\Room.cs:line 771
18-09-14
donszeh
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Public rooms doesn't work either.
18-09-14
ovflowd
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
I Will Send These Fixes:
-- builders_club
-- Navigator Publics
18-09-14
donszeh
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by Claudi0
I Will Send These Fixes:
-- builders_club
-- Navigator Publics
Thx, really would appreciate it.
18-09-14
GotMilk
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
I discovered a massive bug that can crash any hotel using Mercury EMU. I need to talk to the creator of mercury or any of it's developers privately. Don't want to post this here so it gets in the wrong hands.
18-09-14
iTzPositivo
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by GotMilk
I discovered a massive bug that can crash any hotel using Mercury EMU. I need to talk to the creator of mercury or any of it's developers privately. Don't want to post this here so it gets in the wrong hands.
Okay! Talk with Finn ! This is Every Important..
- - - Updated - - -
Updated:
Builders Club 30%:
http://prntscr.com/4o4q1r
http://prntscr.com/4o4q53
19-09-14
BurakDev
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Why Builders Club ? Is useless, just disable button in external variables :huh:
19-09-14
ovflowd
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Is not Useless, It's a Interesting Feature, If really Useless, why Sulake created it? Think about this matter guy.
19-09-14
BurakDev
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by Claudi0
Is not Useless, It's a Interesting Feature, If really Useless, why Sulake created it? Think about this matter guy.
Is useful for Sulake because he sell club subscription :laugh:
19-09-14
MrPudding
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Nice, but the Citizenship packet thing is already in Mercury.
Find:
Quote:
internal static int CitizenshipStatusMessageComposer
I would advice you to not code the Builders Club.
19-09-14
MrPudding
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by BurakDev
u s e l e s s :*::*:
Yeah, it's very useless.
You'll know, the Builders Club packet in Mercury is only used to enable the "Save" button in the Floor plan editor. With a permanent membership ;D
Code:
this.Response.Init(Outgoing.BuildersClubMembershipMessageComposer);
this.Response.AppendInt32(int.MaxValue);//expiry
this.Response.AppendInt32(100);//Furniture limit
this.Response.AppendInt32(0);//Furniture used
this.SendResponse();
19-09-14
Flare
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Builders club could be useful for some people with a creative mind of their own :)
19-09-14
MrSpooks
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by HabflareH
Builders club could be useful for some people with a creative mind of their own :)
Dude it's a retro it's all free anyway? Lol I'd like to see the helpers tool fixed tho :)
19-09-14
maartenvn
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by HabflareH
Builders club could be useful for some people with a creative mind of their own :)
Builderclub can be easy.
You can place items and you don't need to buy them.
So you are not wasting time with buying furniture.
19-09-14
xJayJay
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
is there a group badge fix?
- - - Updated - - -
19-09-14
benjay101
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
I would love builders club to work... I would add rares there so users can have rares without paying for them? Also a teleporter bugg... You double click teleporter and then click straight away from the teleporter and then you can teleport in the room? Also is their any way you can save fuse_cmds? server_fuserights? any way of changing the floor plan editor so any user can have it?
19-09-14
AreFlame
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
@BurakDev and @MrPudding please stfu about the builders club since it is better to have it fixed than to have it just laying there not fixed, it is much more better and some would like it, the ones who dont like it just diable it but he is free to do whatever he want but i am adviceing him to fix it since it is exclusive to us all!
19-09-14
donszeh
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Maybe it is helpfull to tell what the problem is? If you got disconnected after logged in, its the vars.
Quote:
Originally Posted by benjay101
I would love builders club to work... I would add rares there so users can have rares without paying for them? Also a teleporter bugg... You double click teleporter and then click straight away from the teleporter and then you can teleport in the room? Also is their any way you can save fuse_cmds? server_fuserights? any way of changing the floor plan editor so any user can have it?
If you use navicat just press CRTL+S?! It's no different to other databases...
19-09-14
Bjork
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by Remco Dijkstra
Unable to load room ID [2] System.OverflowException: Arithmetic operation resulted in an overflow.
at Mercury.HabboHotel.Rooms.Gamemap.NewHeightMap() in c:\Users\Remco\Desktop\Mercury\HabboHotel\Rooms\Gamemap.cs:line 1255
at Mercury.HabboHotel.Rooms.Gamemap.GetNewHeightmap() in c:\Users\Remco\Desktop\Mercury\HabboHotel\Rooms\Gamemap.cs:line 1239
at Mercury.Messages.GameClientMessageHandler.GetRoomData2() in c:\Users\Remco\Desktop\Mercury\Messages\GameClientMessageHandler.cs:line 3232
the room cant beloaded
Yes, you can't create too big floor. It makes a packeterror.
19-09-14
Emily
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
The collection is changed exception can be fixed by using an Concurrent type (like ConcurrentDictionary).
19-09-14
Emily
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by Arsidev
Are you talking to me?
I'm making a generic comment about the bugs in this thread. I didn't quote anybody specific so no.
19-09-14
asesinato
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by Twan
Bugs that i found: if im using RevCMS and click on an playlist on YoutubeTVs, it disconnects me.
So strange, it doesn't do that for me and I use RevCMS, do you get any errors?
19-09-14
asesinato
Re: [Mercury Emulator] Fixes & Edits [Topic] [Post Your Bugs and Fixes]
Quote:
Originally Posted by Twan
No im not getting any errors, thats so weird about it.