Release Pets 100% [Mysql y C#]+ Dragone,Rana,Ragno,Pulcino

Ciao Tutti

Utente bannato
Autore del topic
13 Gennaio 2011
241
0
Miglior risposta
0
Ciao sciax vi posto questi fix per i pets ragno,rana,pulcino e drago


Andate in Catalog.cs si trova in (Messages\Requests/Catalog.cs)dopo
private void CheckPetName()
{
Session.GetMessageHandler().GetResponse().Init(36);
Session.GetMessageHandler().GetResponse().AppendInt32(UberEnvironment.GetGame().GetCatalog().CheckPetName(Request.PopFixedString()) ? 0 : 2);
Session.GetMessageHandler().SendResponse();
}

mettete
rivate void PetRaces()
{
string PetType = Request.PopFixedString();

int Type = Convert.ToInt32(PetType.Substring(6));

if (Type < 0) { return; }

int count = 0;

GetResponse().Init(827);

if (Type == 0)
{
count = 25;
}
else if (Type == 1)
{
count = 25;
}
else if (Type == 2)
{
count = 12;
}
else if (Type == 3)
{
count = 7;
}
else if (Type == 4)
{
count = 4;
}
else if (Type == 5)
{
count = 7;
}
else if (Type == 6)
{
count = 13;
}
else if (Type == 7)
{
count = 8;
}
else if (Type == 8)
{
count = 13;
}

else if (Type == 10)
{
count = 14;
}

else if (Type == 11)
{
count = 13;
}
else if (Type == 12)
{
count = 8;
}

GetResponse().AppendStringWithBreak("a0 pet" + Type);
GetResponse().AppendInt32(count);

for (int i = 0; i < count; i++)
{
GetResponse().AppendInt32(Type); // pet id
GetResponse().AppendInt32(i); // raza id
GetResponse().AppendBoolean(true); // activado
GetResponse().AppendBoolean(false); // desactivado wtf?
}

SendResponse();
}

poi mettete
RequestHandlers[42] = new RequestHandler(CheckPetName);

mettete
RequestHandlers[3007] = new RequestHandler(PetRaces);

Andate in ahora en HabboHotel/Catalogs/Catalog.cs

cercate
public void DeliverItems(GameClient Session, Item Item, int Amount, String ExtraData)

Lo cancellate e inserite questo
public void DeliverItems(GameClient Session, Item Item, int Amount, String ExtraData)
{
switch (Item.Type.ToLower())
{
case "i":
case "s":

for (int i = 0; i < Amount; i++)
{
uint GeneratedId = GenerateItemId();

switch (Item.InteractionType.ToLower())
{
case "pet":

string[] PetData = ExtraData.Split('\n');
int PetType = 0;

switch (PetData[3])
{
// Valid ItemID's
case "2349":
PetType = 5; // Pig
break;

case "2430":
PetType = 3; // Terrier
break;

case "2431":
PetType = 4; // Bear
break;

case "2432":
PetType = 1; // Cat
break;

case "2433":
PetType = 0; // Dog
break;

case "2434":
PetType = 2; // Crocodile
break;

case "7457":
PetType = 6; // Lion
break;


case "5354":
PetType = 7; // Rino
break;

case "6000":
PetType = 8; // araña
break;

case "6001":
PetType = 11; // rana
break;

case "6002":
PetType = 10;
break;

case "9465":
PetType = 12; // Dragon
break;

default:
PetType = 6; // Error
Session.SendNotif("Something went wrong! The item type could not be processed. Please do not try to buy this item anymore, instead inform support as soon as possible.");
break;
}

if (PetType != 6)
{
Pet GeneratedPet = CreatePet(Session.GetHabbo().Id, PetData[0], PetType, PetData[1], PetData[2]);

Session.GetHabbo().GetInventoryComponent().AddPet(GeneratedPet);
Session.GetHabbo().GetInventoryComponent().AddItem(GeneratedId, 320, "0");
}
else
{
UberEnvironment.GetLogging().WriteLine("Pet Error: " + "Someone just tried to buy ItemID: " + PetData[3] + " which is not a valid pet. (Catalog.cs)", Core.LogLevel.Error);
}
break;

Pets al 100% se nn avete questi animali nel catalogo inserite questi sql

Dragone
insert into `catalog_items`(`id`,`page_id`,`item_ids`,`catalog_name`,`cost_credits`,`cost_pixels`,`amount`) values (9465,720,'9465','a0 pet12',30,0,1);
insert into `catalog_pages`(`id`,`parent_id`,`caption`,`icon_color`,`icon_image`,`visible`,`enabled`,`min_rank`,`club_only`,`coming_soon`,`order_num`,`page_layout`,`page_headline`,`page_teaser`,`page_special`,`page_text1`,`page_text2`,`page_text_details`,`page_text_teaser`) values (720,14,'Dragones',1,109,'1','1',1,'0','0',-13,'pets','catalog_pet_headline1_es','','','¡La nueva mascota dragón ya está aquí! Mas rapidos que cualquier otro hotel, les traemos a ustedes la nueva mascota que hara arder tus salas.','','','');
insert into `furniture`(`id`,`public_name`,`item_name`,`type`,`width`,`length`,`stack_height`,`can_stack`,`can_sit`,`is_walkable`,`sprite_id`,`allow_recycle`,`allow_trade`,`allow_marketplace_sell`,`allow_gift`,`allow_inventory_stack`,`interaction_type`,`interaction_modes_count`,`vending_ids`) values (9465,'Dragon','a0 pet12','s',1,1,1,'1','0','0',9465,'1','1','1','1','1','pet',0,'0');

Rana,Ragno,pulcino
INSERT INTO `catalog_pages` (`id`, `parent_id`, `caption`, `icon_image`, `order_num`, `page_layout`, `page_headline`, `page_text1`, `page_text_details`) VALUES ('169', '14', 'Spider', '95', '0', 'pets', 'catalog_pet_headline1', 'One of the most feared creatures in nature, and perhaps the most misunderstood. The majority of Spiders are predators with sharp fangs that inject venom into their prey- but dont worry, these spiders wont bite you! Maybe...', 'Name your pet:');
INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `cost_pixels`, `amount`) VALUES ('6000', '169', '20600', 'a0 pet8', '20', '0', '1');
INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, `interaction_modes_count`) VALUES ('20600', 'Spiders', 'a0 pet8', '3817', '0', '0', '0', '0', '0', 'pet', '0');

INSERT INTO `catalog_pages` (`id`, `parent_id`, `caption`, `icon_image`, `order_num`, `page_layout`, `page_headline`, `page_text1`, `page_text_details`) VALUES ('170', '14', 'Frog', '97', '0', 'pets', 'catalog_pet_headline1', 'The Frog. Cute, green and slimy! Frogs come in a variety of weird colours and can be found all over the world. Frogs are great jumpers, and make great pets, but are harder to hold onto than a supermodel in a tornado', 'Name your frog:');
INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `amount`) VALUES ('6001', '170', '20601', 'a0 pet11', '20', '1');
INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, `interaction_modes_count`) VALUES ('20601', 'Frogs', 'a0 pet11', '1532', '0', '0', '0', '0', '0', 'pet', '0');

INSERT INTO `catalog_pages` (`id`, `parent_id`, `caption`, `icon_image`, `order_num`, `page_layout`, `page_headline`, `page_text1`, `page_text_details`) VALUES ('171', '14', 'Chick', '107', '0', 'pets', 'catalog_pet_headline1', 'Habboon is full of chicks (the pet kind!) Adopt your new born chicklet now and start training it to perform the Chicken Dance for your friends... it will be a show to remember!', 'Name your chick:');
INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `amount`) VALUES ('6002', '171', '20602', 'a0 pet10', '20', '1');
INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, `interaction_modes_count`) VALUES ('20602', 'Chicks', 'a0 pet10', '1532', '0', '0', '0', '0', '0', 'pet', '0');

screen:
11052110.png

fonte kekomundo
 
Riferimento: Pets 100% [Mysql y C#]+ Dragone,Rana,Ragno,Pulcino

Bravo una miniguida per fixare i pets bravo :emoji_smiley: