Ir para conteúdo
  • Cadastre-se

Posts Recomendados

AFF , ACHO QUE CRIEI NA AREA ERRADA , TEM COMO MOVER PARA A CERTA ?

queria uma soluçao para o bug de frags do ot "Real Server 1.7"

o problema que esta ocorrendo e que quando um player mata o outro , ele nao pega injust.

ele pode matar o outro player 50 vezes que nao pega redskull.

gostaria de uma soluçao pra esse erro ...

aki esta a parte do config.lua do redskull etc... ( desculpe , mas nao sei usar o "spoiler" )

-- Unjustified kills

useFragHandler = true

redSkullLength = 30 * 24 * 60 * 60

blackSkullLength = 45 * 24 * 60 * 60

dailyFragsToRedSkull = 3

weeklyFragsToRedSkull = 5

monthlyFragsToRedSkull = 10

dailyFragsToBlackSkull = dailyFragsToRedSkull

weeklyFragsToBlackSkull = weeklyFragsToRedSkull

monthlyFragsToBlackSkull = monthlyFragsToRedSkull

dailyFragsToBanishment = dailyFragsToRedSkull

weeklyFragsToBanishment = weeklyFragsToRedSkull

monthlyFragsToBanishment = monthlyFragsToRedSkull

blackSkulledDeathHealth = 40

blackSkulledDeathMana = 0

useBlackSkull = true

useRedskull = true

advancedFragList = true

--- e essa e o que tem dentro da pasta "frags" em talkactions/script. ( desculpe , mas nao sei usar o "spoiler" )

local config = {

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),

advancedFragList = getBooleanFromString(getConfigValue('advancedFragList'))

}

function onSay(cid, words, param, channel)

if(not config.useFragHandler) then

return TRUE

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

rep++ pra quem conseguir

Editado por JaTemEsseLoguin (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Em PastaDoSeuServer/Data/TalkActions/Scripts/Frags coloque isto:

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

E no Config.lua substitua o:

useFragHandler = true

redSkullLength = 30 * 24 * 60 * 60

blackSkullLength = 45 * 24 * 60 * 60

dailyFragsToRedSkull = 3

weeklyFragsToRedSkull = 5

monthlyFragsToRedSkull = 10

dailyFragsToBlackSkull = dailyFragsToRedSkull

weeklyFragsToBlackSkull = weeklyFragsToRedSkull

monthlyFragsToBlackSkull = monthlyFragsToRedSkull

dailyFragsToBanishment = dailyFragsToRedSkull

weeklyFragsToBanishment = weeklyFragsToRedSkull

monthlyFragsToBanishment = monthlyFragsToRedSkull

blackSkulledDeathHealth = 40

blackSkulledDeathMana = 0

useBlackSkull = true

useRedskull = true

advancedFragList = true

por:



redSkullLength = 50 * 62 * 70 * 90

blackSkullLength = 64 * 72 * 80 * 95

dailyFragsToRedSkull = 55

weeklyFragsToRedSkull = 80

monthlyFragsToRedSkull = 90

dailyFragsToBlackSkull = dailyFragsToRedSkull

weeklyFragsToBlackSkull = weeklyFragsToRedSkull

monthlyFragsToBlackSkull = monthlyFragsToRedSkull

dailyFragsToBanishment = dailyFragsToRedSkull

weeklyFragsToBanishment = weeklyFragsToRedSkull

monthlyFragsToBanishment = monthlyFragsToRedSkull

blackSkulledDeathHealth = 40

blackSkulledDeathMana = 0

useBlackSkull = true

useFragHandler = true

advancedFragList = false

Editado por Junior Lopes (veja o histórico de edições)

Trabalhos de scripting:

Exevo Vip Power - Spell Exclusiva

Criando e Adicionando Runas no NPC

sgncrop.jpg

Se um dia te disserem que o seu trabalho não é de profissional, lembre-se:

A Arca de Noé foi construída por amadores, o Titanic por profissionais.

Link para o post
Compartilhar em outros sites

Em PastaDoSeuServer/Data/TalkActions/Scripts/Frags coloque isto:

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

E no Config.lua substitua o:

useFragHandler = true

redSkullLength = 30 * 24 * 60 * 60

blackSkullLength = 45 * 24 * 60 * 60

dailyFragsToRedSkull = 3

weeklyFragsToRedSkull = 5

monthlyFragsToRedSkull = 10

dailyFragsToBlackSkull = dailyFragsToRedSkull

weeklyFragsToBlackSkull = weeklyFragsToRedSkull

monthlyFragsToBlackSkull = monthlyFragsToRedSkull

dailyFragsToBanishment = dailyFragsToRedSkull

weeklyFragsToBanishment = weeklyFragsToRedSkull

monthlyFragsToBanishment = monthlyFragsToRedSkull

blackSkulledDeathHealth = 40

blackSkulledDeathMana = 0

useBlackSkull = true

useRedskull = true

advancedFragList = true

por:




redSkullLength = 50 * 62 * 70 * 90

blackSkullLength = 64 * 72 * 80 * 95

dailyFragsToRedSkull = 55

weeklyFragsToRedSkull = 80

monthlyFragsToRedSkull = 90

dailyFragsToBlackSkull = dailyFragsToRedSkull

weeklyFragsToBlackSkull = weeklyFragsToRedSkull

monthlyFragsToBlackSkull = monthlyFragsToRedSkull

dailyFragsToBanishment = dailyFragsToRedSkull

weeklyFragsToBanishment = weeklyFragsToRedSkull

monthlyFragsToBanishment = monthlyFragsToRedSkull

blackSkulledDeathHealth = 40

blackSkulledDeathMana = 0

useBlackSkull = true

useFragHandler = true

advancedFragList = false

infelizmente nao funcionou , vou por uma SS do que esta acontecendo , -> http://sphotos-e.ak.fbcdn.net/hphotos-ak-ash3/155968_122799891215851_1770324643_n.jpg

Link para o post
Compartilhar em outros sites

Te

AdvancedFragList: false

Se não funcionar , tente deste jeito:

useFragHandler = esta True

Se não funcionar, não sei o que fazer :s

Trabalhos de scripting:

Exevo Vip Power - Spell Exclusiva

Criando e Adicionando Runas no NPC

sgncrop.jpg

Se um dia te disserem que o seu trabalho não é de profissional, lembre-se:

A Arca de Noé foi construída por amadores, o Titanic por profissionais.

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo