Jump to content

tmoitoi

Inactive Member
  • Posts

    158
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by tmoitoi

  1. On 4/1/2019 at 6:05 PM, ReFresh said:

    @tmoitoi Btw. Do you know how I can make it eye better looking? This looks very bad and it's very bad readable. Something like make a new variable and input in the variable a chat commands.

    			if (!(std::string(buf).find("(Ȳ´ç)") != std::string::npos || std::string(buf).find("(µ·)") != std::string::npos
    				|| std::string(buf).find("(±â»Ý)") != std::string::npos || std::string(buf).find("(ÁÁľĆ)") != std::string::npos
    				|| std::string(buf).find("(»ç¶ű)") != std::string::npos || std::string(buf).find("(şĐłë)") != std::string::npos
    				|| std::string(buf).find("(ľĆÇĎ)") != std::string::npos || std::string(buf).find("(żěżď)") != std::string::npos
    				|| std::string(buf).find("(ÁËĽŰ)") != std::string::npos || std::string(buf).find("(!)") != std::string::npos
    				|| std::string(buf).find("(?)") != std::string::npos || std::string(buf).find("(fish)") != std::string::npos
    				|| std::string(buf).find("(celebration)") != std::string::npos || std::string(buf).find("(alcohol)") != std::string::npos
    				|| std::string(buf).find("(weather3)") != std::string::npos || std::string(buf).find("(letter)") != std::string::npos
    				|| std::string(buf).find("(hungry)") != std::string::npos || std::string(buf).find("(busy)") != std::string::npos
    				|| std::string(buf).find("(charging)") != std::string::npos || std::string(buf).find("(call)") != std::string::npos
    				|| std::string(buf).find("(weather1)") != std::string::npos || std::string(buf).find("(weather2)") != std::string::npos
    				|| std::string(buf).find("(siren)") != std::string::npos || std::string(buf).find("(nosay)") != std::string::npos
    				|| std::string(buf).find("(whirl)") != std::string::npos))
    			{
    				sys_log(0, "CHAT_HACK: %s", ch->GetName());
    				ch->GetDesc()->DelayedDisconnect(5);
    			}

     

    Hi, 

    I was not active all this time along, I don't know if you are still using this, but you can simplify like this:

    if (ch->IncreaseChatCounter() >= 10)
        {
            if (ch->GetChatCounter() == 10)
            {
    			strlcpy(buf, data + sizeof(TPacketCGChat), MIN(iExtraLen + 1, sizeof(buf)));
            	std::vector<std::string> stringsToFind = {"(Ȳ´ç)", "(µ·)", "(±â»Ý)", "(ÁÁľĆ)", "(»ç¶ű)", "(şĐłë)", "(ľĆÇĎ)", "(żěżď)", "(ÁËĽŰ)", "(!)", "(?)", "(fish)", "(celebration)", "(alcohol)", "(weather3)", "(letter)", "(hungry)", "(busy)", "(charging)", "(call)", "(weather1)", "(weather2)", "(siren)", "(nosay)", "(whirl)"};
    			bool found = false;
                for(const auto &str : stringsToFind) {
                  if (std::string(buf).find(str) != std::string::npos) {
                    found = true;
                    break;
                  }
            }
            if (!found) {
                sys_log(0, "CHAT_HACK: %s", ch->GetName());
                ch->GetDesc()->DelayedDisconnect(5);
            }
          }
    
        return iExtraLen;
      }

     

    • Metin2 Dev 1
  2. Hi there, 

     

    Just added the RenderTarget system recently and I get a problem, nobody has talked about that so..

     

    When you launch an other gameclient for example or execute something as administrator, the gameclient graphic get freeze, but, you can move ingame/move mouve and ear sounds.

     

    Any idea ?

     

    Thx

  3. It depend of "how" you use it, using a TeamSpeak 3 module can be fun due to the many plugins who exist about auto moderation and many things like that like (Auto ban if spam music ..) and others, to give the possibility to the player to enable/disable the system and to change volume, and I mean TeamSpeak 3 for Server, not the software TeamSpeak 3 for players, I'm been speaking about a distance vocal for example if the player is near u, u hear him, not if he go blue map 1 and you stay map 1 red or have to many distances on the same map..

  4. Hi guys, 

    I was asking myself, maybe anyone has already worked on anything like that, why not an ingame voice like the plugin TaskForce Radio for Arma 3 ? 
    Something like, you have the voice chat on the current map/zone/near and other possibilites like that ?
    To be honnest I haven't tried anything about it for the moment but I think that TeamSpeak 3 must be the best to use for it  (Regarding ts3 sdk https://teamspeak.com/en/more/developers/)

    What do you think about a system like it ?

  5. DHCP is an automatic IP assigniation who make few requests, many hostings like OVH doesn't allow it because it don't use the right network configuration as they want and also make flood of local-network also they don't allow it, it depend of how they make the VPS and of hostings.

    You need to use a manual network configuration like @dmitry told, if your hosting use the same way as OVH you can look at this -> https://docs.ovh.com/fr/dedicated/network-bridging/

  6. il y a 21 minutes, tmoitoi a dit :

    Like I told you upper, make an exeption on the code of the /commands, but I don't recommend you this function in any cases because it can be a security issue.
     

    
       if (ch->IncreaseChatCounter() >= 10)
        {
            if (ch->GetChatCounter() == 10)
            {
    			strlcpy(buf, data + sizeof(TPacketCGChat), MIN(iExtraLen + 1, sizeof(buf)));
                if (!(std::string(buf).find("/your_command_xxx") != std::string::npos || std::string(buf).find("your_command_xxx2") != std::string::npos)) {
                sys_log(0, "CHAT_HACK: %s", ch->GetName());
                ch->GetDesc()->DelayedDisconnect(5);
                }
            }
    
            return iExtraLen;
        }

     

    Go to input_main.cpp, search for CHAT_HACK and change like I do upper then if, for example, your emotion commands is "/sky" you change /your_command_xxx by /sky, be carrefull, i've edited code he was wrong.

     

    Hope you understand

  7. il y a 47 minutes, ReFresh a dit :

    ref

    Like I told you upper, make an exeption on the code of the /commands, but I don't recommend you this function in any cases because it can be a security issue.
     

       if (ch->IncreaseChatCounter() >= 10)
        {
            if (ch->GetChatCounter() == 10)
            {
                if (!(std::string(buf).find("/your_command_xxx") != std::string::npos || std::string(buf).find("your_command_xxx2") != std::string::npos)) {
                    sys_log(0, "CHAT_HACK: %s", ch->GetName());
                    ch->GetDesc()->DelayedDisconnect(5);
                }
            }
    
            return iExtraLen;
        }

     

  8. Hi there, thank for the viewing, I've got an ask guys, 

    I'm working on language quest today and I got a problem never seen before, I wan't to use a local select function on my quest with a "when login begin" BUT.

    But, when I make any choice, It didn't work, I've tried the same quest just replacing the when login begin with a with xxx.use begin and so the quest work completly.

    Any idea ?

    Thx

     

    I mean this fucntion:


     

                        local c=select("1", "2")
                    
                        if 1 == c then
                        chat("1")
                        
                        elseif 2 == c then
                        chat("1")

     

  9. Hi, 

    I don't recommend you to remove this protection who block the chat/pm spam.

    I don't know what code you've taked because i've not this system but you can simply increase the Counter before kick function change 10 to 15 for example, or just make an exception in this part if user use "x command" on the chat.

    PgGYei3.png

  10. I don't use vs2008 xD

     I just tell it because many people will come there and cry because they've followed tutorials ?

     

    Anyway your system works but there's 2 problems I let you show 

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif (1 can be fixed easly on the source)

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    (Without submitting anything)

     

     

    • Dislove 1
    • Think 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.