Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


+4
wallace123
BrunoFox
Mario.Hacker
Hatsuki Morturo
8 participantes

    Gold System

    Hatsuki Morturo
    Hatsuki Morturo
    Experiente
    Experiente


    Mensagens : 401
    Créditos : 50

    Gold System Empty Gold System

    Mensagem por Hatsuki Morturo Sáb Set 17, 2011 7:43 pm

    Introdução
    Ae gelrinha do fórum, to voltando aqui, e gostaria de disponibilizar um sistema extremamente simples, que até pode ser útil para iniciantes

    Sobre o sistema
    É um sistema de moeda, feito a partir de 4 variáveis, ele abre uma janela que mostra o "Ouro", "Prata", "Bronze" e "Cash".

    Script
    Código:
    #==============================================================================
    # ** Gold System
    #------------------------------------------------------------------------------
    #  By Hatsuki Morturo
    #------------------------------------------------------------------------------
    # *Chamando Cash
    #    self.contents.draw_text(227, 46, 100, 32, $game_variables[9].to_s,0)
    # *Chamando Ouro
    #    self.contents.draw_text(170, 148, 100, 32, $game_party.item_number(Item_Ouro::Item_Id.to_i).to_s)
    # *Chamando Prata
    #    self.contents.draw_text(227, 46, 100, 32, $game_variables[10].to_s,0)
    # *Chamando Bronze
    #    self.contents.draw_text(227, 46, 100, 32, $game_variables[11].to_s,0)
    #==============================================================================
    class Window_Golds < Window_Base
      def initialize
        super(25,70,140,130)
        self.contents = Bitmap.new(width - 32, height - 32)
        @dragable = true
        @closable = true
        self.z = 999999
        self.windowskin = RPG::Cache.windowskin("WindskinA")
        self.back_opacity = 200
        refresh
      end
     
      def update
        super
        refresh if something_changed?
      end
     
      def on_close
        self.visible = false
        self.active = false
        $fechando_ativar = true
      end

      def refresh
        @actor = $game_party.actors[0]
        @cash = $game_variables[9].to_s
        @prata = $game_variables[10].to_s
        @bronze = $game_variables[11].to_s
        @old_gold = $game_party.item_number(Item_Ouro::Item_Id.to_i)
        self.contents.clear
        # Ouro
        self.contents.draw_text(0, 0, 100, 32, "Cash:")
        self.contents.draw_text(60, 0, 100, 32, $game_variables[9].to_s)
        # Cash
        self.contents.draw_text(0, 0+20, 100, 32, "Ouro:")
        self.contents.draw_text(60, 0+20, 100, 32, $game_party.item_number(Item_Ouro::Item_Id.to_i).to_s,0)
        # Prata
        self.contents.draw_text(0, 0+40, 100, 32, "Prata:")
        self.contents.draw_text(60, 0+40, 100, 32, $game_variables[10].to_s,0)
        # Bronze
        self.contents.draw_text(0, 0+60, 100, 32, "Bronze:")
        self.contents.draw_text(60, 0+60, 100, 32, $game_variables[11].to_s,0)
      end
     
      def something_changed?
        return true if @old_gold != $game_party.item_number(Item_Ouro::Item_Id.to_i)
        return true if @cash != @cash = $game_variables[9].to_s
        return true if @prata = @prata = $game_variables[10].to_s
        return true if @bronze = @bronze = $game_variables[11].to_s
        return false
      end
    end

    Alterações Necessárias
    É preciso acrescentar algumas linhas em scripts já existentes para um correto funcionamento do script.
    1º - Em [SC] Net Rmxp Hud, abaixo deste código:
    Código:
    #Window Eventos
        $event = Window_Web_Eventos.new(150,115,350,350)
        $event.visible = false
        $event.active = false
        $event.dragable = true
        $event.closable = true 
    Cole isto:
    Código:
    #Gold
        if User_Config::PFGS == true
        @golds = Window_Golds.new
        $golds = @golds
        @golds.visible = false
        @golds.active = false
        $golds.dragable = true
        $golds.closable = true

    2º - Abaixo desta linha (no script [SC] Net Rmxp Hud):
    Código:
        @janela_amount_w.update if @janela_amount_w.visible
    Cole isto:
    Código:
        @golds.update if @golds.visible

    3º - Ainda no mesmo script, abaixo deste código:
    Código:
        if $msg.visible
          $msg.visible = false
          $msg.active = false
        end
    Cole isto:
    Código:
    if $golds.visible
          $golds.visible = false
          $golds.active = false
        end

    4º - No script [SC] Scene_Addition, abaixo de:
    Código:
      if Input.trigger?(Input::Letters["C"])# status
      if $painel_adm.active == false
      if @box.active == false
      if $status.active == true;
        $game_system.se_play($data_system.decision_se)
        @status.refresh;@status.visible = false; @status.active = false
      else
      if $status.active == false;
        $game_system.se_play($data_system.decision_se)
        @status.refresh;@status.visible = true; @status.active = true
      end
      end
      end
      end
      end
    Cole isto:
    Código:
      if User_Config::PFGS == true
      if Input.trigger?(Input::Letters["Y"])# Janela de Dinheiro
      if $painel_adm.active == false
      if @box.active == false
      if $golds == true;
        $game_system.se_play($data_system.decision_se)
        @golds.refresh;@golds.visible = true; @golds.active = false
      else
      if $golds.active == false;
        $game_system.se_play($data_system.decision_se)
        @golds.refresh;@golds.visible = true; @golds.active = true
      end
      end
      end
      end
      end
      end

    Screens
    Gold System UKHzk

    Possíveis problemas e Soluções
    Bom, o único bug que encontrei foi na hora de ocultar a janela, coloquei o botão Y para abrir e ocultar, mas quando aperto Y para ocultar a janela, não acontece nada, então eu recomendo que utilize o botão ESC caso encotre o mesmo erro.

    Licença Creative Commons
    HM RGSS de Hatsuki Morturo é licenciado sob uma Licença Creative Commons Atribuição-Uso não-comercial 3.0 Brasil.


    _________________
    Gold System Asd10

    Gold System Fabar10
    Mario.Hacker
    Mario.Hacker
    Aldeia Friend
    Aldeia Friend


    Medalhas : Gold System Trophy11
    Mensagens : 1225
    Créditos : 131

    Gold System Empty Re: Gold System

    Mensagem por Mario.Hacker Sáb Set 17, 2011 7:51 pm

    Muito bom cara...
    Obrigado por compartilhar com nosco!
    até


    _________________
    Gold System 33fao3m

    BrunoFox
    BrunoFox
    Aldeia Friend
    Aldeia Friend


    Mensagens : 1531
    Créditos : 32

    Gold System Empty Re: Gold System

    Mensagem por BrunoFox Sáb Set 17, 2011 7:52 pm

    Ouro e cash devia ser só... bronze,prata,ouro e cash tudo isso deixa confuso o jogo...


    _________________
    Gold System CHlkxwf
    Hatsuki Morturo
    Hatsuki Morturo
    Experiente
    Experiente


    Mensagens : 401
    Créditos : 50

    Gold System Empty Re: Gold System

    Mensagem por Hatsuki Morturo Sáb Set 17, 2011 8:02 pm

    Eu havia feito este sistema pro meu jogo então nele, tinha que conter 3 tipos de moeda sem contar o cash, mas que não quiser usar com todos é só apagar algumas linhas.


    _________________
    Gold System Asd10

    Gold System Fabar10
    wallace123
    wallace123
    Aldeia Friend
    Aldeia Friend


    Medalhas : Gold System 94JxvGold System ICU4UuCrHDm5AGold System Ibnth6gSDk98m7Gold System ZgLkiRU
    Mensagens : 1161
    Créditos : 38

    Gold System Empty Re: Gold System

    Mensagem por wallace123 Ter Set 27, 2011 12:12 pm

    tem como você modificar pra min ? mais só deixar a moeda Cash pois no meu jogo só precisarei de duas moedas, eu não sei mecher em scripts Successful


    _________________
    https://www.facebook.com/wallace.o.b
    Curta, interaja, compartilhe. :)
    TecoKun
    TecoKun
    Membro de Honra
    Membro de Honra


    Mensagens : 1310
    Créditos : 69

    Gold System Empty Re: Gold System

    Mensagem por TecoKun Ter Set 27, 2011 12:15 pm

    Serve pra Master V3?,porq não achei ond tem q fazer as alterações


    _________________
    Gold System 9vqffD0
    Meu fórum de RPG Maker! ainda esta em construção, mas ja tem materias exclusivos! Visite-nos, você vai gostar!
    Status do fórum: PARADO (por enquanto)


    Alguns dos meus textos sobre Rpg, podem te ajudar Wink
    * Contos dos Heróis


    Deem uma olhada Successful 
    Hatsuki Morturo
    Hatsuki Morturo
    Experiente
    Experiente


    Mensagens : 401
    Créditos : 50

    Gold System Empty Re: Gold System

    Mensagem por Hatsuki Morturo Ter Set 27, 2011 12:21 pm

    TecoKun: Foi feito para o UNPM 1.7, mas creio para utilizar no NP Master, basta não fazer o passo 4.
    Wallace123: I
    rei fazer a modificação, em breve postarei aqui.


    _________________
    Gold System Asd10

    Gold System Fabar10
    wallace123
    wallace123
    Aldeia Friend
    Aldeia Friend


    Medalhas : Gold System 94JxvGold System ICU4UuCrHDm5AGold System Ibnth6gSDk98m7Gold System ZgLkiRU
    Mensagens : 1161
    Créditos : 38

    Gold System Empty Re: Gold System

    Mensagem por wallace123 Ter Set 27, 2011 12:44 pm

    Obrigado +10 crédits 1 já foi dado ><


    _________________
    https://www.facebook.com/wallace.o.b
    Curta, interaja, compartilhe. :)
    heyitily
    heyitily
    Experiente
    Experiente


    Mensagens : 421
    Créditos : 12

    Gold System Empty Re: Gold System

    Mensagem por heyitily Ter Jul 03, 2012 9:16 pm

    COMO ADICIONO AS MOEDAS PARA AS PESSOAS?


    _________________
    Gold System SICBb4n
    Paulo Soreto
    Paulo Soreto
    Lenda
    Lenda


    Mensagens : 1980
    Créditos : 367

    Ficha do personagem
    Nível: 1
    Experiência:
    Gold System Left_bar_bleue0/0Gold System Empty_bar_bleue  (0/0)
    Vida:
    Gold System Left_bar_bleue30/30Gold System Empty_bar_bleue  (30/30)

    Gold System Empty Re: Gold System

    Mensagem por Paulo Soreto Qua Jul 04, 2012 1:01 pm

    Para cash: adicione +X a var 9
    Para prata: adicione +X a var 10
    Para bronze: adicione +X a var 11


    _________________
    Gold System FwYnoXI

    Conteúdo patrocinado


    Gold System Empty Re: Gold System

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Sáb Jun 01, 2024 4:33 am