Ir para conteúdo

Featured Replies

Postado

Alguém corrige pra min, era pra pegar red skull na quantia que eu puis, e black na quantia que eu puis, porém mato 3 char e ja fico red, 5 char e ja fico black kkkkkkk

 

E o pedido é um script de "!frags" que mostra a quantidade pra pegar red,black

useFragHandler = true
redSkullLength = 3 * 24 * 60 * 60
blackSkullLength = 5 * 24 * 60 * 60
fragsLimit = 24 * 60 * 60
fragsSecondLimit = 2 * 24 * 60 * 60
fragsThirdLimit = 7 * 24 * 60 * 60
fragsToRedSkull = 20
fragsSecondToRedSkull = 200
fragsThirdToRedSkull = 500
fragsToBlackSkull = 40
fragsSecondToBlackSkull = 300
fragsThirdToBlackSkull = 700
fragsToBanishment = 60
fragsSecondToBanishment = 400 
fragsThirdToBanishment = 800
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
useBlackSkull = true
advancedFragList = false

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

  • Respostas 7
  • Visualizações 250
  • Created
  • Última resposta

Top Posters In This Topic

Postado

creio eu q é só mudar aki pois eu sempre mudo e funciona e.e

redSkullLength = "Dias" * 24 * 60 * 60
blackSkullLength = "Dias" * 24 * 60 * 60

 

va na pasta do ot/talkactions/script copie qualquer arquivo.lua e cole oq esta escrito abaixo.

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

em talkactions.xml coloque

 <talkaction words="!frags" event="script" value="frags.lua"/>

a script eu n sei muinto bem se é a q se quer pois itendi bem oq se quis fala...

 

Projeto/Serviços que desenvolvi durante esse Tempo.

[SERVIDOR] - NTO By Madara Rinnegan - Criado em 2014

Postado
  • Autor

 

creio eu q é só mudar aki pois eu sempre mudo e funciona e.e

redSkullLength = "Dias" * 24 * 60 * 60

blackSkullLength = "Dias" * 24 * 60 * 60

 

va na pasta do ot/talkactions/script copie qualquer arquivo.lua e cole oq esta escrito abaixo.

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

em talkactions.xml coloque

 <talkaction words="!frags" event="script" value="frags.lua"/>

a script eu n sei muinto bem se é a q se quer pois itendi bem oq se quis fala...

 

 

 

@Onepiece, eu quero alterar o limite de frags, por exemplo pegar frags, red no dia com 25 e black no dia com 50, entendeu?

 

 

E o script seu faz examente isso

19:48 You currently have 6 frags today, 6 this week and 6 this month.
19:48 Last frag at 29 December 2014 18:46:58 on level 424 (Tester Jao).
19:48 Your black skull will expire at 03 January 2015 18:46:58

Era pra informar a quantidade de frag, quantos pra ficar red no dia, na semana e no mes. E mesma coisa pra black

E informar o ultimo frag

E informar quando vai sai a skull, caso esteja com a skull red ou black

 

 

EXEMPLO:

Você está atualmente com 6 frags hoje, para ficar red skull precisa obter 25 no dia, 200 na semana e 500 no mes.
Para ficar red skull, precisa passar o limite de 50 no dia, 300 na semana e 500 no mes
19:48 Last frag at 29 December 2014 18:46:58 on level 424 (Tester Jao).
19:48 Your black skull will expire at 03 January 2015 18:46:58

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Postado

E o pedido é um script de "!frags" que mostra a quantidade pra pegar red,black


Tente:
function onSay(cid)
    text = 'Information about frags\n\nFrags to Red Skull:\nDaily - '..getConfigValue('fragsToRedSkull')..' frags\nWeekly - '..getConfigValue('fragsSecondToRedSkull')..' frags\nMonthly - '..getConfigValue('fragsThirdToRedSkull')..' frags\n\nFrags to Black Skull:\nDaily - '..getConfigValue('fragsToBlackSkull')..' frags\nWeekly - '..getConfigValue('fragsSecondToBlackSkull')..' frags\nMonthly - '..getConfigValue('fragsThirdToBlackSkull')..' frags'
    doPlayerPopupFYI(cid, text)
    return true
end

The corrupt fear us.

The honest support us.

The heroic join us.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo