[AJUDA]erro no bot de boas vindas

+2
iSkell
skorpian69
6 participantes

skorpian69 skorpian69  • 30.12.16 18:13

[AJUDA]erro no bot de boas vindas Empty [AJUDA]erro no bot de boas vindas 30.12.16 18:13


Olá amigos do Power Pixel, estou com um problema. Me ajudem?
O meu problema é o seguinte:

Olá, tem por ai um toturial explicando como bota o boot de boas vindas, eu peguei nas SQL e botei na DB e ficou correto, mas agora quando entro no hotel ele desconeta, o que fiz de errado ou me expliquem certo como faz e se é preciso ter o boot comprado e colocado em algum lugar, se puderem explicar certo agradecia, obrigado

Será que é fácil resolver este erro?
Veja minhas configurações, poderá ajudar!
Meu emulador é o
PLUS
Minha CMS é a
 
Meu hotel está no
 vertrigo
Como sei que uma imagem vale mais que mil palavras, olhe o print:


Desde já obrigado. Aguardarei respostas!
                 

iSkell iSkell  • 30.12.16 18:15

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:15

Primeiramente, não recomendo o vertrigo, pois ele já é antigo mesmo, use XAMPP! Segundo,  não é apenas para executar as SQL, também precisa adicionar os códigos no emulador e dar debug! Você fez isso certinho?

xNectar xNectar  • 30.12.16 18:17

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:17

Voce abriu o arquivo do tópico do com o VS e apertou CTRL+A e substituiu tudo pelo arquivo do pastebin (1° passo)?

skorpian69 skorpian69  • 30.12.16 18:20

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:20

é isso que falta, onde acho esse pastebin ou lá como se chama no emu? os codigos que aparece RAW não botei não, pensei que fosse os mesmo :D, onde bota esses mesmo? desculpem a "burrice" mas sou novo nisto e só faço para aprender um pouco estas coisas

iSkell iSkell  • 30.12.16 18:26

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:26

Abra a source do emulador com o visual studio... vá no diretorio: "\ Communication \ Packets \ Incoming \ Rooms \ Engine \ GetRoomEntryDataEvent.cs" e substitua todo o código por esse:



[list=text]
[*]using System;

[*]using System.Linq;

[*]using System.Text;

[*]using System.Collections.Generic;

 
[*]using Plus.HabboHotel.Rooms;

[*]using Plus.HabboHotel.Groups;

[*]using Plus.HabboHotel.Items.Wired;

 
[*]using Plus.Communication.Packets.Outgoing.Rooms.Engine;

[*]using Plus.Communication.Packets.Outgoing.Rooms.Chat;

[*]using Plus.Communication.Packets.Outgoing.Users;

[*]using Plus.Communication.Packets.Outgoing.Navigator;

 
[*]using Plus.HabboHotel.Rooms;

 
[*]using Plus.Database.Interfaces;

[*]using Plus.Communication.Packets.Outgoing.Inventory.Purse;

[*]using System.Data;

[*]using Plus.HabboHotel.Rooms.AI.Speech;

[*]using Plus.HabboHotel.Rooms.AI;

 
[*]namespace Plus.Communication.Packets.Incoming.Rooms.Engine

[*]{

[*]    class GetRoomEntryDataEvent : IPacketEvent

[*]    {

[*]        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)

[*]        {

[*]            if (Session == null || Session.GetHabbo() == null)

[*]                return;

 
[*]            Room Room = Session.GetHabbo().CurrentRoom;

[*]            if (Room == null)

[*]                return;

 
[*]            if (Session.GetHabbo().InRoom)

[*]            {

[*]                Room OldRoom;

 
[*]                if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out OldRoom))

[*]                    return;

 
[*]                if (OldRoom.GetRoomUserManager() != null)

[*]                    OldRoom.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);

[*]            }

 
[*]            if (!Room.GetRoomUserManager().AddAvatarToRoom(Session))

[*]            {

[*]                Room.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);

[*]                return;//TODO: Remove?

[*]            }

 
[*]            Room.SendObjects(Session);

 
[*]            //Status updating for messenger, do later as buggy.

 
[*]            try

[*]            {

[*]                if (Session.GetHabbo().GetMessenger() != null)

[*]                    Session.GetHabbo().GetMessenger().OnStatusChanged(true);

[*]            }

[*]            catch { }

 
[*]            if (Session.GetHabbo().GetStats().QuestID > 0)

[*]                PlusEnvironment.GetGame().GetQuestManager().QuestReminder(Session, Session.GetHabbo().GetStats().QuestID);

 
[*]            Session.SendMessage(new RoomEntryInfoComposer(Room.RoomId, Room.CheckRights(Session, true)));

[*]            Session.SendMessage(new RoomVisualizationSettingsComposer(Room.WallThickness, Room.FloorThickness, PlusEnvironment.EnumToBool(Room.Hidewall.ToString())));

 
[*]            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);

 
[*]            if (ThisUser != null && Session.GetHabbo().PetId == 0)

[*]                Room.SendMessage(new UserChangeComposer(ThisUser, false));

 
[*]            Session.SendMessage(new RoomEventComposer(Room.RoomData, Room.RoomData.Promotion));

 
[*]            if (Room.GetWired() != null)

[*]                Room.GetWired().TriggerEvent(WiredBoxType.TriggerRoomEnter, Session.GetHabbo());

 
[*]            if (PlusEnvironment.GetUnixTimestamp() < Session.GetHabbo().FloodTime && Session.GetHabbo().FloodTime != 0)

[*]                Session.SendMessage(new FloodControlComposer((int)Session.GetHabbo().FloodTime - (int)PlusEnvironment.GetUnixTimestamp()));

 
[*]            if (Room.OwnerId == Session.GetHabbo().Id)

[*]            {

[*]                DataRow dFrank = null;

[*]                using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())

[*]                {

[*]                    dbClient.SetQuery("SELECT bot_frank FROM users WHERE id = '" + Session.GetHabbo().Id + "'");

[*]                    dFrank = dbClient.getRow();

[*]                }

 
[*]                if (Convert.ToBoolean(dFrank["bot_frank"]) == false)

[*]                {

[*]                    using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())

[*]                    {

[*]                        dbClient.RunQuery("UPDATE users SET bot_frank = 'true' WHERE id = " + Session.GetHabbo().Id + ";");

[*]                        dbClient.RunQuery("UPDATE users SET nux_user = 'false' WHERE id = " + Session.GetHabbo().Id + ";");

[*]                    }

[*]                    string Chat1 = PlusEnvironment.GetDBConfig().DBData["frank.chat.1"];

[*]                    string Chat2 = PlusEnvironment.GetDBConfig().DBData["frank.chat.2"];

[*]                    string Chat3 = PlusEnvironment.GetDBConfig().DBData["frank.chat.3"];

[*]                    string Chat4 = PlusEnvironment.GetDBConfig().DBData["frank.chat.4"];

[*]                    string Chat5 = PlusEnvironment.GetDBConfig().DBData["frank.chat.5"];

[*]                    string Credits = PlusEnvironment.GetDBConfig().DBData["frank.give.credits"];

[*]                    string Diamonds = PlusEnvironment.GetDBConfig().DBData["frank.give.diamonds"];

[*]                    string Duckets = PlusEnvironment.GetDBConfig().DBData["frank.give.duckets"];

[*]                    string Gotws = PlusEnvironment.GetDBConfig().DBData["frank.give.gotws"];

[*]                    string Furni = PlusEnvironment.GetDBConfig().DBData["frank.give.furni"];

 
[*]                    List<RandomSpeech> BotSpeechList = new List<RandomSpeech>();

[*]                    Console.WriteLine("Só se mostra bot e nuxs 1 vez por usuario.");

[*]                    int X = 0;

[*]                    int Y = 0;

[*]                    string hola = "false";

[*]                    RoomUser BotUser = Room.GetRoomUserManager().DeployBot(new RoomBot(0, Session.GetHabbo().CurrentRoomId, "generic", "freeroam", "Frank", "Manager del hotel", "hr-3194-38-36.hd-180-1.ch-220-1408.lg-285-73.sh-906-90.ha-3129-73.fa-1206-73.cc-3039-73", X, Y, 0, 4, 0, 0, 0, 0, ref BotSpeechList, "", 0, 0, false, 0, Convert.ToBoolean(hola), 1), null);

[*]                    System.Threading.Thread.Sleep(5000); // Mensaje bienvenida

[*]                    BotUser.Chat(Chat1, false, 0);

[*]                    System.Threading.Thread.Sleep(8000); // Segundo mensaje

[*]                    BotUser.Chat(Chat2, false, 0);

[*]                    System.Threading.Thread.Sleep(8000); // Tercer mensaje, entrega de monedas

[*]                    if (!string.IsNullOrWhiteSpace(Credits) && !string.IsNullOrWhiteSpace(Diamonds) && !string.IsNullOrWhiteSpace(Duckets) && !string.IsNullOrWhiteSpace(Gotws))

[*]                    {

[*]                        BotUser.Chat("Você tem " + Credits + " créditos, " + Diamonds + " diamantes, " + Duckets + " duckets, " + Gotws + " estrelas e nubes!", false, 0);

[*]                        Session.GetHabbo().Credits += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.credits"]);

[*]                        Session.GetHabbo().Diamonds += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.diamonds"]);

[*]                        Session.GetHabbo().Duckets += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.duckets"]);

[*]                        Session.GetHabbo().GOTWPoints += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.gotws"]);

[*]                        Session.SendMessage(new CreditBalanceComposer(Session.GetHabbo().Credits));

 
[*]                    }

[*]                    else if (!string.IsNullOrWhiteSpace(Credits) && !string.IsNullOrWhiteSpace(Diamonds) && !string.IsNullOrWhiteSpace(Duckets) && !string.IsNullOrWhiteSpace(Gotws))

[*]                    {

[*]                        BotUser.Chat("Você tem " + Credits + " créditos, " + Diamonds + " diamantes, " + Duckets + " duckets e " + Gotws + " estrelas!", false, 0);

[*]                        Session.GetHabbo().Credits += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.credits"]);

[*]                        Session.GetHabbo().Diamonds += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.diamonds"]);

[*]                        Session.GetHabbo().Duckets += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.duckets"]);

[*]                        Session.GetHabbo().GOTWPoints += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.gotws"]);

[*]                        Session.SendMessage(new CreditBalanceComposer(Session.GetHabbo().Credits));

[*]                        Session.SendMessage(new ActivityPointsComposer(Session.GetHabbo().Duckets, Session.GetHabbo().Diamonds, Session.GetHabbo().GOTWPoints));

[*]                    }

[*]                    else if (!string.IsNullOrWhiteSpace(Credits) && !string.IsNullOrWhiteSpace(Diamonds) && !string.IsNullOrWhiteSpace(Duckets))

[*]                    {

[*]                        BotUser.Chat("Você tem " + Credits + " créditos, " + Diamonds + " diamantes e " + Duckets + " duckets!", false, 0);

[*]                        Session.GetHabbo().Credits += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.credits"]);

[*]                        Session.GetHabbo().Diamonds += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.diamonds"]);

[*]                        Session.GetHabbo().Duckets += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.duckets"]);

[*]                        Session.SendMessage(new CreditBalanceComposer(Session.GetHabbo().Credits));

[*]                        Session.SendMessage(new ActivityPointsComposer(Session.GetHabbo().Duckets, Session.GetHabbo().Diamonds, Session.GetHabbo().GOTWPoints));

[*]                    }

[*]                    else if (!string.IsNullOrWhiteSpace(Credits) && !string.IsNullOrWhiteSpace(Diamonds))

[*]                    {

[*]                        BotUser.Chat("Você tem " + Credits + " créditos y " + Diamonds + " diamantes!", false, 0);

[*]                        Session.GetHabbo().Credits += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.credits"]);

[*]                        Session.GetHabbo().Diamonds += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.diamonds"]);

[*]                        Session.SendMessage(new CreditBalanceComposer(Session.GetHabbo().Credits));

[*]                        Session.SendMessage(new ActivityPointsComposer(Session.GetHabbo().Duckets, Session.GetHabbo().Diamonds, Session.GetHabbo().GOTWPoints));

[*]                    }

[*]                    else if (!string.IsNullOrWhiteSpace(Credits))

[*]                    {

[*]                        BotUser.Chat("Você tem " + Credits + " créditos!", false, 0);

[*]                        Session.GetHabbo().Credits += Convert.ToInt32(PlusEnvironment.GetDBConfig().DBData["frank.give.credits"]);

[*]                        Session.SendMessage(new CreditBalanceComposer(Session.GetHabbo().Credits));

[*]                    }

[*]                    else

[*]                    {

[*]                        BotUser.Chat("Não iremos te dar nada por enquanto.", false, 0);

[*]                    }

[*]                    if (!string.IsNullOrWhiteSpace(Chat4) || !string.IsNullOrEmpty(Furni))

[*]                    {

[*]                        System.Threading.Thread.Sleep(8000); // Cuarto mensaje, entrega de furni

[*]                        BotUser.Chat(Chat4, false, 0);

[*]                        DataRow dFurni = null;

[*]                        using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())

[*]                        {

[*]                            dbClient.SetQuery("SELECT public_name FROM furniture WHERE id = '" + Convert.ToInt32(Furni) + "'");

[*]                            dFurni = dbClient.getRow();

[*]                        }

[*]                        Session.GetHabbo().GetInventoryComponent().AddNewItem(0, Convert.ToInt32(Furni), Convert.ToString(dFurni["public_name"]), 1, true, false, 0, 0);

[*]                        Session.GetHabbo().GetInventoryComponent().UpdateItems(false);

[*]                    }

[*]                    System.Threading.Thread.Sleep(8000); // Quinto ida del bot y sale el resto de las nux's

[*]                    BotUser.Chat(Chat5, false, 0);

[*]                    Room.GetGameMap().RemoveUserFromMap(BotUser, new System.Drawing.Point(0, 0));

[*]                    Room.GetRoomUserManager().RemoveBot(BotUser.VirtualId, false);

[*]                }

[*]                else

[*]                {

[*]                    Console.WriteLine("¡No se muestra el bot ni las nux's!");

[*]                }

[*]            }

 
[*]        }

 
[*]    }

[*]}

[/list]


(http://pastebin.com/yTpN1eNy)


Salve e debugue o emulador!

skorpian69 skorpian69  • 30.12.16 18:37

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:37

e boto as SQL na DB certo? e preciso de ter 1 boot em algum lugar para dar certo ou o boot vai aparecer sozinho?

iSkell iSkell  • 30.12.16 18:39

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:39

Bota as SQL sim... O BOT aparece sozinho já! Crie uma conta nova para teste!

skorpian69 skorpian69  • 30.12.16 18:51

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:51

obrigado, vou testar

iSkell iSkell  • 30.12.16 18:51

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 18:51

De nada!

skorpian69 skorpian69  • 30.12.16 19:03

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:03

acabei de logar com conta nova e não apareceu nada de nada :(

iSkell iSkell  • 30.12.16 19:05

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:05

deu debug no emulador depois das ediçoes e executou as sql?

xNectar xNectar  • 30.12.16 19:16

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:16

Você tem que criar um quarto em uma conta nova aí aparecerá o Bot.

skorpian69 skorpian69  • 30.12.16 19:24

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:24

ja criei, será por isto estar automatico que quando entra novo vai logo na recepção? eu fiz tudo certo agora e nada, será por isso?

xNectar xNectar  • 30.12.16 19:34

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:34

Não cara, você não tá sabendo interpretar. Você tem que criar um quarto na conta NOVA e não definir ele como home _ room de todo mundo, ele tem que ser um quarto do próprio dono da conta.

skorpian69 skorpian69  • 30.12.16 19:39

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:39

Sim, eu criei nova conta, isto automatico vai para a recepção, lá criei 1 quarto novo na conta nova mas ate agora nada de Frank, eu peguei na SQL e botei na DB ficou bem, peguei no codigo, abri o visual, abri lá a pasta no rooms e tal, apaeguei o codigo e botei esse e salvei.

xNectar xNectar  • 30.12.16 19:48

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:48

Você não deu debuf provavelmente,já era pra ter dado zzz. 3 amigos meus usaram este mesmo tutorial e no deles está normal. Provavelmente você não deu debug

skorpian69 skorpian69  • 30.12.16 19:49

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 19:49

haaaa já vi o erro, não é salvar, desculpe, sou mesmo burro, pensei que DEBUG era salvar, meu deus como sou burro, como dá debug nesta coisa?


DEBUG FICA ASSIM? olhem print, tentei mas não sei se é assim que fica depois de dar debug.

https://postimg.org/image/hbrh2yyld/

xNectar xNectar  • 30.12.16 20:18

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 20:18

Sim, exato. zzz

skorpian69 skorpian69  • 30.12.16 20:20

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 30.12.16 20:20

Aqueles erros lá na direita, são normais?

nadi0s nadi0s  • 01.01.17 13:17

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 01.01.17 13:17

Usuário satisfeito?

Brytch Brytch  • 01.01.17 13:19

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 01.01.17 13:19

[alerta=[AJUDA]erro no bot de boas vindas H5W0zbq] O autor do tópico possui 24 horas para informar se a questão foi resolvida! [/alerta]

skorpian69 skorpian69  • 01.01.17 13:36

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 01.01.17 13:36

Não foi resolvida, mas pode fechar

Wake Wake  • 02.01.17 6:24

AdministradorMembro da Equipa

[AJUDA]erro no bot de boas vindas Empty Re: [AJUDA]erro no bot de boas vindas 02.01.17 6:24

Tópico fechado a pedido do autor.
Permissões neste sub-fórum
Não podes responder a tópicos

BH Servers

Recomendamos a BH Servers com proteção DDOS gratuita em Cloud Server de alta performance. Entrega imediata.