Jump to content
  • 0

Pedido De Script De Frags


Bocoh

Question

nesse modelo

 

 

11:59 You currently have 5 frags today, 5 this week and 5 this month.
11:59 Red Skull: 5/10
11:59 Black Skull: 5/12
11:59 Last frag at 30 July 2012 11:41:32 on level 81 (Tio Naka).

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

ele vai ficar assim:

 

 

14:25 [Red Skull = 10 Frags   Black Skull = 20 Frags]
14:25 Você tem 0 frags hoje, 0 essa semana e 0 esse mês.
seu ultimo frag foi em fulano papapap

 

 

 

 

Haha voce viu isso no meu ot neh ?

Esse vem no tfs :D só editar.

 

Vou compartilhar com voce por um REP. ( sou novo aqui xd )

 

 

local config = {
advancedFragList = getBooleanFromString(getConfigValue("advancedFragList"))
}
function onSay(cid, words, param, channel)
local time = os.time()
local times = {today = (time - 86400), week = (time - (7 * 86400))}
local contents = {day = {}, week = {}, month = {}}
local result = 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_RED, "[Red Skull = 10 Frags   Black Skull = 20 Frags]") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você tem " .. size.day .. " frags hoje, " .. (size.day + size.week) .. " essa semana e " .. (size.day + size.week + size.month) .. " esse mês.")
 if(size.day > 0) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ultimo frag em " .. os.date("%d %B %Y %X", contents.day[1].date) .. " no level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").")
 end
 local skullEnd = getPlayerSkullEnd(cid)
 if(skullEnd > 0) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull vai sair em " .. os.date("%d %B %Y %X", skullEnd))
 end
end
return true
end

 

 

 

Esse comando online é legal tambem, me manda pm que eu te mando ele.

 

Ele fica assim olha :

 

 

14:31 30 player(s) online:

14:31 Iron [150], Omg If [15], Staysz [226], Dara die [147], Eucalipto Rosinha [15], Texas Pvp [188], Miss Tira [200],

14:31 Joker [108], Allanziin Styler [171], Mago Net [200], Chegueipraarrepiar [122], Chapolin [152], Alma Perdida [203], Colirioh Hollister [142],

14:31 Fat Boy [15], Shan Yuan Le [220], Daanzera szz [197], Dhustt [221], Cannabis [198], Authentic Zero [109], Colirioh Uczysz [211],

14:31 GOD Victor [129], Naulpsy [211], Zorro [173], Tatetitotu [204], Jack Tequila [216], Juininho Joga Facil [201], Gordoo [179],

14:31 Maskrowiek [15], Account Manager [1].

Vocações: 7 Sorcerer • 13 Druid • 1 Paladin • 8 Knight.

14:31 1 Staff online: GOD Victor [Admin]

Edited by Victor8
Link to comment
Share on other sites

  • 0

Ta bugado seu script, ele não conta direito minhas config

 

 

 

19:57 [Red Skull = 10 Frags Black Skull = 20 Frags]

19:57 Você tem 0 frags hoje, 0 essa semana e 0 esse mês.

 

 

Sendo que eu coloquei 50 red e 200 black

Ajuda ae

Edited by Bocoh
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...