function onSay(cid, words, param)
if(words == "/addvip") then
if getPlayerAccess(cid) == 5 then
local t = string.explode(param, ",")
if not t[2] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end
local player = getPlayerByName(t[1])
local days = t[2]
local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end
local daysvalue = days*3600*24
local storageplayer = getPlayerStorageValue(player, 13540)
local timenow = os.time()
local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.")
setPlayerStorageValue(player, 13540, time)
local quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24))
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.")
end
elseif(words == "/delvip") then
if getPlayerAccess(cid) == 5 then
local dec = MESSAGE_INFO_DESCR
if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end
local C,t = {},string.explode(param, ",")
C.pos = getPlayerPosition(cid)
C.uid = getCreatureByName(t[1])
C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia.
C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip.
local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end
if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then
return TRUE
end
end
end
end
5
1.3k
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

19 de agosto de 2012 às 23:12
info
Grupo: Campones
Registrado: 31/07/12
Posts: 59
Reputação: +4
Char no Tibia: TeteuziN

20 de agosto de 2012 às 01:37
Eu Usava esse sistema vip Aqui,Mas ele é por item e eu quero q apenas o God adicione vip para o player e sem o item!
Meu Sistema Vip:
function onSay(cid, words, param, channel)
local name = getCreatureName(cid)
sorcerer = {
pcoin = 19000,
level = 1,
text = "Parabens",
}
druid = {
pcoin = 19000,
level = 1,
text = "Parabens",
}
paladin = {
pcoin = 19000,
level = 1,
text = "Parabens",
}
knight = {
pcion = 19000,
level = 1,
text = "Parabens",
}
if getPlayerVocation(cid) == 1 then
voc = sorcerer
elseif getPlayerVocation(cid) == 2 then
voc = druid
elseif getPlayerVocation(cid) == 3 then
voc = paladin
elseif getPlayerVocation(cid) == 4 then
voc = knight
else
voc = nil
end
if voc ~= nil then
if getPlayerLevel(cid) >= voc.level then
if doPlayerRemoveItem(cid,6527,50) == TRUE then
setPlayerPromotionLevel(cid, 1)
db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";")
doSendMagicEffect(getCreaturePosition(cid),14)
doSendAnimatedText(getCreaturePosition(cid),voc.text,49)
setPlayerStorageValue(cid,1082,1)
else
doPlayerSendTextMessage(cid,18,"Voce precisa de 50 Multi Coins para ser Vip.")
end
else
doPlayerSendTextMessage(cid,18,"You need level "..voc.level.." to promote.")
end
else
doPlayerSendTextMessage(cid,18,"Voce ja e Vip.")
end
return TRUE
end
Editado Agosto 20 por TeteuziiN
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

20 de agosto de 2012 às 11:05
function onSay(cid, words, param, channel)
local name = getCreatureName(cid)
sorcerer = {
pcoin = 19000,
level = 1,
text = "Parabens",
}
druid = {
pcoin = 19000,
level = 1,
text = "Parabens",
}
paladin = {
pcoin = 19000,
level = 1,
text = "Parabens",
}
knight = {
pcion = 19000,
level = 1,
text = "Parabens",
}
if getPlayerVocation(cid) == 1 then
voc = sorcerer
elseif getPlayerVocation(cid) == 2 then
voc = druid
elseif getPlayerVocation(cid) == 3 then
voc = paladin
elseif getPlayerVocation(cid) == 4 then
voc = knight
else
voc = nil
end
if voc ~= nil then
if getPlayerLevel(cid) >= voc.level then
if getPlayerAccess(cid) == 5 then
local t = string.explode(param, ",")
if not t[2] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end
local player = getPlayerByName(t[1])
local days = t[2]
local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end
setPlayerPromotionLevel(cid, 1)
db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";")
doSendMagicEffect(getCreaturePosition(cid),14)
doSendAnimatedText(getCreaturePosition(cid),voc.text,49)
setPlayerStorageValue(cid,1082,1)
else
doPlayerSendTextMessage(cid,18,"Voce precisa de 50 Multi Coins para ser Vip.")
end
else
doPlayerSendTextMessage(cid,18,"You need level "..voc.level.." to promote.")
end
else
doPlayerSendTextMessage(cid,18,"Voce ja e Vip.")
end
return TRUE
end
e no talkactions.xml ponha a tag de somente god usar


info
Grupo: Campones
Registrado: 31/07/12
Posts: 59
Reputação: +4
Char no Tibia: TeteuziN
Bom Pessoal Já Testei Vários Vips Sistem Aqui do Fórum Mas Nenhum Que eu Testei Foi Do Meu Agrado Ou Dava Erros,Então Estou Aqui Para Pedir Para Aguem Criar Ou Modificar Algum Sistema Vip Para Mim De Talkactions,Para o God Adicionar A Vip Pelo Comando /addvip playesname,days para deletar a Mesma Coisa Só Que Com /delvip playesname.
Storage da Vip:4003
OBS: Não Precisa de Tile Vip Pois Já Tennho.
OBS 2:Eu Quero Que Quando Virasse Vip o Player Trocasse A Vocação. Ex:Player Free = Druid Player Vip = Elder Druid e assim Com Todas As Vocações.
Obrigado.
Abraços.