Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by AKllX
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.
Interesting, I'll do a test and see what I can do with this.. :D
04-08-13
vicancer
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by Marlon Colhado
Sure, Friends..
To fix Gift with my "edition":
TUTORIAL, OPEN SPOILER:
Spoiler:
In: Catalog.cs Click in "EDIT" -> Go to... and digit: 1144, press Ok.
Search for: if (IsGift)
And, replace all if 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? ♥
when I bought it off
04-08-13
Sefyu41
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Me to !
04-08-13
Marlon Colhado
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by vicancer
when I bought it off
Hmm, strange.. use my user_gifts table:
PHP Code:
CREATE TABLE IF NOT EXISTS `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 '',
`amount` int(11) NOT NULL DEFAULT '1',
`target_name` varchar(50) NOT NULL,
`by_userid` int(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 DEFAULT CHARSET=latin1 AUTO_INCREMENT=300000 ;
Have:
`amount` int(11) NOT NULL DEFAULT '1',
and
`by_userid` int(50) NOT NULL,
new...
Work? Like!
04-08-13
FatalLulz
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Another bug:
If you buy one of the new Halloween effects in the catalogue it shows up as 'Purchased Spotlight effect' But if you then click my effects, nothing appears. No errors seem to be logged, I have messed around with the db, couldn't work a fix for it. Might just be me, if so then I'll keep working to fix it. Also if you buy VIP (extend the time you have left) You have to reload the client for it update in the catalogue. Yes I'm basically nit picking, but you can't run a hotel half complete.
ALSO I applied the Gift fix, and everytime I purchase a gift for myself I d/c. No errors are recorded, also the box and ribbons (even if you change them) show as the standard ones, except the colour does change.
And another bug If you send a hal You have to do the quiz all over again, then it does another type of quiz which you can not press any buttons and have to exit. No errors logged from that either.
04-08-13
KeineChance
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Can someone please post the updated emulator and working swfs?
04-08-13
GalaxyCMS2
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
I have seen a bug with groups, if i put a name of a user that doesn't exist and i press send gift, the window of the gift page freezes and i can't close maybe there isn't a check if the user exist?
04-08-13
ResD
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Gifts Bugg:
When you give up a limited edition furni you drop the client.
How can I not give furnis of limited edition?
04-08-13
rafa95123
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Well, this fix is the most easy i've found kk... Let's do it!
#7#One Way Gate
Spoiler:
1° Search on HabboEvents > Incoming.cs:
PHP Code:
Incoming.OneWayGate = 1151;
2° Replace for this:
PHP Code:
Incoming.OneWayGate = 3999;
04-08-13
Marlon Colhado
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by ResD
Gifts Bugg:
When you give up a limited edition furni you drop the client.
How can I not give furnis of limited edition?
I will create a solution for this,
04-08-13
rafa95123
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Well people... I've fixed two new things in Swift Emulator:
Mannequin
HabboWheel
I'll improve the Mannequin... For now remains fix when the save Mannequin Save the Name of Mannequin too !
More Later or tomorrow i post the Mannequin Fix :)
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
I think i have find 2 bug.
1. When you use actions/signs, and then goes afk it does use it automatic and make other players that have used actions/signs in the room use it without click it.
2. Room settings to walk trough users does not save.
Or maybe that's just me.
IAM NOT ASKING FOR HELP!
04-08-13
jales
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
It would be nice if every update made to the emulator you've put up for download as open source, and some codes did not work on mine.
Sorry my english, I'm Brazilian.
04-08-13
rafa95123
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by jales
It would be nice if every update made to the emulator you've put up for download as open source, and some codes did not work on mine.
Sorry my english, I'm Brazilian.
what codes don't work with you ?
04-08-13
Psherk
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by jales
It would be nice if every update made to the emulator you've put up for download as open source, and some codes did not work on mine.