-
I want to add a channel that can prompt every player who logs in to the game, for example: Xiaoyu logs in to FreeState I should be able to achieve it if I did it, I’m very sorry, beginners really want to know this |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Just to clarify, are you wanting to have a server-wide linkshell that all new players get a pearl to on character creation? If so, it is possible and has been done many times on different servers. It requires a little bit of customization (that you would have to maintain). I haven't personally done it on LSB or a recent Topaz, but I'm sure someone can chime in with an example. In the future, we should have Linkshell Concierges implemented so that players may fetch linkpearls from the NPCs. |
Beta Was this translation helpful? Give feedback.
-
I don’t want the player to get an LS, but when the player logs in, the server will prompt other players to log in to the game. |
Beta Was this translation helpful? Give feedback.
-
If you want to announce to the whole server whenever someone logs in for the first time (excluding regular zoning): Somewhere around here: if (zoning == 2)
{
// Send message to all logged in players
zoneutils::ForEachZone([&](CZone* PZone) {
PZone->ForEachChar([&](CCharEntity* PLoggedInChar) {
PLoggedInChar->pushPacket(new CChatMessagePacket(PLoggedInChar, CHAT_MESSAGE_TYPE::MESSAGE_SYSTEM_1,
fmt::format("{} has logged into the server.", PChar->GetName())));
});
});
} EDIT: Added to the "useful snippets" box: |
Beta Was this translation helpful? Give feedback.
-
hi all. stupid question, maybe. |
Beta Was this translation helpful? Give feedback.
If you want to announce to the whole server whenever someone logs in for the first time (excluding regular zoning):
Somewhere around here:
https://github.com/LandSandBoat/server/blob/base/src/map/utils/charutils.cpp#L826
EDIT:…