Ir para conteúdo
  • Cadastre-se

Posts Recomendados

ola, eu queria mt mt mt ajuda de vocês queria que vocês postasem um script aki de vip ou seja,

/addvip TEST, 10

dai quando o player passa na area vip mostrar a mensagem para ele ( Você tem 10 dias de vip restante )

me ajuda ai pessoal ou então pode c um script que clica no item é ganha tantos dias de vip vlw

Link para o post
Compartilhar em outros sites

Vamos nois:

Acesse a pasta data/lib copie la um arquivo.lua e renomeio para 049-vipsys.lua, após isso apague tudo dentro desse arquivo e adicione este coder:

vip = {

   name = "Vip system";

   author = "Mock";

   version = "1.0.0.0";

   query="ALTER TABLE `accounts` ADD `vip_time` INTEGER";

   query2="ALTER TABLE `accounts` ADD `vip_time` INT(15) NOT NULL"

}


function vip.setTable()

   dofile('config.lua')

   if sqlType == "sqlite" then

   	db.executeQuery(vip.query)

   else

		db.executeQuery(vip.query2)

   end

end


function vip.getVip(cid)

		 assert(tonumber(cid),'Parameter must be a number')

		 if isPlayer(cid) == FALSE then error('Player don\'t find') end;

		 ae =  db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..getPlayerAccount(cid).."';")

		 if ae:getID() == -1 then

			return 0

		 end


local retee = ae:getDataInt("vip_time") or 0

ae:free()

		 return retee

end


function vip.getVipByAcc(acc)

		 assert(acc,'Account is nil')

		 local a = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';")

		 if a:getID() ~= -1 then

			 return a:getDataInt("vip_time") or 0, a:free()

		 else

			 error('Account don\'t find.')

		 end

end


function vip.setVip(cid,time)

		 dofile("config.lua")

		 assert(tonumber(cid),'Parameter must be a number')

		 assert(tonumber(time),'Parameter must be a number')

		 if isPlayer(cid) == FALSE then error('Player don\'t find') end;

		 db.executeQuery("UPDATE `"..sqlDatabase.."`.`accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='".. getPlayerAccount(cid).."';")

end


function vip.getVipByAccount(acc)

		 assert(acc,'Account is nil')

		 return db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';"):getDataInt("vip_time") or 0

end									  


function vip.hasVip(cid)

		 assert(tonumber(cid),'Parameter must be a number')

		 if isPlayer(cid) == FALSE then return end;

		 local t = vip.getVip(cid) or 0

		 if os.time(day) < t then

			return TRUE

		 else

			return FALSE

		 end

end


function vip.hasVips(cid)

		 assert(tonumber(cid),'Parameter must be a number')

		 if isPlayer(cid) == FALSE then return end;

		 local t = vip.getVip(cid)

		 if os.time(day) < t then

			return TRUE

		 else

			return FALSE

		 end

end


function vip.accountHasVip(acc)

		 assert(acc,'Account is nil')

		 if os.time() < vip.getVipByAccount(acc) then

			return TRUE

		 else

			return FALSE

		 end

end

function vip.getDays(days)

   return (3600 * 24 * days)

end


function vip.addVipByAccount(acc,time)

   assert(acc,'Account is nil')

   assert(tonumber(time),'Parameter must be a number')

   local a = vip.getVipByAcc(acc)

   a = os.difftime(a,os.time())

   if a < 0 then a = 0 end;

   a = a+time

   return vip.setVipByAccount(acc,a)

end


function vip.setVipByAccount(acc,time)

		 dofile("config.lua")

		 assert(acc,'Account is nil')

		 assert(tonumber(time),'Parameter must be a number')

		 db.executeQuery("UPDATE `accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='"..acc.."';")

		 return TRUE

end


function vip.returnVipString(cid)

   assert(tonumber(cid),'Parameter must be a number')

   if isPlayer(cid) == TRUE then

	  return os.date("%d %B %Y %X ", vip.getVip(cid))

   end

end
Abra a pasta data/creaturescrpits/scripts copie la um arquivo.lua e renomeio para vip.lua, dentro dele adicione: By Lukeskywalker
function onLogin(cid)

	local temple = { x =32369, y = 32246, z = 6}

	if vip.hasVip(cid) == true then

		if getPlayerStorageValue(cid,55555) ~= 1 then

			setPlayerStorageValue(cid,55555,1)

		end

	else

		if getPlayerStorageValue(cid,55555) == 1 then

			doTeleportThing(cid, temple)

			doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")

			db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")

			setPlayerPromotionLevel(cid, 1)

			setPlayerStorageValue(cid, 55555, 0)

		end

	end

	return true

end
Você pode troca as coordenadas do templo: local temple = {x=32369, y=32246, z=6}. Em data/creaturescripts/scripts/login.lua adicione essas tags:
		registerCreatureEvent(cid, "FimVip")

		registerCreatureEvent(cid, "VipReceive")
Em data/creaturescripts/creaturescripts.xml adicione está tag:
	<event type="login" name="FimVip" event="script" value="vip.lua"/>
Em data\movements\scripts copie la um arquivo.lua e renomeio para viptile.lua e adicione este coder dentro do mesmo:
function onStepIn(cid, item, position, fromPosition)


local tileConfig = {

	kickPos = fromPosition, kickEffect = CONST_ME_POFF,

	kickMsg = "You need to be a vip player to access this area.",

	enterMsg = "Welcome to vip area!",

	enterEffect = CONST_ME_MAGIC_RED,

}


if isPlayer(cid) == true then  

if vip.hasVip(cid) == FALSE then

		doTeleportThing(cid, tileConfig.kickPos)

		doSendMagicEffect(tileConfig.kickPos, tileConfig.kickEffect)

		doPlayerSendCancel(cid, tileConfig.kickMsg)

		return

	end

		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, tileConfig.enterMsg)

		doSendMagicEffect(position, tileConfig.enterEffect)

		return true

end

end
Em data\movements\movements.xml adicione a tag:
	<movevent type="StepIn" actionid="13500" event="script" value="viptile.lua"/>
Vejam a numeração 13500 você irá usar no tile que você quer para a passagem de player VIP para configurar adicione a numeração em ActionID do tile. Em data/talkactions/scripts acrecente dentro da pasta scripts uma outra pasta com o nome VIP vamos precisar de 7 arquivos.lua quem teram os nomes e coder a seguir: add.lua
function onSay(cid, words, param, channel)

doPlayerSendCancel(cid, "Added "..param.." Vip Days.")

return doPlayerAddVipDays(cid, param)

end
addvipp.lua
function onSay(cid, words, param)

		 if param == "" then

			return  doPlayerPopupFYI(cid,"Está com problemas?\nAprenda os comandos!\n---------------\nAdicionar vip:\n/vip add days player\n/vip add 30 Real\n---------------\nDeletar vip:\n/vip del player\n/vip del Real\n---------------\nVer a vip:\n/vip see player\n/vip see Real\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,MESSAGE_INFO_DESCR,"Adicionar vip:\n/vip add days player\n/vip add 30 Real\n [Player: "..name.."]")

			end  

			if isPlayer(getPlayerByName(name)) == TRUE then

			vip.addVipByAccount(getPlayerAccount(getPlayerByName(name)) ,vip.getDays(id))


			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Foram adicionados "..tonumber(id).." dias de vip a "..name..".")

			doPlayerSendTextMessage(getPlayerByName(name),MESSAGE_INFO_DESCR,"Você recebeu "..tonumber(id).." dias de vip.")

		 else

		   doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,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,MESSAGE_INFO_DESCR,"Deletar vip:\n/vip del player\n/vip del Real\n")

			end


			vip.setVipByAccount(getPlayerAccount(getPlayerByName(name)),-os.time())

			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"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,MESSAGE_INFO_DESCR,"Ver a vip:\n/vip see player\n/vip see Real\n")

			end

			local ret_ = vip.getVip(getPlayerByName(name))

			if ret_ == 0 then

			  return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,name.." Não tem vip, e nunca teve.")

			else

			  return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "A vip de "..name.." Acaba/terminou em "..os.date("%d %B %Y %X ",ret_))

			end

		 end

		 return TRUE

end
get.lua
function onSay(cid, words, param, channel)

	doPlayerSendCancel(cid, ""..getPlayerVipDays(cid).." days VIP left.")

end
is.lua
function onSay(cid, words, param, channel)

	if isPlayerVip(cid) == TRUE then

		doPlayerSendCancel(cid, "You are a VIP player.")

	else

		doPlayerSendCancel(cid, "You are not a VIP player.")

	end	

end
removevip.lua
function onSay(cid, words, param, channel)

	doPlayerSendCancel(cid, "Vip removed.")

	return doPlayerRemoveVip(cid)

end
set.lua
function onSay(cid, words, param, channel)

	doPlayerSendCancel(cid, "VIP Days: "..param..".")

	return setPlayerVipDays(cid, param)

end
vipdays.lua
function onSay(cid, words, param)

		 if vip.hasVip(cid) == TRUE then

			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your vip end in "..os.date("%d %B %Y %X ",vip.getVip(cid)))

		 else

			 if vip.getVip(cid) ~= 0 then

				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You're not a vip player. Your vip has finished in "..os.date("%d %B %Y %X ", vip.getVip(cid)).." and now is "..os.date("%d %B %Y %X ", os.time()))

			 else

				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You're not a vip player. You naver has a vip.")

			 end

		 end

		 return TRUE

end
Em data/talkactions/talkactions.xml adicione está tag:
	<!-- VIP System -->

	<talkaction log="yes" words="/vip" access="5" event="script" value="VIP/addvipp.lua" />

	<talkaction words="!vipdays" event="script" value="VIP/vipdays.lua" />
Para finalizar execute este comando na sua database:
alter table `accounts` add `vip_time` INT NOT NULL; 

Bom galera fim este sistema vip adiciona os dias corretos e ao termino do VIP o player recebe a menssagem que o VIP acabou é teleportado pro templo porque se no caso ele estiver na área VIP essa é uma saida e zera a coluna vip_time.

-------------

espero ter ajudado

Creditos:

Mock

Lukeskywalker

Natan Beckman

Editado por itroxz (veja o histórico de edições)

Se lhe ajudei Rep+ me

^^

Atenciosamente: Itroxz

gordinho-matador-fail.gif

wX9E4.png

Mapper~~

Link para o post
Compartilhar em outros sites
  • 2 years later...

eu começei faz pouco tempo mexer com script, eu uso sql no meu ot, entao eu coloco " alter table `accounts` add `vip_time` INT NOT  NULL; " no sql ao invez do mysql ?

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por luanluciano93
      Olá pessoal, estou desenvolvendo esse sistema vip para TFS 1.x, se precisarem de alguma função nova é só comentar, criei para usar em um servidor meu e resolvi postar, bom proveito a todos.
       
      É só ir no arquivo data/lib/core/player.lua e adicionar esse código no começo do script:
      -- ALTER TABLE `accounts` ADD `vip_time` BIGINT(20) NOT NULL DEFAULT 0; -- player:getVipTime() function Player.getVipTime(self) local resultId = db.storeQuery("SELECT `vip_time` FROM `accounts` WHERE `id` = '".. self:getAccountId() .."';") local time = resultId ~= false and result.getNumber(resultId, "vip_time") or 0 result.free(resultId) return time end -- player:isVip() function Player.isVip(self) return self:getVipTime() > os.time() and true or false end -- player:addVipDays(days) function Player.addVipDays(self, days) return(self:isVip() and tonumber((days * 86400))) and db.query("UPDATE `accounts` SET `vip_time` = '".. (self:getVipTime() + (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") or db.query("UPDATE `accounts` SET `vip_time` = '".. (os.time() + (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:removeVipDays(days) function Player.removeVipDays(self, days) return(self:isVip() and tonumber((days * 86400))) and db.query("UPDATE `accounts` SET `vip_time` = '".. (self:getVipTime() - (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") or db.query("UPDATE `accounts` SET `vip_time` = '".. (os.time() - (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:setVipDays(days) function Player.setVipDays(self, days) return db.query("UPDATE `accounts` SET `vip_time` = '".. (os.time() - (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:removeVip() function Player.removeVip(self) db.query("UPDATE `accounts` SET `vip_time` = '0' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:sendVipDaysMessage() function Player.sendVipDaysMessage(self) if self:isVip() then local vipTime = self:getVipTime() - os.time() local vipDays = 1 + (math.floor(vipTime / 86400)) return self:getVipTime() ~= false and self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'You have '.. vipDays .. ' vip day(s) in your account.') end end -- player:checkVipLogin() function Player.checkVipLogin(self) if self:getVipTime() > 0 and not self:isVip() then return self:removeVip() and self:teleportTo(self:getTown():getTemplePosition()) end end  
       
      As funções são:
      • player:getVipTime() - Retorna o valor da tabela vip_time (igual esta na database).
      • player:isVip() - Retorna se o player é vip ou não.
      • player:addVipDays(days) - Usa-se em algum script para para adicionar dias de vip ao player (parâmetro de entrada "days").
      • player:removeVipDays(days) - Usa-se em algum script para para remover dias de vip do player (parâmetro de entrada "days").
      • player:setVipDays(days) - Usa-se em algum script para para mudar os dias de vip do player (parâmetro de entrada "days").
      • player:removeVip() - Usa-se em algum script para para remover todo tempo de vip do player.
      • player:sendVipDaysMessage() - Retorna uma mensagem no player mostrando os dias de vip que ainda restam ao player.
      • player:checkVipLogin() - Checa se a vip do player acabou, se sim teleporta ele para o templo.
       

      Qualquer dúvida ou erro/bug poste aqui.
    • Por DeCarvalho
      Bem procurei aqui na comunidade um VIP System mais informativo e nada, além de ter tido problema com os que estão aqui e acabei achando em outro lugar um que funcionou perfeitamente para mim.
       
      Usando tfs disponibilizado neste tópico http://www.tibiaking.com/forum/topic/53099-1078-tfs-12-cast-system-novos-outfits-mounts/
       
      Só estou trazendo o conteúdo e por não conhecer bem não posso dar suporte mas do jeito que está é só 'instalar' e vai funcionar.
       
      Creditos.: Summ
       
      Sistema Vip
       



       
      Talkaction !checkvip para todos os players
       



       
      Talkaction /vip para membros da staff
      - /vip adddays, NomedoPlayer, 5 --> Adiciona 5 dias vip para o Player. - /vip removedays, NomedoPlayer, 5 --> Remove 5 dias vip do Player. - /vip remove, PlayerName --> Remove todos os dias vip do Player. - /vip check, NomedoPlayer --> Checa quantos dias vip o Player tem. - /vip addinfinite, NomedoPlayer --> Adiciona tempo vip infinito para o Player.


       
      Tiles VIP



       
      Portas VIP / Actions



       
      Items que adicionam dias VIP
      ItemId 10135 adiciona 10 dias vip. ItemId 10134 adiciona 30 dias vip. ItemId 10133 adiciona 90 dias vip.


       
      Imagens
       
      Comando !checkvip mas sem ter vip



       
      Comando /vip adddays, dracoknight, 5



       
      Comando !checkvip após adicionar 5 dias



       
      Comando /vip addinfinite, dracoknight



       
      Comando !checkvip após usar infinite 



       
      Comando /vip remove, dracoknight



    • Por EddyHavoc
      Perfect Vip system 2.2
      Versão Testada:TFS 0.3.6 - 8.54 - 8.60
      Creditos pelas modificações: Kydrai,Nicekid e Marcryzius e EddyHavoc
      Creditos pelas publicações: EddyHavoc e Vodkart
      Oque Contém no Sistema vip 2.2?
      Quote
      - Compra Vip pela talkaction ( Comando !buyvip ) -- ou sem o comando.
      - Tile para somente Players Vip passarem ( conta também com funçâo os.time )
      - verifica quantos dias de Vip o character ainda possui.
      - Administradores(GOD) podem adicionar e remover dias de Vip para characters.
      -- Administradores(GOD) podem checkar dias de Vip dos Players.
      -- É adicionado [VIP] ao nome e retirado quando a vip Acabar.
      GOD Adicionando e Removendo dias de Vip
       
      Comprando VIP e Checkando dia da sua VIP
      Quote
      Comando:
       
      comprar vip:
      !buyvip
      checkar dias de vip:
      !vipdays
      God checkar dias de vip do character:
      /checkvip Nick
      exemplo: /checkvip Nicekid
       
       
      God adionar dias ao character:
      /addvip Nick,dias
      exemplo: /addvip Nicekid,5
      aqui adicionei 5 dias de vip.
      God Retirar dias de Vip do character:
      /delvip Nick,dias
      exemplo: /delvip Nicekid,5
      aqui retirei 5 dias de vip.
      Primeiro passo
       
      vá até talkactions/scripts Crie um arquivo.lua e renomeie para systemvip.lua
      dentro coloque:
        -- Script System Vip 2.2 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 5000000 if doPlayerRemoveMoney(cid, price) == TRUE then local days = 30 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13540) local timenow = os.time() if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if string.find(tostring(getCreatureName(cid)),"[[Vip]]") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13540, time) local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13540, time) local name = getCreatureName(cid) db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";") doRemoveCreature(cid) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end elseif(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 == "/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) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.") 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 == "/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 name = getCreatureName(player) 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) if string.find(tostring(getCreatureName(pid)),"[[Vip]]") then 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.") else setPlayerStorageValue(player, 13540, time) db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(player)..";") doRemoveCreature(player) end 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. 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 price = é o quanto a vip vai custar em gps days = quantos dias de vip serão adicionados ao player em talkactions.xml adicione a tag:
        <talkaction words="!vipdays;!buyvip;/checkvip;/addvip;/delvip" script="systemvip.lua"/> Pronto primeiro passo terminado. Sistema vip sem o !buyvip abra a spoiler Spoiler ---------------------------------------------------------------------------------------------------------------------------- Tile VIP Segundo passo. vá até movements/scripts crie um arquivo.lua e renomeie para vipe.lua dentro coloque:
        -- Script Vip Sytem 1.0 -- function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Você não e vip ,fale com Administrador do Server.", msgWelcome = "Seja Bem Vindo a Area vip." } if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end Em movements.xml adicione a tag: <movevent type="StepIn" uniqueid="13700" event="script" value="vipe.lua"/> FIM DA VIP creaturescript/script crie um arquivo.lua e renomeie para endvip.lua e cole isso dentro dele:
        --[[ by EddyHavoc Tibiaking.com ]]-- function onLogin(cid) if getPlayerStorageValue(cid, 13540) - os.time() > 0 then setPlayerStorageValue(cid, 9898, 1) end local pos = {x = 157, y = 50, z = 7} -- posiçao do templo. function EddyHavoc(cid) if isPlayer(cid) then db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid)..";") doRemoveCreature(cid) end end if getPlayerStorageValue(cid, 9898) == 1 and getPlayerStorageValue(cid, 13540) - os.time() < 1 or getPlayerStorageValue(cid, 13540) - os.time() == 0 then doTeleportThing(cid, pos) doPlayerPopupFYI(cid, "Sua vip Account acabou.") setPlayerStorageValue(cid, 9898, -1) if string.find(tostring(getCreatureName(cid)),"[[Vip]]") then addEvent(EddyHavoc, 3*1000, cid) end end return TRUE end em creaturescript.xml adicione a tag:
        <event type="login" name="CheckVip" script="endvip.lua"/>[i] Pronto Seu sistema Vip está terminado.
    • Por tiroleivi
      Bom eu preciso de 1 item que de vip por account, eu uso sistema de vip by Mock e já tenho 1 script que da vip por character, mais queria que desse por account.
       
      SCRIPT :
      function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 15 -- coloque os dias que serão a VIP! local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13500) local timenow = os.time() if getPlayerStorageValue(cid, 13500) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13500, time) local quantity = math.floor((getPlayerStorageValue(cid, 13500) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end Agradeço dês de Já...
    • Por ricardomsn
      Opa, então galera.
      Estou com um pequeno problema no meu mapa global,
      eu uso o sistema de free premium para os players viajarem para onde quiserem mais criei
      um tile vip com action 13500, ele funciona tudo certinho, até ai ok!
      O problema é que quando acaba a vip do player, ele continua na area vip.
      Então oque eu preciso é de um script que faça o player vip, que quando acabe a vip
      desse player, teleporte ele automaticamente para o templo de Thais de preferencia.
      Estou esperando uma resposta v
       
      Valeu galera, vou dar mtoooooooooo
      Rep+ xD
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo