Nossa, pra mim aquilo pareceu tao simples.
Seria soh criar uma storage que conta os twitts ..
twitts = getPlayerStorageValue(cid, 123456) setPlayerStorageValue(cid, 123456, twitts+1)
Um "... nao sei o nome" na Database com:
player_id id date time msg getPlayerGUID(cid) "..twitts.." os.date os.time "param"
Nao ..?
Eu nao mecho muito com database nem nunca usei nada do tipo 'os' ou 'oi' .. =/
Entao se quiser fazer eu agredeço, UHSAHSA.
Faz se quiser s2 Otima ideia btw =) Sou seu fa.
E sobre o mentions, nao seria:
local maxMentions = 10
local mentions = {}
local twitt = tostring(param)
if twitt:find("@", maxMentions) then
for n=1,#twitt:find("@", maxMentions) do -- tenho certeza que isso nao deve funcionar, espero que me ajude ..
if twitt:match("@(.-)") ~= "@Skip_This_Mention" then
mentions[n] = twitt:match("@(.-)")
twitt:gsub(twitt:match("@(.-)"), "@Skip_This_Mention")
end
end
for _,name in ipairs(mentions) do
doSendTextMessage(getPlayerByName(name), 18, getCreatureName(cid).." mentioned you in a twitt:\n"..twitt)
end
end
Ihh, viajei, nao sei fazer isso ._. Se souber .. me ensina? XD
function getPlayerTwitts(cid)
local twitts = {}
local t, msg, date, time
if getPlayerStorageValue(cid, 123456) == -1 then return false end
for x=0,getPlayerStorageValue(cid, 123456) do
t = db.getResult("SELECT `msg`, `date`, `time` FROM `player_twitts` WHERE `player_id` = ".. getPlayerGUID(cid) .. " and `id` = "..x..";")
msg = t:getDataInt("msg")
date = t:getDataInt("date")
time = t:getDataInt("time")
table.insert(twitts, x, {msg = msg, date = date, time = time})
t:free()
end
return twitts
end
Viajei mais ..






info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder
Vc ta superestimando o sistema. Eu fiz para ser algo bem simples mesmo.
Claro que se você quiser, sinta-se a vontade para editar.