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

User Tag List

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

    Join Date
    Feb 2009
    Posts
    1,202
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    15
    Reputation
    344

    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
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    1

    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:

Nobody landed on this page from a search engine, yet!
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 03:36 PM.
Powered by vBulletin® Copyright ©2000-2018, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. User Alert System provided by Advanced User Tagging v3.3.0 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org