CU
pedido

Sistema de vip do ot, acabou vip acabou promotion..

Por curruwilliam, 06 de abr. de 2013 em Scripts

otserv
tibia
35
4.5k
RoksasR
06 de abril de 2013 às 15:13

Cara, o seu sistema de VIP ele da days de VIP ACCOUNT, pra ACCOUNT inteira!

Só que não aparece no character list, tipo Premium Account (30 days). Que nem no global, etc.

 

Instale esse meu System:

 

http://www.xtibia.com/forum/topic/201802-classic-premium-v2/

curruwilliamC
06 de abril de 2013 às 15:39

Ata verdade, quando adiciono vip para 1 player vai para todos da account dele..

Agora esse sistema de days tem como por:

f_kbfb_fd9_ud37i.jpg

RoksasR
06 de abril de 2013 às 15:56

Claro, use oque estou te dizendo:

 

http://www.xtibia.com/forum/topic/201802-classic-premium-v2/

 

Mais fácil, pois se fosse editar no seu VIP SYSTEM, iria ser mais complicado doque instalar esse /\

curruwilliamC
06 de abril de 2013 às 16:18

Ata, tudo bem

obrigado..

 

Desculpe Double post !

 

Pronto adicionei o seu sistema de Vip !

Teria que alterar algum code que vc me mandou nesse topico ?

RoksasR
06 de abril de 2013 às 16:22

Depende, você quer que dê Promotion e retire?

 

Troque esse e configure:

 

 

local principal = {x = 500, y = 300, z = 7} -- Aqui poe as coordenadas do templo principal[/color]

function onLogin(cid)

if isPremium(cid) == false then

setPlayerPromotionLevel(cid, 1)

doPlayerSendTextMessage(cid,27,"Sua VIP acabou, donate para ter mais acessos!")

doTeleportThing(cid,principal)

else

setPlayerPromotionLevel(cid, 2)

end

return true

end

 

E o System que eu te passei (Classic Premium v2)

O premium scroll, troca por:

 

 

 

function onUse (cid,item,frompos,item2,topos)

if getPlayerPremiumDays (cid) >= 15 then

doPlayerSendTextMessage (cid, MESSAGE_INFO_DESCR, "Você precisa ter 15 ou menos dias restantes de Premium Account, para utilizar esse serviço novamente!")

doSendMagicEffect (getCreaturePosition (cid), 2)

end

if doRemoveItem(item.uid, 1) then

doPlayerAddPremiumDays(cid, 30)

doSendMagicEffect(getCreaturePosition(cid), 14)

setPlayerPromotionLevel(cid,2)

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você acaba de ganhar 30 dias de Premium Account, terá áreas exclusivas e 35% a mais de EXP como benefício!")

end

end

 

 

curruwilliamC
06 de abril de 2013 às 16:47

Beleza, ta tudo certo...

 

Obrigado :D

 

Vix, outro problema...

toda vez que deslogo e logo.. volto pro templo, por causa do script falando que vip acabou

 

Esse code aqui:

 

local principal = {x = 160, y = 51, z = 7} -- Aqui poe as coordenadas do templo principal
function onLogin(cid)
if vip.hasVip(cid) == false and isPlayer(cid) then
setPlayerPromotionLevel(cid, 1)
doPlayerSendTextMessage(cid,27,"Sua VIP acabou.")
doTeleportThing(cid,principal)
elseif vip.hasVip(cid) == true and isPlayer(cid) then
setPlayerPromotionLevel(cid, 2)
end
return true
end

 

Tem como fazer ele executar só 1 vez para cada player..

Pq ele ta executando toda hr, ai nao tem como eu deslogar em uma cidade diferente, e deslogar la.. pq esse code ta levando eu toda hr pra city, para as cordenadas..

RoksasR
06 de abril de 2013 às 16:51

Troca por:

 

 

local principal = {x = 160, y = 51, z = 7} -- Aqui poe as coordenadas do templo principal

function onLogin(cid)

if isPremium(cid) == false and isPlayer(cid) then

if getPlayerStorageValue(cid,16509) == -1 then

setPlayerPromotionLevel(cid, 1)

doPlayerSendTextMessage(cid,27,"Sua VIP acabou.")

doTeleportThing(cid,principal)

setPlayerStorageValue(cid,16509,1)

elseif isPremium(cid) == true and isPlayer(cid) then

setPlayerPromotionLevel(cid, 2)

end

end

return true

end

 

curruwilliamC
06 de abril de 2013 às 17:00

Ahh mals esqueci de avisar, voltei o sistema padrao de vip do OT, retirei o seu script..

RoksasR
06 de abril de 2013 às 17:05

Equal é o padrão?

 

Problema resolvido?

curruwilliamC
06 de abril de 2013 às 17:09

Não tipo,

 

Não funcionou, agora as vocation não muda, entende quando tira e coloca a vip..

RoksasR
06 de abril de 2013 às 17:22

Agora você tem que me passar o script da VIP que veio no OT!

curruwilliamC
06 de abril de 2013 às 17:25

Qual parte?

a de add vip ?

RoksasR
06 de abril de 2013 às 17:33

Exato, e a endvip.lua se existir!

curruwilliamC
06 de abril de 2013 às 17:41

Aqui:

Ja te passei na pagina 1 mais ta aqui:

Achei isso em creaturescript

local pos = {x=160, y=51, z=7}
pos = {x=160, y=51, z=7}
function onLogin(cid)
if vip.hasVip(cid) == true then
 if getPlayerStorageValue(cid,55555) ~= 1 then
  setPlayerStorageValue(cid,55555,1)
 end
   elseif vip.hasVip(cid) ~= true and vip.getVip(cid) ~= 0 then
 if getPlayerStorageValue(cid,55555) == 1 then
  doTeleportThing(cid, pos, true)
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua Vip ACABOU!")
  doPlayerSendTextMessage(cid,22,"Sua Vip ACABOU!")
  setPlayerPromotionLevel(cid, 1)
  setPlayerStorageValue(cid,55555,2)
 elseif getPlayerStorageValue(cid,55555) == -1 then
  setPlayerStorageValue(cid,55555,2)
 end
end
   return true
end

 

e essa é add vip:

talkactions

function onSay(cid, words, param)
if param == "" then
return doPlayerPopupFYI(cid,"Está com problemas?\n Aprenda os comandos!\n---------------\nAdicionar vip:\n/vip add days player\n/vip add 30 Styller\n---------------\nDeletar vip:\n/vip del player\n/vip del Styller\n---------------\nVer a vip:\n/vip see player\n/vip see Styller\n---------------\n")
end
if param:lower():find('add') == 1 and 3 then
local _,_,id,name = param:lower():find('add (%d+) (.+)')
name = name or ""
id = tonumber(id or 1) or 1
if tonumber(id) == nil or getPlayerByName(name) == false then
return doPlayerSendTextMessage(cid,25,"Adicionar vip:\n/vip add days player\n/vip add 30 Styller\n [Player: "..name.."]")
end
if isPlayer(getPlayerByName(name)) == TRUE then
vip.addVipByAccount(getPlayerAccount(getPlayerByName(name)) ,vip.getDays(id))
setPlayerPromotionLevel(name,2)
doPlayerSendTextMessage(cid,25,"Foram adicionados "..tonumber(id).." dias de vip a "..name..".")
doPlayerSendTextMessage(getPlayerByName(name),25,"Você recebeu "..tonumber(id).." dias de vip.")
else
doPlayerSendTextMessage(cid,25,name.." não esta online ou não existe.")
end
elseif param:lower():find('del') == 1 and 3 then
local _,_,name = param:lower():find('del (.+)')
if getPlayerByName(name) == false then
return doPlayerSendTextMessage(cid,25,"Deletar vip:\n/vip del player\n/vip del Styller\n")
end
vip.setVipByAccount(getPlayerAccount(getPlayerByName(name)),-os.time())
doPlayerSendTextMessage(cid,25,"A vip de "..name.." foi apagada.")
elseif param:lower():find('see') == 1 and 3 then
local _,_,name = param:lower():find('see (.+)')
name = name or ""
if getPlayerByName(name) == false then
return doPlayerSendTextMessage(cid,25,"Ver a vip:\n/vip see player\n/vip see Styller\n")
end
local ret_ = vip.getVip(getPlayerByName(name))
if ret_ == 0 then
return doPlayerSendTextMessage(cid, 25,name.." Não tem vip, e nunca teve.")
else
return doPlayerSendTextMessage(cid, 25, "A vip de "..name.." Acaba/terminou em "..os.date("%d %B %Y %X ",ret_))
end
end
return TRUE
end

RoksasR
06 de abril de 2013 às 17:45

Troca o primeiro que passou agora por:

 

 

poss = {x=160, y=51, z=7}

 

function onLogin(cid)

if vip.hasVip(cid) == true then

if getPlayerStorageValue(cid,55555) ~= 1 then

setPlayerStorageValue(cid,55555,1)

setPlayerPromotionLevel(cid,2)

end

elseif vip.hasVip(cid) ~= true and vip.getVip(cid) ~= 0 then

if getPlayerStorageValue(cid,55555) == 1 then

doTeleportThing(cid, poss, true)

doPlayerSendTextMessage(cid, 27, "Sua Vip ACABOU!")

setPlayerPromotionLevel(cid, 1)

setPlayerStorageValue(cid,55555,2)

elseif getPlayerStorageValue(cid,55555) == -1 then

setPlayerStorageValue(cid,55555,2)

end

end

return true

end