useWithCreature in OTS engine and it is executed in Game::playerUseWithCreature in game.cpp.Creature* creature = getCreatureByID(creatureId);
if (!creature) {
return;
}
if (creature->getPlayer()) {
return;
}
Hello, thank you by your help.I want to disabe that from client, im using nekiro 7.72As I remember, shoting 'via battle' is calleduseWithCreaturein OTS engine and it is executed inGame::playerUseWithCreatureingame.cpp.
In that function under:
add:C++:Creature* creature = getCreatureByID(creatureId); if (!creature) { return; }
C++:if (creature->getPlayer()) { return; }
I don't know how to disable it from client side, but its more important to block it on server side. So even players with bot/custom client cant shot via battle.Hello, thank you by your help.I want to disabe that from client, im using nekiro 7.72
want to disable shoot battle player via battle windows
didn't knew about it thanks ! with this im going to still be able to shoot monster via battle atleast? (because if it's for that this is the solution because Shotting runes through battle thanks @Hover Design for the code too! disable monster a player shoot on battleI don't know how to disable it from client side, but its more important to block it on server side. So even players with bot/custom client cant shot via battle.
local creature = clickedWidget:getCreature()
if creature then
if creature:isMonster() then
g_game.useWith(selectedThing, creature, selectedSubtype)
else
modules.game_textmessage.displayFailureMessage(tr("Sorry, you can't shoot players on the battle window."))
end
end
That blocks rune onnhotkey but doe not prevent player player shoot runes to other players via battle window, I need to prevent that, think that is OTC thing related because in tibia it does work good.There is a config.lua setting to handle it server side regarding what @Gesior.pl was talking about.![]()
TFS-1.5-Downgrades/config.lua.dist at 7.72 · nekiro/TFS-1.5-Downgrades
Alternative forgottenserver versions for older protocols support - nekiro/TFS-1.5-Downgradesgithub.com
where does this code go? I am also trying to prevent players from being attacked by battle...didn't knew about it thanks ! with this im going to still be able to shoot monster via battle atleast? (because if it's for that this is the solution because Shotting runes through battle thanks @Hover Design for the code too! disable monster a player shoot on battle
LUA:local creature = clickedWidget:getCreature() if creature then if creature:isMonster() then g_game.useWith(selectedThing, creature, selectedSubtype) else modules.game_textmessage.displayFailureMessage(tr("Sorry, you can't shoot players on the battle window.")) end end