Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 2 of 2
  1. #1
    Graphics Guru

    Join Date
    Feb 2009
    Posts
    1,377
    Post Thanks / Like
    Rep Power
    22
    Reputation
    382

    Post Anti Dual Boxing Script


    Register to remove this ad

    Script that can help stop multiple logins per IP Address.

    I am not the developer of this script
    , I'm just sharing this line of code with everyone that wants to use it on their server, if they so choose.
    This script will only work on any revision after (7240faf), which was committed on June 21st, 2014. Some edits might be required, so keep that in mind.

    Notice
    : Players are still able to login to the character screen with this, but not the world. After the player(s) hit the "Enter World" button, they will be disconnected on that secondary account.

    Code:
    /***
     *  @project: Firestorm Freelance
     *  @author: Meltie2013 (github) aka Lilcrazy
     *  @copyright: 2017
     */
    
    #include "ScriptMgr.h"
    
    #include "World.h"
    #include "WorldSession.h"
    
    // Check to see if the player is attempting to multi-box
    class multi_login_check : public PlayerScript
    {
    public:
        multi_login_check() : PlayerScript("multi_login_check") { }
    
        void OnLogin(Player* player, bool /*firstLogin*/) override
        {
            SessionMap sessions = sWorld->GetAllSessions();
            for (SessionMap::iterator itr = sessions.begin(); itr != sessions.end(); ++itr)
            {
                if (Player* login = itr->second->GetPlayer())
                {
                    if (player != login)
                    {
                        // If Remote Address matches, remove the player from the world
                        if (player->GetSession()->GetRemoteAddress() == login->GetSession()->GetRemoteAddress())
                            player->GetSession()->KickPlayer();
                    }
                }
            }
        }
    };
    
    
    void AddSC_player_session_checks()
    {
        new multi_login_check;
    }








    › See More: Anti Dual Boxing Script



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Beginner

    Join Date
    Jan 2018
    Posts
    15
    Post Thanks / Like
    Rep Power
    7
    Reputation
    2

    Register to remove this ad
    I want to put this script in my source but I have no knowledge of c ++ and I get this error can help me to fix it to compileCaptura.jpg

 

 

Visitors found this page by searching for:

nu vot

SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 12:32 PM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org