OTCLIENT Questlog actualizado
Updated quest log, showing quest details:
Npc name
Npc level
Npc outfit
Mission status
Description
Amount of reward experience
Number of reward points
Enemies you must kill
Items to collect
When you click on the follow button, an alternative map opens that shows you the next objective of the mission and at what coordinates:
If you want the system write a comment with your discord
function onSay(cid, words, param, channel)
local maxSpellsToShow = 5000 -- Define o número máximo de feitiços a serem mostrados
local t = {}
-- Loop através dos feitiços do jogador
for i = 0, getPlayerInstantSpellCount(cid) - 1 do
if #t >= maxSpellsToShow then
break -- Sai do loop se o limite máximo de feitiços for atingido
end
local spell = getPlayerInstantSpellInfo(cid, i)
-- Verifica se o feitiço não está no nível mínimo
if(spell.mlevel ~= 1) then
if(spell.manapercent > 0) then
spell.mana = spell.manapercent .. "%"
end
table.insert(t, spell)
end
end
-- Ordena os feitiços pelo nível de magia
table.sort(t, function(a, b) return a.mlevel < b.mlevel end)
-- Constrói a mensagem a ser exibida
local text = ""
local prevLevel = -1
for i, spell in ipairs(t) do
local line = ""
if(prevLevel ~= spell.mlevel) then
if(i ~= 1) then
line = "\n"
end
line = line .. "Spells for Magic Level " .. spell.mlevel .. "\n"
prevLevel = spell.mlevel
end
text = text .. line .. " " .. spell.words .. " : " .. spell.mana .. "\n"
end
-- Verifica o comprimento do texto
if #text > 5000 then
local chunks = {}
local current_chunk = ""
for line in text:gmatch("[^\r\n]+") do
if #current_chunk + #line > 5000 then
table.insert(chunks, current_chunk)
current_chunk = ""
end
current_chunk = current_chunk .. line .. "\n"
end
table.insert(chunks, current_chunk)
for _, chunk in ipairs(chunks) do
doShowTextDialog(cid, 2175, chunk)
end
else
-- Mostra a mensagem ao jogador
doShowTextDialog(cid, 2175, text)
end
return true
end