Eae seus dlc, hoje eu venho trazer um comando muito bacana, halloween. Onde você digita :hallo e muda o seu avatar para zumbi e vampiro. Espero que vocês gostem, principalmente no dia do halloween que vir.
Então vamos ao tutorial de como adicionar no seu emulador.
1. Vá em Plus > HabboHotel > Rooms > Chat > Commands > User, e crie uma classe chamada Halloween4Command.cs.
2. Adicione esse code dentro de Halloween4Commands.cs:
Código:
using System;
using System.Threading;
using Plus.Communication.Packets.Outgoing.Rooms.Engine;
using Plus.Database.Interfaces;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;
using Plus.Communication.Interfaces;
using System.Linq;
using System.Text;
using System.Collections.Generic;
namespace Plus.HabboHotel.Rooms.Chat.Commands.User
{
class Halloween4Command : IChatCommand
{
//En este comando haremos:
//Un usuario dirá: Halloween
//El usuario sufrira un cambio en su look de forma random
public string PermissionRequired
{
get { return "command_hallow4"; }
}
public string Parameters
{
get { return ""; }
}
public string Description
{
get { return "Este comando permite que você mude sua aparência para um tipo de disfarce."; }
}
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
Session.SendWhisper("¡Disfruta tu nuevo look!", 34);
RoomUser roomUserByHabbo4 = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (roomUserByHabbo4 == null)
roomUserByHabbo4.ApplyEffect(108);
switch (new Random().Next(1, 4))
{
case 1:
roomUserByHabbo4.ApplyEffect(108);
Session.GetHabbo().Look = "fa-1206-1193.hd-894624589-97544.lg-3023-100.ch-809-100";
Room.SendMessage((IServerPacket)new ChatComposer(roomUserByHabbo4.VirtualId, "*Agora eu sou um zumbi!*", 0, 27), false);
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.SetQuery("UPDATE `users` SET `look` = @look WHERE `id` = @id LIMIT 1");
dbClient.AddParameter("look", Session.GetHabbo().Look);
dbClient.AddParameter("id", Session.GetHabbo().Id);
dbClient.RunQuery();
}
break;
case 2:
roomUserByHabbo4.ApplyEffect(108);
Session.GetHabbo().Look = "lg-3202-100-62.hr-9956282-40.fa-1206-1193.ch-989999858-100.hd-62451-97559";
Room.SendMessage((IServerPacket)new ChatComposer(roomUserByHabbo4.VirtualId, "*Usando o Look Creepy!*", 0, 26), false);
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.SetQuery("UPDATE `users` SET `look` = @look WHERE `id` = @id LIMIT 1");
dbClient.AddParameter("look", Session.GetHabbo().Look);
dbClient.AddParameter("id", Session.GetHabbo().Id);
dbClient.RunQuery();
}
break;
case 3:
roomUserByHabbo4.ApplyEffect(108);
Session.GetHabbo().Look = "lg-3023-1189.he-3082-100.ch-9941044-1193.ha-989999873-62.hr-170-1027.fa-4541998-1193.cc-987462869-110-62.ea-989036-64-64.hd-894624588-97554";
Room.SendMessage((IServerPacket)new ChatComposer(roomUserByHabbo4.VirtualId, "*Usando Look Vampiro!*", 0, 26), false);
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.SetQuery("UPDATE `users` SET `look` = @look WHERE `id` = @id LIMIT 1");
dbClient.AddParameter("look", Session.GetHabbo().Look);
dbClient.AddParameter("id", Session.GetHabbo().Id);
dbClient.RunQuery();
}
break;
default:
roomUserByHabbo4.ApplyEffect(108);
Session.GetHabbo().Look = "lg-3023-1189.he-3082-100.ch-9941044-1193.ha-989999873-62.hr-170-1027.fa-4541998-1193.cc-987462869-110-62.ea-989036-64-64.hd-894624588-97554";
Room.SendMessage((IServerPacket)new ChatComposer(roomUserByHabbo4.VirtualId, "*Eu tenho ocupado o visual Vampiro*", 0, 27), false);
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.SetQuery("UPDATE `users` SET `look` = @look WHERE `id` = @id LIMIT 1");
dbClient.AddParameter("look", Session.GetHabbo().Look);
dbClient.AddParameter("id", Session.GetHabbo().Id);
dbClient.RunQuery();
}
break;
}
Thread.Sleep(500);
roomUserByHabbo4.ApplyEffect(0);
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.SetQuery("UPDATE `users` SET `look` = @look WHERE `id` = @id LIMIT 1");
dbClient.AddParameter("look", Session.GetHabbo().Look);
dbClient.AddParameter("id", Session.GetHabbo().Id);
dbClient.RunQuery();
}
RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (User != null)
{
Session.SendMessage(new UserChangeComposer(User, true));
Room.SendMessage(new UserChangeComposer(User, false));
}
}
}
}
// Zombie Look: fa-1206-1193.hd-894624589-97544.lg-3023-100.ch-809-100
// Look Creepy: lg-3202-100-62.hr-9956282-40.fa-1206-1193.ch-989999858-100.hd-62451-97559
// Look Vampiro: lg-3023-1189.he-3082-100.ch-9941044-1193.ha-989999873-62.hr-170-1027.fa-4541998-1193.cc-987462869-110-62.ea-989036-64-64.hd-894624588-97554
3. Adicione isso em CommandManager.cs
Código:
this.Register("hallo", new Halloween4Command());
Código:
INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`, `command_info`) VALUES ('command_hallow4', 1, 0, '0');
Malibu
ArquivosHps
CallnMx
0 Comentários
Fique a vontade no comentário, estaremos respondendo todas dúvidas por aqui! Aproveite e use nossos emoji's para comentários :)