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

Solved Problems in Frags

cronoxhere

Banned User
Joined
Jun 27, 2009
Messages
291
Reaction score
2
Hi, I need help in mi otserv one player kill. and say
injustified frag etc. and now say
!frags
and no have frags :S
and go website killstadistics and no have frags :/ frags no count
wanna example me how to fix this?
thx Rep+

worldtype "pvp"
etc.. how to fix this :/

player kill and no have frags
:/
he have 1000 kills and no are red
lol
 
Last edited:
Try this:

you see the data / talkactos / scripts - copy and paste one of the files qe is there and give it the name frags.lua


frags.lua open the file and put this:

Lua:
local config = {
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
	advancedFragList = getBooleanFromString(getConfigValue('advancedFragList'))
}

function onSay(cid, words, param, channel)
	if(not config.useFragHandler) then
		return false
	end

	local time = os.time()
	local times = {today = (time - 86400), week = (time - (7 * 86400))}

	local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC")
	if(result:getID() ~= -1) then
		repeat
			local content = {
				name = result:getDataString("name"),
				level = result:getDataInt("level"),
				date = result:getDataInt("date")
			}
			if(content.date > times.today) then
				table.insert(contents.day, content)
			elseif(content.date > times.week) then
				table.insert(contents.week, content)
			else
				table.insert(contents.month, content)
			end
		until not result:next()
		result:free()
	end

	local size = {
		day = table.maxn(contents.day),
		week = table.maxn(contents.week),
		month = table.maxn(contents.month)
	}
	if(config.advancedFragList) then
		local result = "Frags gained today: " .. size.day .. "."
		if(size.day > 0) then
			for _, content in ipairs(contents.day) do
				result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level
			end

			result = result .. "\n"
		end

		result = result .. "\nFrags gained this week: " .. (size.day + size.week) .. "."
		if(size.week > 0) then
			for _, content in ipairs(contents.week) do
				result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level
			end

			result = result .. "\n"
		end

		result = result .. "\nFrags gained this month: " .. (size.day + size.week + size.month) .. "."
		if(size.month > 0) then
			for _, content in ipairs(contents.month) do
				result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level
			end

			result = result .. "\n"
		end

		local skullEnd = getPlayerSkullEnd(cid)
		if(skullEnd > 0) then
			result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)
		end

		doPlayerPopupFYI(cid, result)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.")
		if(size.day > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").")
		end

		local skullEnd = getPlayerSkullEnd(cid)
		if(skullEnd > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd))
		end
	end

	return true
end

Then go to talkactions.xml and put this:
<talkaction words="!frags" event="script" value="frags.lua"/>
 
Last edited:
no work the command say !frags and notihing frags :/ and in website one player kill one and notinhg
u.u
Last Deaths
No one died on Skape Online.
 
Last edited:
pff this command now no work in website nothing :/
Last Deaths
No one died on Skape Online.

one player death and no apared here :S
and say !frags and no have ;/
you kill one people and you have you frag and in command, no have frags and website nothing kill :/

@up
I use dedicated Linux, srry :/
 
10:16 Juan Escutia [206]: 10:16 Warning! The murder of Darkker was not justified.

he dead one people and
Last Deaths
No one died on Skape Online.
nothing
o.o
say frags !frags
and nothing frags lool
 
I know this dgprado
and no works
Lua:
-- Deathlist
        deathListEnabled = true
i Know :/
and no understand for why the error
u.u
 
You mean that in last kills at website, don't work, btw that says Noone died at 'serverexampel'

and if you type !frags In-Game, don't work ?
 
Back
Top