Ir para conteúdo
  • Cadastre-se

(Resolvido)Ajuda em Sistema de Points +REP


Ir para solução Resolvido por tetheuscunha,

Posts Recomendados

Salve salve galera do TK. Venho pedir ajuda para meu ot server... É um sistema de POINTS! aonde o player pode comprar itens vip com esses points. 

 

A versão que utilizo é do 8.60 TFS 0.3.6 

 

Desde já muito obrigado! 

 

DOU +REP pra quem me der essa força ae

Link para o post
Compartilhar em outros sites

Este tópico foi movido para a área correta. Esta é uma mensagem automática!
Pedimos que leia as regras do fórum!

  Mostrar conteúdo oculto

 

Link para o post
Compartilhar em outros sites
  • Solução

 

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

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 luispiai1
      Boa Noite, possuo um sistema de VIP no meu OTServ que funciona perfeito, porem gostaria de adicionar a tag [VIP] antes do nome do player, resumindo:
      Quando o player comprar viper: [VIP] Roberto e quando acabar a VIP: Roberto
       
      Postarei meus scripts do sistema VIP que encontrei da pasta /data que estão ativos em seus arquivos.xml
       
      C:\OT SERVER\data\talkactions\scripts\systemvip.lua
       
      -- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 2000000 if doPlayerRemoveMoney(cid, 2000000) == 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 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, "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) 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 == "/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(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  
      C:\OT SERVER\data\talkactions\talkactions.xml
      <talkaction words="!vipdays;!buyvip;/checkvip;/delvip" script="systemvip.lua"/>  
      C:\OT SERVER\data\talkactions\scripts\addvip2
       
      function onSay(cid, words, param) -- configs access = 1 days = 30 -- end configs player = getPlayerByName(param) daysvalue = days*3600*24 storageplayer = getPlayerStorageValue(player,29000) timenow = os.time() if storageplayer == -1 or storageplayer == 0 then time = timenow+daysvalue else time = storageplayer+daysvalue end if param ~= "" then if getPlayerGroupId(cid) >= access then doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adcionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(player,29000,time) quantity = math.floor((getPlayerStorageValue(player,29000) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente jogadores com acesso maior que "..access.." podem adcionar vips.") end end end  
      C:\OT SERVER\data\talkactions\talkactions.xml
       
      <talkaction words="/addvip" script="addvip2.lua"/>  
      C:\OT SERVER\data\talkactions\scripts\vip\addvip.lua
       
      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)) 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  
      C:\OT SERVER\data\talkactions\talkactions.xml
       
      <talkaction log="yes" words="/vip" access="5" event="script" value="vip/addvipp.lua" />  
      C:\OT SERVER\data\movements\scripts\vipe.lua
       
      -- Script Vip Sytem 1.0 -- function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Você não e vip ,para adqrir sua vip, digite !buyvip custa 2kk, se não tiver dinheiro não posso fazer nada! rss.", 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  
      C:\OT SERVER\data\movements\movements.xml
       
      <movevent type="StepIn" uniqueid="13700" event="script" value="vipe.lua"/>  
       
       
      Tem mais arquivos com nome de vip.lua, systemvip.lua, só que estes não estava adicionados nos arquivos.xml então acabei não colocando, mais se precisar eu coloco.
       
      Obrigado.
       
       
  • Estatísticas dos Fóruns

    96849
    Tópicos
    519613
    Posts
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo