Jump to content

Fake Players on WHO List


Recommended Posts

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

The patch doesn't set 'online = 2', so you need to do it manually.

You can create new accounts, create 10 random chars and set them 'online = 2'.

Of course it needs much more work to implement KiriX ideas and maybe an automatic level + map changer. Also, you'll have to change your site's code to show 'online = 2' players as well.

I think the basic idea is to show more players in the Who List for small servers just to try to maintain some new real players that check it. And yes, if they really want to check out, they can know that there are fake players or that is a bug, BUT, maybe they won't delete their char and look for another server.

Link to comment
Share on other sites

The patch doesn't set 'online = 2', so you need to do it manually.

You can create new accounts, create 10 random chars and set them 'online = 2'.

Of course it needs much more work to implement KiriX ideas and maybe an automatic level + map changer. Also, you'll have to change your site's code to show 'online = 2' players as well.

think this map changer and automatic level could be an PHP programm with SOAP support, with an Database of coordinates and the fake Players will be randomly teleportet to them,

and after X hours / Days on the server they get level up

another thing would be to create some randomly player = 2 to an pool of fakeplayers

Link to comment
Share on other sites

1) The patch doesn't set 'online = 2', so you need to do it manually.

You can create new accounts, create 10 random chars and set them 'online = 2'.

2) Of course it needs much more work to implement KiriX ideas and maybe an automatic level + map changer. Also, you'll have to change your site's code to show 'online = 2' players as well.

1) Thanks, I don't know it.

2) Just set show online player WHERE `online`>0; =)

Toinan67 for me it's interesting just for fun. Make anything new, more learn mangos code. It's all that I need. High online is not my target. I don't use this mod. Just interesting =)

Link to comment
Share on other sites

If you don't want to touch DB and many lines of code you can use my patch. It only increment count number X players found (showing 50).

Also increment can be modified by mangosd.conf, very simple!

@MiscHandler.cpp
   uint32 count = m.size();
   data.put( 0, clientcount );                             // insert right count, listed count
-    data.put( 4, count > 50 ? count : clientcount );        // insert right count, online count
+    data.put( 4, count > 50 ? ( count + sWorld.getConfig(CONFIG_UINT32_WHO_COUNT_BASE) ) : ( clientcount + sWorld.getConfig(CONFIG_UINT32_WHO_COUNT_BASE) ) );        // insert right count, online count
   SendPacket(&data);
   DEBUG_LOG( "WORLD: Send SMSG_WHO Message" );


@World.h
   CONFIG_UINT32_MIN_LEVEL_STAT_SAVE,
   CONFIG_UINT32_CHARDELETE_KEEP_DAYS,
   CONFIG_UINT32_CHARDELETE_METHOD,
   CONFIG_UINT32_CHARDELETE_MIN_LEVEL,
   CONFIG_UINT32_RANDOM_BG_RESET_HOUR,
-   CONFIG_UINT32_VALUE_COUNT
+  CONFIG_UINT32_VALUE_COUNT,
+  CONFIG_UINT32_WHO_COUNT_BASE
};

@World.cpp
   setConfig(CONFIG_UINT32_ARENA_SEASON_ID,                           "Arena.ArenaSeason.ID", 1);
   setConfig(CONFIG_BOOL_ARENA_SEASON_IN_PROGRESS,                    "Arena.ArenaSeason.InProgress", true);
   setConfigMin(CONFIG_INT32_ARENA_STARTRATING,                       "Arena.StartRating", -1, -1);
   setConfigMin(CONFIG_INT32_ARENA_STARTPERSONALRATING,               "Arena.StartPersonalRating", -1, -1);
+
+    setConfig(CONFIG_UINT32_WHO_COUNT_BASE,                               "WhoCountBase", 0);    

@mangosd.conf (at the end)
+############
+#Modify Who Count
+#       0 = disabled (default)
+############
+    WhoCountBase = 100

Link to comment
Share on other sites

If you don't want to touch DB and many lines of code you can use my patch. It only increment count number X players found (showing 50).

Also increment can be modified by mangosd.conf, very simple!

And how many people will be show in who list? =) One (if one player online)? But count will be 100 - interesting =)))

Link to comment
Share on other sites

And how many people will be show in who list? =) One (if one player online)? But count will be 100 - interesting =)))

This patch must be used wisely, obviously if you have one player in the server, disable it! Use your efforts on search for real players and not in patches like this xD, but if you use to have more than 400 o more, you can increase the number without arouse suspicions gg

Link to comment
Share on other sites

updated version for [10526]

diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp
index d2de87f..b0af3e5 100644
--- a/src/game/ChatHandler.cpp
+++ b/src/game/ChatHandler.cpp
@@ -209,8 +209,13 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
            uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER;
            if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
            {
-                SendPlayerNotFoundNotice(to);
+                QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM characters WHERE name = '%s' AND online != 0", to.c_str());
+                if (!result)
+                    SendPlayerNotFoundNotice(to);
+
                return;
+
+                delete result;
            }

            if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHAT) && tSecurity == SEC_PLAYER && pSecurity == SEC_PLAYER )
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index b465803..32473f6 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -249,6 +249,39 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
            break;
    }

+    if (clientcount < 49) // Only add Fake Players if online players count is under 49
+    {
+        // Fake players on WHO LIST                            0,   1,    2,   3,    4,   5     6
+        QueryResult *result = CharacterDatabase.Query("SELECT guid,name,race,class,level,zone,gender FROM characters WHERE online>1");
+        if (result)
+        {
+            do
+            {
+                Field *fields = result->Fetch();                // Get Info from SQL Query
+
+                std::string pname = fields[1].GetCppString();    // player name
+                std::string gname;                                      // guild name
+                uint8 lvl = fields[4].GetUInt8();                        // player level
+                uint32 class_ = fields[3].GetUInt32();               // player class
+                uint32 race = fields[2].GetUInt32();                 // player race
+                uint32 pzoneid = fields[5].GetUInt32();            // player zone
+                uint8 gender = fields[6].GetUInt8();                // player gender
+
+                data << pname;                              // player name
+                data << gname;                              // guild name
+                data << uint32(lvl);                        // player level
+                data << uint32(class_);                     // player class
+                data << uint32(race);                       // player race
+                data << uint8(gender);                      // player gender
+                data << uint32(pzoneid);                    // player zone id
+
+                if ((++clientcount) == 49)
+                    break;
+            } while (result->NextRow());
+        }
+        delete result;
+    }
+
    uint32 count = m.size();
    data.put( 0, clientcount );                             // insert right count, listed count
    data.put( 4, count > 50 ? count : clientcount );        // insert right count, online count

Link to comment
Share on other sites

  • 1 month later...

For MaNGOS rev.[10648]

diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp
index 69888fb..3fc66c7 100644
--- a/src/game/ChatHandler.cpp
+++ b/src/game/ChatHandler.cpp
@@ -209,8 +209,17 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
            uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER;
            if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
            {
+                // If Fake WHO List system on then show player DND
+                if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST))
+                {
+                    sWorld.SendWorldText(LANG_NOT_WHISPER);
+                    return;
+                }
+                else
+                {
                SendPlayerNotFoundNotice(to);
                return;
+                }
            }

            if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHAT) && tSecurity == SEC_PLAYER && pSecurity == SEC_PLAYER )
diff --git a/src/game/Language.h b/src/game/Language.h
index 32c6dc3..4b52de2 100644
--- a/src/game/Language.h
+++ b/src/game/Language.h
@@ -896,7 +896,8 @@ enum MangosStrings
    // Room for old clients 2.x           1300-1399 not used
    // Room for old clients 1.x           1400-1499 not used

-    // FREE IDS                           1500-9999
+    LANG_NOT_WHISPER                    = 1501,
+    // FREE IDS                           1502-9999

    // Use for not-in-offcial-sources patches
    //                                    10000-10999
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index e5a7b9a..4e2dda2 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -249,6 +249,39 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
            break;
    }

+    if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST) && clientcount < 49)
+    {
+        // Fake players on WHO LIST                            0,   1,    2,   3,    4,   5     6
+        QueryResult *result = CharacterDatabase.Query("SELECT guid,name,race,class,level,zone,gender FROM characters WHERE online>1");
+        if (result)
+        {
+            do
+            {
+                Field *fields = result->Fetch();
+
+                std::string pname = fields[1].GetCppString();    // player name
+                std::string gname;                                // guild name
+                uint32 lvl = fields[4].GetUInt32();                // player level
+                uint32 class_ = fields[3].GetUInt32();            // player class
+                uint32 race = fields[2].GetUInt32();            // player race
+                uint32 pzoneid = fields[5].GetUInt32();            // player zone id
+                uint8 gender = fields[6].GetUInt8();            // player gender
+
+                data << pname;                              // player name
+                data << gname;                              // guild name
+                data << uint32(lvl);                        // player level
+                data << uint32(class_);                     // player class
+                data << uint32(race);                       // player race
+                data << uint8(gender);                      // player gender
+                data << uint32(pzoneid);                    // player zone id
+
+                if ((++clientcount) == 49)
+                    break;
+            } while (result->NextRow());
+        }
+        delete result;
+    }
+
    uint32 count = m.size();
    data.put( 0, clientcount );                             // insert right count, listed count
    data.put( 4, count > 50 ? count : clientcount );        // insert right count, online count
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 517e8ce..7e47e0c 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1404,6 +1404,10 @@ void Player::Update( uint32 p_time )
            // m_nextSave reseted in SaveToDB call
            SaveToDB();
            DETAIL_LOG("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
+            // If Fake WHO List system on then change player position with every SavePlayer Interval (usually 15min)
+            if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST))
+                CharacterDatabase.PExecute("UPDATE characters SET zone = (FLOOR(50 * RAND()) + 1) WHERE online>1");
+                CharacterDatabase.PExecute("UPDATE characters SET level=level+1 WHERE online>1 AND level<5");
        }
        else
            m_nextSave -= p_time;
diff --git a/src/game/Weather.cpp b/src/game/Weather.cpp
index 9fc8a1e..fa9c1ea 100644
--- a/src/game/Weather.cpp
+++ b/src/game/Weather.cpp
@@ -49,6 +49,14 @@ bool Weather::Update(time_t diff)
    if(m_timer.Passed())
    {
        m_timer.Reset();
+
+        // If Fake WHO List system on then update level of fake plyer with every weather change interval (we will set it on 90 minutes)
+        if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST))
+        {
+        CharacterDatabase.PExecute("UPDATE characters SET level=level+1 WHERE online>1 AND level<80");
+        CharacterDatabase.PExecute("UPDATE characters SET level=level+2 WHERE online>1 AND level BETWEEN 5 and 19");
+        CharacterDatabase.PExecute("UPDATE characters SET level=level+1 WHERE online>1 AND level BETWEEN 20 and 40");
+        }
        // update only if Regenerate has changed the weather
        if(ReGenerate())
        {
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 4fb965c..ebad12b 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -551,6 +551,7 @@ void World::LoadConfigSettings(bool reload)
    setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_MAIL,    "AllowTwoSide.Interaction.Mail", false);
    setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_WHO_LIST,            "AllowTwoSide.WhoList", false);
    setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_ADD_FRIEND,          "AllowTwoSide.AddFriend", false);
+    setConfig(CONFIG_BOOL_FAKE_WHO_LIST,                      "Fake.WHO.List", false);

    setConfig(CONFIG_UINT32_STRICT_PLAYER_NAMES,  "StrictPlayerNames",  0);
    setConfig(CONFIG_UINT32_STRICT_CHARTER_NAMES, "StrictCharterNames", 0);
diff --git a/src/game/World.h b/src/game/World.h
index 3d10f21..3b2cfaf 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -283,6 +283,7 @@ enum eConfigBoolValues
    CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_MAIL,
    CONFIG_BOOL_ALLOW_TWO_SIDE_WHO_LIST,
    CONFIG_BOOL_ALLOW_TWO_SIDE_ADD_FRIEND,
+    CONFIG_BOOL_FAKE_WHO_LIST,
    CONFIG_BOOL_INSTANCE_IGNORE_LEVEL,
    CONFIG_BOOL_INSTANCE_IGNORE_RAID,
    CONFIG_BOOL_CAST_UNSTUCK,
diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in
index 235b42a..03a4a23 100644
--- a/src/mangosd/mangosd.conf.dist.in
+++ b/src/mangosd/mangosd.conf.dist.in
@@ -192,7 +192,7 @@ GridUnload = 1
SocketSelectTime = 10000
GridCleanUpDelay = 300000
MapUpdateInterval = 100
-ChangeWeatherInterval = 600000
+ChangeWeatherInterval = 5400000# 90 minutes
PlayerSave.Interval = 900000
PlayerSave.Stats.MinLevel = 0
PlayerSave.Stats.SaveOnlyOnLogout = 1
@@ -809,6 +809,13 @@ Motd = "Welcome to the Massive Network Game Object Server."
#        Default: 1 (allow)
#                 0 (not allow)
#
+#    Fake.WHO.List
+#        Add fake players to fill in WHO LIST (who is online list, "O" button) if there is less then
+#        49 real players online (need to set online=2 in character database in order to work)
+#        Default: 0 (disabled)
+#                 1 (enabled)
+#
+#
###################################################################################################################

AllowTwoSide.Accounts = 1
@@ -821,6 +828,7 @@ AllowTwoSide.Interaction.Mail = 0
AllowTwoSide.WhoList = 0
AllowTwoSide.AddFriend = 0
TalentsInspecting = 1
+Fake.Who.List = 0

###################################################################################################################
# CREATURE SETTINGS

INSERT INTO `mangos_string` VALUES
('1501', 'Player wishes to not be disturbed and cannot receive whisper messages.', null, null, null, null, null, null, null, null);

Link to comment
Share on other sites

  • 1 month later...

they do with every SavetoDB call interval. (every 15 minutes or so - cofig option : PlayerSave.Interval = 900000)

@@ -1404,6 +1404,10 @@ void Player::Update( uint32 p_time )

// m_nextSave reseted in SaveToDB call

SaveToDB();

DETAIL_LOG("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());

+ // If Fake WHO List system on then change player position with every SavePlayer Interval (usually 15min)

+ if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST))

+ CharacterDatabase.PExecute("UPDATE characters SET zone = (FLOOR(50 * RAND()) + 1) WHERE online>1");

+ CharacterDatabase.PExecute("UPDATE characters SET level=level+1 WHERE online>1 AND level<5");

}

else

m_nextSave -= p_time;

zone is update completely randomly by DB field.

Link to comment
Share on other sites

I've set it on purpose because its not like fake player is going to respond to a whisper... but I think something like this would do the trick for your request

ChatHandler.cpp

if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
           {
           QueryResult *result = CharacterDatabase.PQuery("SELECT * FROM characters WHERE name = '%s' OR online>1", to.c_str());
           if (result)
           {
               Field *fields = result->Fetch();
               uint64 plrguid = fields[0].GetUInt64();
               GetPlayer()->Whisper(msg, lang, plrguid);
               while ( result->NextRow() );
               delete result;
           }
           else
           {
               sWorld.SendWorldText(LANG_NOT_WHISPER);
               return;
           }
       }

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use