Vip Sistem

glebber
em Lixeira Pública

glebber

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 01/08/08Posts: 1

-- Script SYtem vip 1.0 --

 

function onSay(cid, words, param)

if(words == "!vipdays") then

local timenow = os.time()

local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.")

 

elseif(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 == "/checkvip") then

if getPlayerAccess(cid) == 5 then

if not param then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")

end

 

local player = getPlayerByName(param)

local pid = getPlayerByNameWildcard(param)

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 timenow = os.time()

 

local quantity = math.floor((getPlayerStorageValue(player, 13540) - timenow)/(24 * 60 * 60))

doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.")

return TRUE

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(getPlayerStorageValue(C.uid,13540) < C.time)then

doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.')

else

doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.')

setPlayerStorageValue(C.uid,13540,getPlayerStorageValue(C.uid,13540)-C.time)

end

doSendMagicEffect(C.pos, math.random(28,30))

end

end

 

return TRUE

end

 

 

 

 

 

MEU SISTEMA VIP É ESSE AI QUERO SABER COMO EU COLOCAR QUANDO ADD VIP NO PLAYER FIKA NO NOME DO PLAYER ASSIM [VIP]glebber

adrianjunior

Jukaa
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 23/05/10Posts: 11Char no Tibia: Aria Natha

aii é so voos mudar no SQLight e na frente do nome da pessoa Colocar [VIP] na frente do nome

 

ahil.png

Soou :

 

 

mapper : 99.999999 % KK.

scripter: 15 % KK.

 

 

Ziiiiik !!

comedinhasss

Comedinha
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 08/08/07Posts: 520Gênero: MasculinoChar no Tibia: Sir Morths

 

ASUAhs

Poste o código do que você mudou...

Bruno de Carvalho Câmara
[email protected]<script data-cfhash='f9e31' type="text/javascript"> /* */</script> / (18) 9 9640-4544
 

 

 

 

 

 

 

 

 

 

facebook.png&key=5c75f89868a8711c49cc20315645ab5fd3ef2d384bf666dd888f1c280a6b75ed&resource=1 twitter.png&key=a62b8fde99e302436f4cc04056c02768d777c0d27d77011e8931ced8099246e6&resource=1 googleplus.png&key=f287787442661f4422363039ba86e9c578c4921ad397c8f0d88f31709d26c48a&resource=1 youtube.png&key=08e8d5ba725e0a7bfedfe6c9d413ff55e2febb19493974e3a1fd5160d3cabc9f&resource=1 skype.png&key=0aee9c9483d4f4dee341915e654aa361f40598341a31a62afec9f83a2734e0ad&resource=1 steam-icon.png&key=b869d73d6be3b894b7204e151a9582d3b2a84a5d853d940297fec82e1ae25b55&resource=1

 

 

 

 

 

 

 

 

 

 

btn_donateCC_LG.gif&key=ea1b6265cec82d379c00914ab97fd15478f9983200fa273984872388d20f0b62&resource=1 180x25-doar.gif&key=8671e0307e2a7fd446670d1b16671d35069b1c91bed3d028b8f7db698c59eac5&resource=1

 

"Pesadelos? Sonhos? Calma, é apenas eu pensando em você!"

 

wMwSJFE.png?1&key=101925b29f8396357ec8f63d177a708785a8da5f96f154f44e9a4c6599794673&resource=1