Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
Hi, by default tfs 1.2 have this function if you stand to next player you can see his dmg in server-log which makes no sense because it should only show yours not someone else who stands next to you and deals so dmg to monster. Im not talking about when he hits you.
Hi, by default tfs 1.2 have this function if you stand to next player you can see his dmg in server-log which makes no sense because it should only show yours not someone else who stands next to you and deals so dmg to monster. Im not talking about when he hits you.
A free and open-source MMORPG server emulator written in C++ - forgottenserver/game.cpp at 1.2 · otland/forgottenserver
github.com
It should work but it's a pretty ugly solution. If you want to get this right you shouldn't even create the spectatorMessage if you aren't going to use it and also move the "sendTextMessage" function inside the if statements that you interested in being displayed in the server log.
A free and open-source MMORPG server emulator written in C++ - forgottenserver/game.cpp at 1.2 · otland/forgottenserver
github.com
It should work but it's a pretty ugly solution. If you want to get this right you shouldn't even create the spectatorMessage if you aren't going to use it and also move the "sendTextMessage" function inside the if statements that you interested in being displayed in the server log.
A free and open-source MMORPG server emulator written in C++ - forgottenserver/game.cpp at 1.2 · otland/forgottenserver
github.com
It should work but it's a pretty ugly solution. If you want to get this right you shouldn't even create the spectatorMessage if you aren't going to use it and also move the "sendTextMessage" function inside the if statements that you interested in being displayed in the server log.
Before sending the message you compare the body of message to spectatorMessage, if it matches you just don't send the the "X loses hitpoints duo to an attack by X." msg to the all so called spectators (third party people in nearby area). Also just checked it on one of my builds and it worked just fine. Didn't you miss anything? You can paste the code after editing.
Before sending the message you compare the body of message to spectatorMessage, if it matches you just don't send the the "X loses hitpoints duo to an attack by X." msg to the all so called spectators (third party people in nearby area). Also just checked it on one of my builds and it worked just fine. Didn't you miss anything? You can paste the code after editing.
Try commenting this one out and see if it stops sending dmg related messages in the server log for everyone if it doesn't then try checking if you launch the right exe file or if you edit the right game.cpp file.
If it for some reason worked then try changing the whole thing to this(even tho the first solution should work just fine):
C++:
for (Creature* spectator : list) {
Player* tmpPlayer = spectator->getPlayer();
if (tmpPlayer->getPosition().z != targetPos.z) {
continue;
}
if (tmpPlayer == attackerPlayer && attackerPlayer != targetPlayer) {
message.type = MESSAGE_STATUS_DEFAULT;
message.text = ucfirst(target->getNameDescription()) + " loses " + damageString + " due to your attack.";
tmpPlayer->sendTextMessage(message);
} else if (tmpPlayer == targetPlayer) {
message.type = MESSAGE_STATUS_DEFAULT;
if (!attacker) {
message.text = "You lose " + damageString + '.';
} else if (targetPlayer == attackerPlayer) {
message.text = "You lose " + damageString + " due to your own attack.";
} else {
message.text = "You lose " + damageString + " due to an attack by " + attacker->getNameDescription() + '.';
}
tmpPlayer->sendTextMessage(message);
} else {
message.type = MESSAGE_STATUS_DEFAULT;
// TODO: Avoid copying spectatorMessage everytime we send to a spectator
message.text = spectatorMessage;
}
}
Try commenting this one out and see if it stops sending dmg related messages in the server log for everyone if it doesn't then try checking if you launch the right exe file or if you edit the right game.cpp file.
If it for some reason worked then try changing the whole thing to this(even tho the first solution should work just fine):
C++:
for (Creature* spectator : list) {
Player* tmpPlayer = spectator->getPlayer();
if (tmpPlayer->getPosition().z != targetPos.z) {
continue;
}
if (tmpPlayer == attackerPlayer && attackerPlayer != targetPlayer) {
message.type = MESSAGE_STATUS_DEFAULT;
message.text = ucfirst(target->getNameDescription()) + " loses " + damageString + " due to your attack.";
tmpPlayer->sendTextMessage(message);
} else if (tmpPlayer == targetPlayer) {
message.type = MESSAGE_STATUS_DEFAULT;
if (!attacker) {
message.text = "You lose " + damageString + '.';
} else if (targetPlayer == attackerPlayer) {
message.text = "You lose " + damageString + " due to your own attack.";
} else {
message.text = "You lose " + damageString + " due to an attack by " + attacker->getNameDescription() + '.';
}
tmpPlayer->sendTextMessage(message);
} else {
message.type = MESSAGE_STATUS_DEFAULT;
// TODO: Avoid copying spectatorMessage everytime we send to a spectator
message.text = spectatorMessage;
}
}
It removed message from server-log completely so its not what i asked because now the person who hits creature cant see his own dmg the whole point was to delete the message when you stand close too him and see his dmg in server-log. Message example is
A Bag loses 8 hitpoints due to an attack by Test.