Skip to content

ERROR IN FAKEPLAYERUTILS - PM

Featured Replies

Good afternoon / day / night everyone! I'm having a bug on my game server when I try to send fakeplayer pm! The function is that he answers me, but he does not even receive the message and I still receive this message in gs .. could someone help me please? I don't know what to do anymore = /

Ps: Sorry for bad english! is Google tradutor :)

 

https://uploaddeimagens.com.br/imagens/error-png-180d644b-8ed5-4522-bf67-3e4fdadadf9a

 

L8rqCD.png

 

 

  • Author

part of the code that does the pm responder function:
 

    public static void answerPlayers(L2PcInstance sender, FakePlayer receiver, String text)
    {
        ThreadPoolManager.getInstance().scheduleAi(new Runnable()
        {
            @Override
            public void run()
            {
                for (String s : CUMPLIMENTS)
                {
                    if (text.equals(s))
                    {
                        _answer = CUMPLIMENTS[Rnd.get(CUMPLIMENTS.length - 1)];
                        _isCumpliment = true;
                    }
                }
                if (!_isCumpliment)
                {
                    _answer = PHRASES[Rnd.get(PHRASES.length - 1)];
                }
                
                sender.sendPacket(new CreatureSay(receiver.getObjectId(), Say2.TELL, receiver.getName(), _answer));
            }
            
        }, Rnd.get(10, 50) * 1000);
    }
    

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.