Ir para conteúdo
  • Cadastre-se

Juscelino

Membro
  • Total de itens

    31
  • Registro em

  • Última visita

Tudo que Juscelino postou

  1. Olá amigo, poderia alterara esse script de sua autoria para os player poderem comprar através do comando !buyvip pelo custo de 3 gold ingot (9971), exemplo : você comprou 30 dias de vip por 10 gold ingots

    Citar
    
    -- Account VIP System criado por Vitor Bertolucci - Killua
    
    
    function onSay(cid, words, param, channel)
    
    
          if param == "" then
                return doPlayerSendCancel(cid, "Utilize os parametros corretos.")
          end
    
    
          local t = string.explode(param, ',')
    
    
          if t[1] ~= "days" and getPlayerGroupId(cid) < 4 then
                return doPlayerSendCancel(cid, "Comandos disponiveis apenas para gods. Player podem usar /vip days")
          end
    
    
          if t[1] == "days" then
                if isVip(cid) then
                      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem "..getPlayerVipDays(cid).." dias de VIP.")
                else
                      doPlayerSendCancel(cid, "Voce nao tem VIP.")
                end
          elseif t[1] == "add" then
                if getPlayerByName(t[2]) and tonumber(t[3]) and tonumber(t[3]) > 0 then
                      doPlayerSetVipDays(getPlayerByName(t[2]), getPlayerVipDays(getPlayerByName(t[2])) + tonumber(t[3]))
                      doPlayerSendTextMessage(getPlayerByName(t[2]), 25, "Voce recebeu "..t[3].." dias de VIP.")
                      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, t[3].." dias de VIP adicionados para "..t[2])
                else
                      doPlayerSendCancel(cid, "Voce fez algo errado! Utilize /vip add, PLAYERNAME, dias.")
                end
          elseif t[1] == "remove" then
                if getPlayerByName(t[2]) and tonumber(t[3]) and tonumber(t[3]) > 0 then
                      if isVip(getPlayerByName(t[2])) then
                            if getPlayerVipDays(getPlayerByName(t[2])) > tonumber(t[3]) then
                                  doPlayerSetVipDays(getPlayerByName(t[2]), getPlayerVipDays(getPlayerByName(t[2])) - tonumber(t[3]))
                                  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, t[3].." dias de vip removidos de "..t[2])
                                  doPlayerSendTextMessage(getPlayerByName(t[2]), MESSAGE_STATUS_WARNING, "Fora retirados "..t[3].." dias de VIP da sua account.")
                            else
                                  doPlayerSetVipDays(getPlayerByName(t[2]), 0)
                                  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, t[2].." tinha menos que "..t[3].." dias de VIP. A VIP dele foi removida.")
                                  doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Sua VIP acabou.")
                            end
                      else
                            doPlayerSendCancel(cid, t[2].." nao eh VIP.")
                      end
                else
                      doPlayerSendCancel(cid, "Voce fez algo errado! Utilize /vip remove, PLAYERNAME, dias.")
                end
          elseif t[1] == "check" then
                if getPlayerByName(t[2]) then
                      if isVip(getPlayerByName(t[2])) then
                          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, t[2].." tem "..getPlayerVipDays(getPlayerByName(t[2])).." dias de VIP Account.")
                      else
                            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, t[2].." nao eh VIP.")
                      end
               else
                    doPlayerSendCancel(t[2].." Nao esta online ou nao existe!")
               end
          elseif t[1] == "install" then
                if installVipSystem() then
                      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O sistema foi instalado com sucesso.")
                else
                      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O sistema ja esta instalado.")
                end
          end
          return true
    end

    Ficaria muito grato se me ajudasse.

    1. ricardiitoohz

      ricardiitoohz

      vc tem mesma duvida que eu

  2. Olá amigo, copiei o seu sistema de vip por accountvip-system-by-account-10-by-kydrai/, mas ele tá me retornando o seguinte erro.

     

    E quando olho no bando de dados ele coloca a vip do player na tabela com o tempo de 1449665436.

     

    Os comandos funcionam normalmente até falar /buyvip ai atrapalha e para de funcionar o sistema.

     

    Captura de tela 2015-11-09 10.51.17.png

  3. Olá amigo, estou com um problema, achei um script seu sobre o !changesex que utiliza items para funcionar

    Citar

    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="Change gender command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
        <description>
            This mod will add new command for players - !changender.
            Players will be able to change gender, cost can be configured.
        </description>

        <config name="changender_config"><![CDATA[

            config = {
            cost = 40000 --pode ser qualquer moeda, 2148 = 10000 gold,  2152 = 400 platinum e 2160 = 4 crystal--
    }
        ]]></config>

        <talkaction words="!changender" event="buffer"><![CDATA[
            
                     domodlib('changender_config')
            if(getPlayerSex(cid) >= 2) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
                return
            end

            if(not doPlayerRemoveMoney(cid, config.cost)) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not have " .. config.cost .. "gold.")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
                return
            end

            doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost " .. config.cost .. "gold.")
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
        ]]></talkaction>
    </mod>

     

    Estou utilizando da seguinte maneira

    Citar

    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="Change gender command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
        <description>
            This mod will add new command for players - !changender.
            Players will be able to change gender, cost can be configured.
        </description>
        <config name="changender_config"><![CDATA[
            config = {
            cost = 40000,2160
    }
        ]]></config>
        <talkaction words="!changender" event="buffer"><![CDATA[
            
                     domodlib('changender_config')
            if(getPlayerSex(cid) >= 2) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
                return
            end
            if(not doPlayerRemoveMoney(cid, config.cost)) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not have " .. config.cost .. "gold.")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
                return
            end
            doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost " .. config.cost .. "gold.")
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
        ]]></talkaction>
    </mod>

    Gostaria que o seu script utilizasse 40 crystal coins (2160) para utilizar o comando !changesex.
    Se puder me ajudar ficarei grato.
    OBS: O script não retorna nenhum erro, apenas não funciona quando o player fala !changesex nada acontece, apenas sai o comando no default.

    1. L3K0T

      L3K0T

      vou fazer ja te mando!

      tá ai testei e funcionando! 2160 é o ID da moeda o 4 lá em baixo é a quantidade ^^

       

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <mod name="Change gender command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
          <description>
              This mod will add new command for players - !changender.
              Players will be able to change gender, cost can be configured.
          </description>
          <config name="changender_config"><![CDATA[
          ]]></config>
          <talkaction words="!changender" event="buffer"><![CDATA[
              
                       domodlib('changender_config')

          local removeItem = 2160

              if(getPlayerSex(cid) >= 2) then
                  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
                  return
              end

              if(not doPlayerRemoveItem(cid, removeItem, 4))then
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not have 4 Crystal coins.")
                  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
                  return
              end
              doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE)
              doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost 4 Crystal coins.")
              doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
          ]]></talkaction>
      </mod>

    2. Juscelino

      Juscelino

      Obrigado amigo!!!! funcionou perfeitamente.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo