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


+42
leoXP
Traster
Ero-Sennin
bielmegatrinf
Skylarfox
Seya Pegasus
SupremeL
Daniel Carvalho
GallighanMaker
LeonM²
Gomaki
イアゴル
Akio
Jonny
XGreenDayX
Kahlis
Maephel
marcosbboy
FFogomax
Nanzin
Gumg
rvitor
Darkthrone
The Suspect
eduardomk
jonathanjua
emilyoly
Kuraudo
Sweet
Mateus Silva
lovins
heyitily
gustavotx
Lucky
iCoke~
Canjoo
KnowVFX
Mr. D
Samuka_Maker
Maverick ~
BrenoFodon
RD12
46 participantes

    [Att²] Pet Global para Netplay Master v4

    GallighanMaker
    GallighanMaker
    Colaborador
    Colaborador


    Medalhas : [Att²] Pet Global para Netplay Master v4 - Página 9 ZgLkiRU
    Mensagens : 985
    Créditos : 102

    Ficha do personagem
    Nível: 1
    Experiência:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue0/0[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (0/0)
    Vida:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue30/30[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (30/30)

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por GallighanMaker Sex maio 24, 2013 1:24 am

    [quote="Khromesykes"]Estou com o seguinte erro: Linha 177

    [Att²] Pet Global para Netplay Master v4 - Página 9 ObkSlJb

    Link da imagem https://i.imgur.com/obkSlJb.jpg


    Código:

    class Sprite_NetCharacter < RPG::Sprite
     alias rd12_animate_player animate_player
      def dispose
        @_text_display.dispose
        @chat_text_display.dispose
        @pet_spr.dispose
        super
      end

    Segui o tutorial corretamente eu acho.

    Se eu comentar a linha que da o erro ele entra normalmente porém quando retiro o item e coloco novamente o pet nao volta.


    _________________
    [Att²] Pet Global para Netplay Master v4 - Página 9 8dVK0ku
    using C# and import Python developer || Expert in Unity Engine IDE. || [Att²] Pet Global para Netplay Master v4 - Página 9 769_heart 2D pixel games.
    Daniel Carvalho
    Daniel Carvalho
    Ocasional
    Ocasional


    Mensagens : 231
    Créditos : 19

    Ficha do personagem
    Nível: 1
    Experiência:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue0/50[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (0/50)
    Vida:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue30/30[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (30/30)

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por Daniel Carvalho Ter Ago 13, 2013 8:13 pm

    Estou com um erro, quando eu to jogando sozinho (1player)
    funfa de boa e tals, aí convidei meu amigo, e da erro..
    Se eu to online funciona comigo, mas aí se meu amigo vai entrar da erro pra ele (Pet global script - linha 199)

    Linha do erro: cw = @pet_spr.bitmap.width / 4



    OBS: quando eu to no mesmo mapa que ele, eu chego perto dele
    GallighanMaker
    GallighanMaker
    Colaborador
    Colaborador


    Medalhas : [Att²] Pet Global para Netplay Master v4 - Página 9 ZgLkiRU
    Mensagens : 985
    Créditos : 102

    Ficha do personagem
    Nível: 1
    Experiência:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue0/0[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (0/0)
    Vida:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue30/30[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (30/30)

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por GallighanMaker Sex Set 20, 2013 1:40 pm

    Daniel Carvalho

    http://www.aldeiarpgbr.com/t7154-correcao-de-bug-no-pet-global-do-rd12


    _________________
    [Att²] Pet Global para Netplay Master v4 - Página 9 8dVK0ku
    using C# and import Python developer || Expert in Unity Engine IDE. || [Att²] Pet Global para Netplay Master v4 - Página 9 769_heart 2D pixel games.
    SupremeL
    SupremeL
    Iniciante
    Iniciante


    Mensagens : 61
    Créditos : 7

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por SupremeL Dom Mar 30, 2014 10:04 pm

    Ta mas como faço para escolher que pet vai ser quando eu equipar tal item ? se tiver uma demo pode mandar ?
    avatar
    Seya Pegasus
    Novato
    Novato


    Mensagens : 9
    Créditos : 0

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por Seya Pegasus Sex Dez 05, 2014 1:16 pm

    pega no net play master 4.9 ?
    Skylarfox
    Skylarfox
    Novato
    Novato


    Mensagens : 1
    Créditos : 0

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por Skylarfox Seg Dez 22, 2014 1:22 pm

    Sensacional cara, valeu mesmo :)
    avatar
    bielmegatrinf
    Iniciante
    Iniciante


    Mensagens : 75
    Créditos : 3

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por bielmegatrinf Ter Dez 23, 2014 2:09 pm

    maninhos eu testei ele no NP 4.9 e deu ERROR no NETWORK na ultima linha . vcs sabem corrigir?!
    RD12
    RD12
    Lenda
    Lenda


    Medalhas : [Att²] Pet Global para Netplay Master v4 - Página 9 48080450[Att²] Pet Global para Netplay Master v4 - Página 9 Trophy11[Att²] Pet Global para Netplay Master v4 - Página 9 GIueZ[Att²] Pet Global para Netplay Master v4 - Página 9 ZgLkiRU
    Mensagens : 1946
    Créditos : 745

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por RD12 Ter Dez 23, 2014 5:35 pm

    Pessoal, infelizmente o sistema é para o NPM V4. O Valentine modificou vários scripts, diretamente ligados ao que esse de pet usa, na nova versão.
    Como não programo mais, eu permito, quem queira, adaptar meus scripts. Mas isso pode ocasionar bugs, já que é uma adaptação.

    Abraços.
    Ero-Sennin
    Ero-Sennin
    Iniciante
    Iniciante


    Mensagens : 53
    Créditos : 7

    Ficha do personagem
    Nível: 1
    Experiência:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue0/0[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (0/0)
    Vida:
    [Att²] Pet Global para Netplay Master v4 - Página 9 Left_bar_bleue30/30[Att²] Pet Global para Netplay Master v4 - Página 9 Empty_bar_bleue  (30/30)

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por Ero-Sennin Qui Dez 25, 2014 9:11 pm

    =begin
    :=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    |Autor: RD12|          Pet Global
    --------------------------------------------------------------------------------
      Com esse sistema os jogadores poderão ter Pets, globais.
      O pet será o Anel[acessório].
    --------------------------------------------------------------------------------
      Para criar um Pet, insira no Módulo PET o seguinte:
       ID[id] = ["Gráfico", HP, MP, Tempo]
    ---------------------------Explicação-------------------------------------------
        id = ID do Anel, que será o Pet
        HP/MP = HP/MP que o pet recupera com o Tempo
        Tempo = Segundos que o pet recupera o HP/MP
    :=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
                           AldeiaRpgBr.com
                           
    =end

    module PET
      ID = []
     #ID[Luva_ID] = ["Gráfico", HP, MP, Tempo(segundos)]
      ID[25] = ["cachorro", 0, 0, 0]#Botei pra não recuperar HP/MP
      #ID[37] = ["mecha", 10, 10, 5]
      ID[38] = ["Fantasma", 1500, 1500, 10]
      ID[39] = ["Arcanjo", 9999, 9999, 10]
      ID[40] = ["cobra", 150, 150, 10]
      ID[41] = ["morcego", 150, 150, 10]
      ID[42] = ["urso", 100, 100, 10]
      ID[43] = ["Alien", 150, 150, 10]
      ID[44] = ["escorpiao", 125, 125, 10]
      ID[45] = ["abelha", 130, 130, 10]
      
    end

    class Scene_Map
      attr_reader :spriteset
    end

    class Spriteset_Map
      attr_reader :character_sprites, :viewport1
       alias rd12_dispose dispose
      def player_sprite
        @character_sprites.each do |spr_char|
          if spr_char.character == $game_player
            return spr_char
          end
        end
      end
      def dispose
      $Pet = nil
      rd12_dispose
      end  
    end

    class Scene_Map
      attr_reader   :character
      attr_reader   :animation_id
      
        alias alias_update update
       def update
        alias_update
        return if !$scene.is_a?(Scene_Map)
        return if $scene.spriteset.nil?
        @actor = $game_party.actors[0]
        return unless $scene.is_a?(Scene_Map)
        if PET::ID[@actor.armor4_id].nil?  or @actor.armor4_id.nil? 
          return if $Pet.nil?
          $Pet.bitmap = RPG::Cache.character("", 4)
          $Pet = nil
          return
        end
        @direção = $game_player.direction
        #Criar sprite do pet
        
        unless $Pet
          $Pet   = Sprite.new(@spriteset.viewport1)
          $Pet.x = $game_player.screen_x
          $Pet.y = $game_player.screen_y
        end
          $Pet.bitmap = RPG::Cache.character(PET::ID[@actor.armor4_id][0], 4)
        #Pet Recuperar o HP/MP com o tempo
        tempo = PET::ID[@actor.armor4_id][3]
       if tempo > 0
         if Graphics.frame_count % (20 * tempo) == 0 
           $game_party.actors[0].hp += PET::ID[@actor.armor4_id][1]
           $game_party.actors[0].sp += PET::ID[@actor.armor4_id][2]
         end
        end
       
        #Cria o gráfico do Pet, e com animação de andar
        cw = $Pet.bitmap.width / 4
        ch = $Pet.bitmap.height / 4
        aw = $frame*cw
        ah = (@direção - 2) / 2 * ch
        $Pet.src_rect = Rect.new(aw, ah, cw ,ch )
        
        player_spr = $scene.spriteset.player_sprite
         
        #Pet Seguir o Player
        #Direção =:2:=
        if $game_player.direction == 2
          $Pet.z = player_spr.z - 1
         return unless $game_map.passable?($game_player.x, $game_player.y-1, 2)

         if $Pet.x < ($game_player.screen_x - $Pet.bitmap.width/8)
           $Pet.x += 4
         end
         if $Pet.x > ($game_player.screen_x - $Pet.bitmap.width/8)
           $Pet.x -= 4
         end

         if $Pet.y < ($game_player.screen_y-32-$Pet.bitmap.height/4)
           $Pet.y += 4
         end  
         if $Pet.y > ($game_player.screen_y-32-$Pet.bitmap.height/4)
           $Pet.y -= 4
         end  

        #Direção =:4:=
        elsif $game_player.direction == 4
         return unless $game_map.passable?($game_player.x+1, $game_player.y, 4)
          $Pet.z = player_spr.z + 1
         if $Pet.x < ($game_player.screen_x+16)
           $Pet.x += 4
         end
         if $Pet.x > ($game_player.screen_x+16)
           $Pet.x -= 4
         end
         if $Pet.y < ($game_player.screen_y-$Pet.bitmap.height/4)
           $Pet.y += 4
         end  
         if $Pet.y > ($game_player.screen_y-$Pet.bitmap.height/4)
           $Pet.y -= 4
         end  
            
        #Direção =:6:=
        elsif $game_player.direction == 6
         return unless $game_map.passable?($game_player.x-1, $game_player.y, 6)
          $Pet.z = player_spr.z + 1
         if $Pet.x < ($game_player.screen_x-16-$Pet.bitmap.width/4)
           $Pet.x += 4
         end
         if $Pet.x > ($game_player.screen_x-16-$Pet.bitmap.width/4)
           $Pet.x -= 4
         end
         
         if $Pet.y < ($game_player.screen_y-$Pet.bitmap.height/4)
           $Pet.y += 4
         end 
         if $Pet.y > ($game_player.screen_y-$Pet.bitmap.height/4)
           $Pet.y -= 4
         end  
         
      #Direção =Happy:=
       elsif $game_player.direction == 8
         return unless $game_map.passable?($game_player.x, $game_player.y+1, 8)
          $Pet.z = player_spr.z + 1
         if $Pet.x < ($game_player.screen_x - ($Pet.bitmap.width/8))
           $Pet.x += 4
         end
         if $Pet.x > ($game_player.screen_x - ($Pet.bitmap.width/8))
           $Pet.x -= 4
         end
         
         if $Pet.y < ($game_player.screen_y+12-($Pet.bitmap.height/8))
           $Pet.y += 4
         end  
         if $Pet.y > ($game_player.screen_y+12-($Pet.bitmap.height/8))
           $Pet.y -= 4
         end  
       end#if player.direction
        
      end#update
    end#class

    class Sprite_Character < RPG::Sprite
      alias alias_update update
      def update                
        alias_update          
       $frame = @character.pattern
      end
    end

    class Sprite_NetCharacter < RPG::Sprite
      alias rd12_animate_player animate_player
      def dispose
        @_text_display.dispose
        @_text_display.dispose
        @pet_spr.dispose
        super
      end
      
      #--------------------------------------------------------------------------
      # * Atualizar movimento do Jogador e Pet
      #--------------------------------------------------------------------------
      def animate_player

        @_text_display.x = self.x
        @_text_display.y = self.y - self.oy / 2 - 24

        sx = @character.pattern * @cw
        sy = (@character.direction - 2) / 2 * @ch
        self.src_rect.set(sx, sy, @cw, @ch)
        
         cw = @pet_spr.bitmap.width / 4
         ch = @pet_spr.bitmap.height / 4
         aw = @character.pattern*cw
         ah = (@character.direction - 2) / 2 * ch
         @pet_spr.src_rect = Rect.new(aw, ah, cw ,ch )
        
        if @character.direction == 2
          @pet_spr.z = self.z-1
          @pet_spr.x = (self.x - @pet_spr.bitmap.width/8)
          @pet_spr.y = (self.y-32-@pet_spr.bitmap.height/4)

       elsif @character.direction == 4
         @pet_spr.x = (self.x+16)
         @pet_spr.y = (self.y-@pet_spr.bitmap.height/4)
          
       elsif @character.direction == 6
         @pet_spr.x = (self.x-16-@pet_spr.bitmap.width/4)
         @pet_spr.y = (self.y-@pet_spr.bitmap.height/4)
          
       elsif @character.direction == 8
         @pet_spr.z = self.z+1
         @pet_spr.x = (self.x-(@pet_spr.bitmap.width/8))
         @pet_spr.y = (self.y+12-(@pet_spr.bitmap.height/8))      
        end
      rd12_animate_player
      end
    end

    eu arrumei o script agora ta pegando na v 4.9 cole esse script acima do main e pronto os outros scripts ficam normal so muda aquele script que tem que colar acima do main substitui por esse


    _________________
    [Att²] Pet Global para Netplay Master v4 - Página 9 2m4c3go
    Traster
    Traster
    Iniciante
    Iniciante


    Mensagens : 34
    Créditos : 2

    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por Traster Sex Dez 26, 2014 8:57 am

    @hyugo


    aperece o erro stack level too deep

    Conteúdo patrocinado


    [Att²] Pet Global para Netplay Master v4 - Página 9 Empty Re: [Att²] Pet Global para Netplay Master v4

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Qui Mar 28, 2024 9:58 am