Mercury Emulator Poll

Results 1 to 11 of 11
  1. #1
    Member Aron123 is offline
    MemberRank
    Mar 2013 Join Date
    BelgiumLocation
    88Posts

    Mercury Emulator Poll

    Anyone has a fix for the poll system in mercury emulator? After clicking on "OK", I disconnect.

    Image of the Poll: http://i60.tinypic.com/b5fj8n.png


  2. #2
    Valued Member wesley66101 is offline
    MemberRank
    Oct 2013 Join Date
    105Posts

    Re: Mercury Emulator Poll

    Post the error that you get, i think it is a packet or structure problem

  3. #3
    Member Aron123 is offline
    MemberRank
    Mar 2013 Join Date
    BelgiumLocation
    88Posts

    Re: Mercury Emulator Poll

    Quote Originally Posted by wesley66101 View Post
    Post the error that you get, i think it is a packet or structure problem
    The weird thing about it is that I dont receive any error in my log files. Also I dont see a notification in the emulator

  4. #4
    Valued Member wesley66101 is offline
    MemberRank
    Oct 2013 Join Date
    105Posts

    Re: Mercury Emulator Poll

    You must be set the error page,
    <?php
    if(isset($_POST)) {
    $client_error_error_cat = $_POST["error_cat"];
    $client_error_error_desc = $_POST["error_desc"];
    $client_error_error_debug = $_POST["debug"
    ]; }
    ?><h1>Hallo!</h1>
    <p>Er is een error voorgekomen! Helaas! Dit zijn de error details:</p>
    <h3>Error #<?php echo $client_error_error_cat; ?></h3>
    <p><?php echo $client_error_error_desc; ?></p>
    <p><?php echo $client_error_error_debug; ?></p>

    What do you get if you set this in your error page

  5. #5
    Member Aron123 is offline
    MemberRank
    Mar 2013 Join Date
    BelgiumLocation
    88Posts

    Re: Mercury Emulator Poll

    Quote Originally Posted by wesley66101 View Post
    You must be set the error page,
    <?php
    if(isset($_POST)) {
    $client_error_error_cat = $_POST["error_cat"];
    $client_error_error_desc = $_POST["error_desc"];
    $client_error_error_debug = $_POST["debug"
    ]; }
    ?><h1>Hallo!</h1>
    <p>Er is een error voorgekomen! Helaas! Dit zijn de error details:</p>
    <h3>Error #<?php echo $client_error_error_cat; ?></h3>
    <p><?php echo $client_error_error_desc; ?></p>
    <p><?php echo $client_error_error_debug; ?></p>

    What do you get if you set this in your error page
    Dont know exactly where I need to add that line of code, cause this is happening: http://prntscr.com/62mlqp

    - - - Updated - - -

    I think it is not fully coded yet, this is what I found in the GameClientMessageHandler.cs file:

    Code:
    internal void AcceptPoll()		{
    			uint key = this.Request.PopWiredUInt();
    			Poll poll = MercuryEnvironment.GetGame().GetPollManager().Polls[key];
    			ServerMessage serverMessage = new ServerMessage(Outgoing.PollQuestionsMessageComposer);
    			serverMessage.AppendUInt(poll.Id);
    			serverMessage.AppendString(poll.PollName);
    			serverMessage.AppendString(poll.Thanks);
    			serverMessage.AppendInt32(poll.Questions.Count);
    			foreach (PollQuestion current in poll.Questions)
    			{
    				int questionNumber = checked(poll.Questions.IndexOf(current) + 1);
    				current.Serialize(serverMessage, questionNumber);
    			}
    			this.Response = serverMessage;
    			this.SendResponse();
    		}
    		internal void RefusePoll()
    		{
    			uint num = this.Request.PopWiredUInt();
                this.Session.GetHabbo().AnsweredPolls.Add(num);
    			using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
    			{
    				queryreactor.setQuery("INSERT INTO user_polldata VALUES (@userid , @pollid , 0 , '0' , '')");
    				queryreactor.addParameter("userid", this.Session.GetHabbo().Id);
    				queryreactor.addParameter("pollid", num);
    				queryreactor.runQuery();
    			}
    		}
    		internal void AnswerPoll()
    		{
    			uint num = this.Request.PopWiredUInt();
    			uint num2 = this.Request.PopWiredUInt();
    			int num3 = this.Request.PopWiredInt32();
    			List<string> list = new List<string>();
    			checked
    			{
    				for (int i = 0; i < num3; i++)
    				{
    					list.Add(this.Request.PopFixedString());
    				}
    				string text = string.Join("\r\n", list);
                    this.Session.GetHabbo().AnsweredPolls.Add(num);
    				using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
    				{
    					queryreactor.setQuery("INSERT INTO user_polldata VALUES (@userid , @pollid , @questionid , '1' , @answer)");
    					queryreactor.addParameter("userid", this.Session.GetHabbo().Id);
    					queryreactor.addParameter("pollid", num);
    					queryreactor.addParameter("questionid", num2);
    					queryreactor.addParameter("answer", text);
    					queryreactor.runQuery();
    				}
    			}
    		}

  6. #6
    Valued Member wesley66101 is offline
    MemberRank
    Oct 2013 Join Date
    105Posts

    Re: Mercury Emulator Poll

    That link, rember it and go to your client file, then replace this:
    "client.fatal.error.url" : "url-of-the-script-that-i-send.com",
    "client.connection.failed.url" : "url-of-the-script-that-i-send.com",

  7. #7
    Member Aron123 is offline
    MemberRank
    Mar 2013 Join Date
    BelgiumLocation
    88Posts

    Re: Mercury Emulator Poll

    Quote Originally Posted by wesley66101 View Post
    That link, rember it and go to your client file, then replace this:
    "client.fatal.error.url" : "url-of-the-script-that-i-send.com",
    "client.connection.failed.url" : "url-of-the-script-that-i-send.com",
    Oh, working now! I received this error: http://prntscr.com/62o2yy

  8. #8
    Valued Member wesley66101 is offline
    MemberRank
    Oct 2013 Join Date
    105Posts

    Re: Mercury Emulator Poll

    Now, put your habbo.swf in as3 sockerer and upload your habboscripts
    Then i can search the structure and/or packet

  9. #9
    Member Aron123 is offline
    MemberRank
    Mar 2013 Join Date
    BelgiumLocation
    88Posts

    Re: Mercury Emulator Poll

    Quote Originally Posted by wesley66101 View Post
    Now, put your habbo.swf in as3 sockerer and upload your habboscripts
    Dont got as3 sockerer atm, is their another way? Im dutch btw ^^,

  10. #10
    Valued Member wesley66101 is offline
    MemberRank
    Oct 2013 Join Date
    105Posts

    Re: Mercury Emulator Poll

    OOoow okay, add my skype then i can speak dutch.
    Last edited by wesley66101; 09-02-15 at 08:20 AM.

  11. #11
    Member Aron123 is offline
    MemberRank
    Mar 2013 Join Date
    BelgiumLocation
    88Posts

    Re: Mercury Emulator Poll

    Anyone else got the working code? :/



Advertisement