Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by Marlon Colhado
To fix the Fast Food, I would need to run another emulator specifically for the game, had a version that had this system .. if someone is If anyone has it, give me .. for thus it is easier, having a base.
I know, I said that I have the code and I also belonging to the emulator but I need the fix of the game centers around Bug even if I put the packet fair
03-08-13
rafa95123
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
The ball is almost fixed.. Now to kick the ball you need do equal Habbo... Now i need fix the effect to ball "Roll" and to and score the "Gol"...
The achievements i started to see what's the problem...
The TriggerItem is almost fixed to, now the "User disconnection logged" don't will appear...
And others things like habbowheel, wallpapers and others.. I am also working to fix ASAP :)
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by rafa95123
The ball is almost fixed.. Now to kick the ball you need do equal Habbo... Now i need fix the effect to ball "Roll" and to and score the "Gol"...
The achievements i started to see what's the problem...
The TriggerItem is almost fixed to, now the "User disconnection logged" don't will appear...
And others things like habbowheel, wallpapers and others.. I am also working to fix ASAP :
So man , post all your fixes tou have done in this time .
Habbowheel too D:
using (adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) { adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET base_id = '", row["item_id"], "' WHERE item_id = ", item.Id }));
adapter.setQuery(string.Concat(new object[] { "UPDATE items_extradata SET data = '" + row["extradata"] + "' WHERE item_id = " + item.Id })); adapter.addParameter("extradata", row["extradata"]); adapter.runQuery();
adapter.runFastQuery("DELETE FROM user_gifts WHERE gift_id = " + item.Id); }
string s = item.GetBaseItem().Type.ToString().ToLower(); string extraData = row["extradata"].ToString(); item.BaseItem = Convert.ToUInt32(row["item_id"]); item.refreshItem(); item.ExtraData = extraData; if (!room.GetRoomItemHandler().SetFloorItem(this.Session, item, item.GetX, item.GetY, item.Rot, true, false, true)) { this.Session.SendNotif("Failed to create your gift!"); } else { this.Response.Init(Outgoing.OpenGift); this.Response.AppendString(item2.Type.ToString()); this.Response.AppendInt32(item2.SpriteId); this.Response.AppendString(item2.Name); this.Response.AppendInt32(item.Id); this.Response.AppendString(s); this.Response.AppendBoolean(true); this.Response.AppendString(extraData); this.SendResponse(); } } else { room.GetRoomItemHandler().RemoveFurniture(this.Session, item.Id); using (adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) { adapter.runFastQuery("DELETE FROM user_gifts WHERE gift_id = " + item.Id); } this.Session.GetMessageHandler().GetResponse().Init(Outgoing.SendPurchaseAlert); this.Session.GetMessageHandler().GetResponse().AppendInt32(1); int i = 2; if (item2.Type.ToString().ToLower().Equals("s")) { if (item2.InteractionType == InteractionType.pet) { i = 3; } else { i = 1; } } this.Session.GetMessageHandler().GetResponse().AppendInt32(i); List<UserItem> list = ButterflyEnvironment.GetGame().GetCatalog().DeliverItems(this.Session, item2, (int)row["amount"], (string)row["extradata"], 0, 0); this.Session.GetMessageHandler().GetResponse().AppendInt32(list.Count); foreach (UserItem item3 in list) { this.Session.GetMessageHandler().GetResponse().AppendInt32(item3.Id); } this.Session.GetMessageHandler().SendResponse(); this.Session.GetHabbo().GetInventoryComponent().UpdateItems(true); //this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateInventary); //this.Session.GetMessageHandler().SendResponse(); } } } } this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateInventary); this.Session.GetMessageHandler().SendResponse(); }
To enable the gift purchase, edit this:
In Incoming.cs,
Search by: Incoming.PurchaseGift = 0x0901
Replace by: Incoming.PurchaseGift = 0x0900
Sorry my english, i'm brazilian..
|
|
V
For the present don't bug stay in inventory and when placing it on the ground, do this:
In: GameClientMessageHandler.cs, Search by: internal void PlaceItem()
And, replace all void PlaceItem, by:
using (adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) { adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET base_id = '", row["item_id"], "' WHERE item_id = ", item.Id }));
adapter.setQuery(string.Concat(new object[] { "UPDATE items_extradata SET data = '" + row["extradata"] + "' WHERE item_id = " + item.Id })); adapter.addParameter("extradata", row["extradata"]); adapter.runQuery();
adapter.runFastQuery("DELETE FROM user_gifts WHERE gift_id = " + item.Id); }
string s = item.GetBaseItem().Type.ToString().ToLower(); string extraData = row["extradata"].ToString(); item.BaseItem = Convert.ToUInt32(row["item_id"]); item.refreshItem(); item.ExtraData = extraData; if (!room.GetRoomItemHandler().SetFloorItem(this.Session, item, item.GetX, item.GetY, item.Rot, true, false, true)) { this.Session.SendNotif("Failed to create your gift!"); } else { this.Response.Init(Outgoing.OpenGift); this.Response.AppendString(item2.Type.ToString()); this.Response.AppendInt32(item2.SpriteId); this.Response.AppendString(item2.Name); this.Response.AppendInt32(item.Id); this.Response.AppendString(s); this.Response.AppendBoolean(true); this.Response.AppendString(extraData); this.SendResponse(); } } else { room.GetRoomItemHandler().RemoveFurniture(this.Session, item.Id); using (adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) { adapter.runFastQuery("DELETE FROM user_gifts WHERE gift_id = " + item.Id); } this.Session.GetMessageHandler().GetResponse().Init(Outgoing.SendPurchaseAlert); this.Session.GetMessageHandler().GetResponse().AppendInt32(1); int i = 2; if (item2.Type.ToString().ToLower().Equals("s")) { if (item2.InteractionType == InteractionType.pet) { i = 3; } else { i = 1; } } this.Session.GetMessageHandler().GetResponse().AppendInt32(i); List<UserItem> list = ButterflyEnvironment.GetGame().GetCatalog().DeliverItems(this.Session, item2, (int)row["amount"], (string)row["extradata"], 0, 0); this.Session.GetMessageHandler().GetResponse().AppendInt32(list.Count); foreach (UserItem item3 in list) { this.Session.GetMessageHandler().GetResponse().AppendInt32(item3.Id); } this.Session.GetMessageHandler().SendResponse(); this.Session.GetHabbo().GetInventoryComponent().UpdateItems(true); //this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateInventary); //this.Session.GetMessageHandler().SendResponse(); } } } } this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateInventary); this.Session.GetMessageHandler().SendResponse(); }
To enable the gift purchase, edit this:
In Incoming.cs,
Search by: Incoming.PurchaseGift = 0x0901
Replace by: Incoming.PurchaseGift = 0x0900
Sorry my english, i'm brazilian..
|
|
V
For the present don't bug stay in inventory and when placing it on the ground, do this:
In: GameClientMessageHandler.cs, Search by: internal void PlaceItem()
And, replace all void PlaceItem, by:
if (strArray[1].StartsWith(":")) { try { WallCoordinate wallCoord = new WallCoordinate(":" + str.Split(new char[] { ':' })[1]); item2 = new RoomItem(item.Id, pRoom.RoomId, item.BaseItem, item.ExtraData, wallCoord, pRoom, item.Group_data, item.RareId, item.placedBy); if (pRoom.GetRoomItemHandler().SetWallItem(this.Session, item2)) { this.Session.GetHabbo().GetInventoryComponent().RemoveItem(id, true); } } catch { } } else { try { int x = int.Parse(strArray[1]); int y = int.Parse(strArray[2]); int rot = int.Parse(strArray[3]); if (this.Session.GetHabbo().forceRot > -1) { rot = this.Session.GetHabbo().forceRot; } item2 = new RoomItem(item.Id, pRoom.RoomId, item.BaseItem, item.ExtraData, x, y, 0.0, rot, pRoom, item.Group_data, item.RareId, item.placedBy); if (pRoom.GetRoomItemHandler().SetFloorItem(this.Session, item2, x, y, rot, true, false, true)) { this.Session.GetHabbo().GetInventoryComponent().RemoveItem(id, true); } if (WiredUtillity.TypeIsWired(item.GetBaseItem().InteractionType)) { WiredSaver.HandleDefaultSave(item.Id, pRoom); } } catch (Exception ex) { Logging.LogCriticalException(ex.ToString()); } } } } this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateInventary); this.Session.GetMessageHandler().SendResponse(); }
Done!
If you don't have table user_gifts, add:
PHP Code:
DROP TABLE IF EXISTS `user_gifts`; CREATE TABLE `user_gifts` ( `gift_id` int(10) NOT NULL AUTO_INCREMENT, `page_id` int(10) unsigned NOT NULL DEFAULT '5', `item_id` mediumint(10) NOT NULL, `extradata` varchar(50) NOT NULL DEFAULT '', `target_name` varchar(50) NOT NULL, `message` varchar(115) NOT NULL DEFAULT '', `ribbon` tinyint(1) NOT NULL DEFAULT '0', `color` tinyint(1) NOT NULL DEFAULT '0', `gift_sprite` int(10) NOT NULL, `show_sender` tinyint(4) NOT NULL DEFAULT '1', `rare_id` int(10) NOT NULL DEFAULT '0', `inventory_id` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`gift_id`) ) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=latin1;
Uffs, By Marlon Colhado? ♥
@ONTOPIC:
Thanks by fix :)
However, what is bug of this...?
@OFFTOPIC:
Marlon, I'm from Brazil too, I have you on FB.. I'm a owner of Hobba.com.br :)
04-08-13
Ddos Attack
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Rafa, what exactly was bugged with achievements?
04-08-13
AKllX
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
You may notice that the colors and sprites for gifts are a bit messed. Most of the gifts layout are serialized by color*1000 + ribbon. But sometimes you must do only color + ribbon. By default for revision 5, I've used the color*1000+ribbon so you might not see some gift sprites showing as they were supposed to.