• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

A challenge for pro scripters

Conficker

New Member
Joined
Apr 1, 2009
Messages
81
Reaction score
0
Like /deathlist NAME, is there some way to see their kills list?
Like on real tibia, when you log in and search your character, it shows a list of people you killed.
I need a script to do that like /deathlist instead its /killslist
 
Yeah I also never saw it here.

But its, simple deathlist.lua edit, I'll post you 1 part, maybe you can finish it? :)

Change:
local deaths = db.getResult("SELECT `time`, `level`, `killed_by`, `altkilled_by` FROM `player_deaths` WHERE `player_id` = " .. targetGUID .. " ORDER BY `time` DESC;")

To:
local deaths = db.getResult("SELECT `player_id`, `time`, `level` FROM `player_deaths` WHERE `killed_by` = " .. targetGUID .. " or `altkilledby` = " .. targetGUID .. " ORDER BY `time` DESC;")
 
Well its pretty straight forward from what slawken is saying. make the new command /killlist or wahtever and make the lua file and copy deathlist from it then take and replace:
This
Code:
local deaths = db.getResult("SELECT `time`, `level`, `killed_by`, `altkilled_by` FROM `player_deaths` WHERE `player_id` = " .. targetGUID .. " ORDER BY `time` DESC;")

With:
Code:
local deaths = db.getResult("SELECT `player_id`, `time`, `level` FROM `player_deaths` WHERE 'killed_by` = " .. targetGUID .. " or `altkilledby` = " .. targetGUID .. " ORDER BY `time` DESC;")

edited
change
Code:
local lastHitKiller = deaths:getDataString("killed_by")
to

Code:
local lastHitKiller = deaths:getDataString("player_id")
remove

Code:
local mostDamageKiller = deaths:getDataString("altkilled_by")
and
Code:
if(mostDamageKiller ~= "") then
	if(tonumber(mostDamageKiller)) then
		killed = killed .. " and by " .. getPlayerNameByGUID(tonumber(mostDamageKiller))
					else
	killed = killed .. " and by " .. getArticle(mostDamageKiller) .. " " .. string.lower(mostDamageKiller)
		end
	end

change:

Code:
				str = str .. breakline .. " " .. time .. "  Died at Level " .. level .. " by " .. killed .. "."
				if not(deaths:next()) then
					break
				end
			end
			deaths:free()
		else
			str = "No deaths recorded."
		end
		doPlayerPopupFYI(cid, "Deathlist for player: " .. targetName .. ".\n\n" .. str)
to
Code:
				str = str .. breakline .. " " .. time .. " Killed " .. killed .." at Level " .. level .. "."
				if not(deaths:next()) then
					break
				end
			end
			deaths:free()
		else
			str = "No kills recorded."
		end
		doPlayerPopupFYI(cid, "Killlist for player: " .. targetName .. ".\n\n" .. str)

That is pretty much step for step hehehe. and all rep would def go to slawkens.
also this should be everything except for editing txt.
 
Last edited:
Well its pretty straight forward from what slawken is saying. make the new command /killlist or wahtever and make the lua file and copy deathlist from it then take and replace:
This
Code:
local deaths = db.getResult("SELECT `time`, `level`, `killed_by`, `altkilled_by` FROM `player_deaths` WHERE `player_id` = " .. targetGUID .. " ORDER BY `time` DESC;")

With:
Code:
local deaths = db.getResult("SELECT `time`, `level`, `killed_by`, `altkilled_by` FROM `player_deaths` WHERE 'killed_by` = " .. targetGUID .. " or `altkilledby` = " .. targetGUID .. " ORDER BY `time` DESC;")

That is pretty much step for step hehehe. and all rep would def go to slawkens.

Uhm, he said there's more than just that to change.
 
Back
Top