DE
talkaction

[Talkaction] Twitts

Por Demonbholder, 30 de mar. de 2011 em Actions e Talkactions

tibia
script
otserv
20
3.9k
14 de outubro de 2011 às 20:59

Vc ta superestimando o sistema. Eu fiz para ser algo bem simples mesmo.

 

Claro que se você quiser, sinta-se a vontade para editar.

bepokemonB
14 de outubro de 2011 às 21:53

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 ..

Editado Outubro 14 por Byerne

15 de outubro de 2011 às 09:27

Na verdade eu nunca entrei no twitter na minha vida, então não sei muito haha.

 

Mas eu achei interessante esse de checar o twitt pelo dia.

1418311
15 de outubro de 2011 às 12:29

Muito criativo demonbholder .. deixa de pedi e faz voce mesmo byerne !! vai aprende !! :bigsmile:

2 meses depois...
vitorvvmV
10 de dezembro de 2011 às 14:48

ótimo para quem ama o twitter... falta agora só aparecer o tweets em uma aba do lado de "default"... kkk... ficaria muito show...