Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85
hook proxy defect?
Results 1 to 5 of 5

Thread: hook proxy defect?

  1. #1
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    hook proxy defect?

    Hello.

    I can't get the hook proxy working.

    using this:
    Code:
      client = ClientChooser.ShowBox()
            proxy = New HookProxy(client)
            AddHandler proxy.ReceivedCreatureSpeechIncomingPacket, AddressOf ReceivedCreatureSpeechIncomingPacket
            Me.Text = client.GetPlayer.Name
    But my application don't even start.

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Posts
    689

    hook proxy defect?

    telling us why it "doesn't even start" would be cool

    this piece of code works fine, but be aware that the protocol hasn't be updated yet
    Code:
    {
                client = Client.GetClients()[0];
                var proxy = new Tibia.Packets.HookProxy(client);
                proxy.ReceivedCreatureSpeechIncomingPacket+=new Tibia.Packets.ProxyBase.IncomingPacketListener(proxy_ReceivedCreatureSpeechIncomingPacket);
    }
            private bool proxy_ReceivedCreatureSpeechIncomingPacket(Tibia.Packets.IncomingPacket ip)
            {
                textBox2.Invoke(new MethodInvoker(
                    delegate()
                    {
                        textBox2.Text= ((CreatureSpeechPacket)ip).Message;
                     }));
                return true;
            }

  3. #3
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    hook proxy defect?

    Quote Originally Posted by Farsa
    telling us why it "doesn't even start" would be cool

    this piece of code works fine, but be aware that the protocol hasn't be updated yet
    Code:
    {
                client = Client.GetClients()[0];
                var proxy = new Tibia.Packets.HookProxy(client);
                proxy.ReceivedCreatureSpeechIncomingPacket+=new Tibia.Packets.ProxyBase.IncomingPacketListener(proxy_ReceivedCreatureSpeechIncomingPacket);
    }
            private bool proxy_ReceivedCreatureSpeechIncomingPacket(Tibia.Packets.IncomingPacket ip)
            {
                textBox2.Invoke(new MethodInvoker(
                    delegate()
                    {
                        textBox2.Text= ((CreatureSpeechPacket)ip).Message;
                     }));
                return true;
            }
    Ty farsa I was in a hurry for work :P I was just half done with my post and just posted and shut down my comp.

    On this line the application freezes It wont do the next line:
    Code:
    Dim proxy = New Tibia.Packets.HookProxy(client)
    But when i tried this on xp x64 tibia just closes :S wierd..

  4. #4

    hook proxy defect?

    Try stepping through the application so you can tell us exactly where it freezes.

    Using Visual Studio:

    • Put a breakpoint on that function call
    • Press F5 to start debugging
    • When you get to the breakpoint, press F11 to Step In
    • Then press F10 to Step Over until you find the point where it is stalled

    It might have something to do with waiting on the mutex; make sure you are using a fresh client every time.

  5. #5
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    hook proxy defect?

    Quote Originally Posted by Ian
    Try stepping through the application so you can tell us exactly where it freezes.

    Using Visual Studio:

    • Put a breakpoint on that function call
    • Press F5 to start debugging
    • When you get to the breakpoint, press F11 to Step In
    • Then press F10 to Step Over until you find the point where it is stalled

    It might have something to do with waiting on the mutex; make sure you are using a fresh client every time.
    The application started nice without that line I said. And if I have that line the application won't start and the next line will never break.

    But restarted my comp to xp and now this working. Feeling realy nice to use a hooking proxy. Love this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •