• 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!

AAC Kill Assistance

adrenyslopez

Member
Joined
Dec 22, 2015
Messages
201
Reaction score
15
Does anyone know where I configure the player's death on the page so that it appears for all the people who killed him, this is how it is on my page

DEADS.png

And this is how I want it to turn out

XD.png

i used gesior acc and otbr tfs 1.3
 
Solution
It was a feature in TFS 0.3 where it saved all killers.

In TFS 1.3 it saves only two, mostdamage player and lasthit player.

So it can't be changed so easily without changing the engine.

Correct me anyone if I'm wrong.
It was a feature in TFS 0.3 where it saved all killers.

In TFS 1.3 it saves only two, mostdamage player and lasthit player.

So it can't be changed so easily without changing the engine.

Correct me anyone if I'm wrong.
 
Solution
It was a feature in TFS 0.3 where it saved all killers.

In TFS 1.3 it saves only two, mostdamage player and lasthit player.

So it can't be changed so easily without changing the engine.

Correct me anyone if I'm wrong.
I already understand thank you very much for helping me
 
Actually, using the function
Lua:
player:getDamageMap()
you can get all the players involved in the fight, with a table with total damage, ticks since last damage and (obviously) the damage dealer.

So with tfs 1.3 it is possible to show all the monsters/players involved.
 
Actually, using the function
Lua:
player:getDamageMap()
you can get all the players involved in the fight, with a table with total damage, ticks since last damage and (obviously) the damage dealer.

So with tfs 1.3 it is possible to show all the monsters/players involved.
How can I add that function?
 
In scripts\creaturescripts\others\player_death.lua
Lua:
db.query('INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (' .. playerGuid .. ', ' .. os.time() .. ', ' .. player:getLevel() .. ', ' .. db.escapeString(killerName) .. ', ' .. byPlayer .. ', ' .. db.escapeString(mostDamageName) .. ', ' .. byPlayerMostDamage .. ', ' .. (unjustified and 1 or 0) .. ', ' .. (mostDamageUnjustified and 1 or 0) .. ')')
This code handles the death string player as you can see (db.escapeString(mostDamageName)), and the player:getDamageMap() is a function integrated already
 
In scripts\creaturescripts\others\player_death.lua
Lua:
db.query('INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (' .. playerGuid .. ', ' .. os.time() .. ', ' .. player:getLevel() .. ', ' .. db.escapeString(killerName) .. ', ' .. byPlayer .. ', ' .. db.escapeString(mostDamageName) .. ', ' .. byPlayerMostDamage .. ', ' .. (unjustified and 1 or 0) .. ', ' .. (mostDamageUnjustified and 1 or 0) .. ')')
This code handles the death string player as you can see (db.escapeString(mostDamageName)), and the player:getDamageMap() is a function integrated already
What do I have to modify in this line so that it appears like this?
 
Lua:
local dmap = player:getDamageMap()
local tArray = {}

for pid, _ in pairs(dmap) do
local aPlayer = Creature(pid)
    if (aPlayer) then
        if aPlayer:isPlayer() then
            table.insert(tArray, {aPlayer:getGuid()})
        end
    end
end
that will turn tArray into a table with all guid's of all the players.
I use json.encode to then encode it into a table that myAAC can then read.
My full codes different to this.
It gets player/creature damage, orders by most damage etc.
But you should get the idea of it from this.
 
damageMap is a very buggy feature if you ask me, sometimes it count players that werent involved, sometimes it doesnt count ”anyone” beside the most dmg.
Its better by configuring a new dmgMap with storages but my guess would be that it might affect the optimization of the server having 300+ online.
 
Back
Top