Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker

Estamos de volta o/ ... Ou não.Eu amo a -Dark
Doações para o fórum abertas, clique aqui e saiba mais.
Últimos assuntos
» Ainda temos gente aqui?
item - Trocar sprite por item EmptyQui 25 Nov 2021, 14:04 por Halt

» [Dúvida] Como tirar a porcentagem de esquiva
item - Trocar sprite por item EmptySex 19 Nov 2021, 17:14 por Halt

» Pokémon Genesis Online! (PGO)
item - Trocar sprite por item EmptyQua 05 Jul 2017, 18:08 por Lexar

» Tileset Converter to MV
item - Trocar sprite por item EmptySex 12 maio 2017, 14:07 por Douggi

» Pack Resources, Sprites e etc
item - Trocar sprite por item EmptyQua 23 Dez 2015, 12:30 por raydengv

» Download RPG Maker 2003 + RTP em português
item - Trocar sprite por item EmptyTer 22 Dez 2015, 11:14 por ::KimMax::

» Fantasy Art Online
item - Trocar sprite por item EmptyDom 18 Out 2015, 18:42 por daviih123

» Você vai ter medo do Nerve gear?
item - Trocar sprite por item EmptySáb 25 Jul 2015, 17:02 por Kirito-kun

» O Barato é louco
item - Trocar sprite por item EmptySáb 27 Jun 2015, 16:26 por Halt

» Download RPG Maker 2000 + RTP em português
item - Trocar sprite por item EmptyQui 21 maio 2015, 20:28 por Wismael


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

1item - Trocar sprite por item Empty Trocar sprite por item Sex 11 Jan 2013, 17:38

Halt

Halt
Administrador
Administrador
Ricardo escreveu:
Client~Side

Na frmEditor_Item crie uma label e um scrollBox com as seguintes configurações:

Label
Name: lblSprite
Caption: Sprite: Não mudar

ScrollBox
Name: scrlSprite

Dentro do ScrllBox adicione:

Código:
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler
   
    lblSprite.Caption = "Sprite: " & scrlLevelReq
    Item(EditorIndex).Sprite = scrlSprite.Value
   
    ' Error handler
    Exit Sub
errorhandler:
    HandleError "scrlSprite_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub

Na cmbType adicione no final da list:

Trocar Sprite

Procure por:

Código:
Public Const ITEM_TYPE_SPELL As Byte = 13

E abaixo adicione:

Código:
Public Const ITEM_TYPE_SPRITE As Byte = 14

Procure por:

Código:
        frmEditor_Item.scrlRarity.Value = .Rarity

Abaixo adiciione:

Código:
        frmEditor_Item.scrlSprite.Value = .Sprite

No final da Private Type ItemRec, antes do End Type, adicione:

Código:
    Sprite As Long

Serve~side

No final da Private Type ItemRec, antes do End Type, adicione:

Código:
    Sprite As Long

Procure por:

Código:
Public Const ITEM_TYPE_SPELL As Byte = 13

E abaixo adicione:

Código:
Public Const ITEM_TYPE_SPRITE As Byte = 14

Procure por:

Código:
            Case ITEM_TYPE_SPELL
           
                ' stat requirements
                For i = 1 To Stats.Stat_Count - 1
                    If GetPlayerRawStat(index, i) < Item(itemnum).Stat_Req(i) Then
                        PlayerMsg index, "Você não tem os status requeridos para equipar esse equipamento.", BrightRed
                        Exit Sub
                    End If
                Next
               
                ' level requirement
                If GetPlayerLevel(index) < Item(itemnum).LevelReq Then
                    PlayerMsg index, "Você não tem o level requerido para usar esse item.", BrightRed
                    Exit Sub
                End If
               
                ' class requirement
                If Item(itemnum).ClassReq > 0 Then
                    If Not GetPlayerClass(index) = Item(itemnum).ClassReq Then
                        PlayerMsg index, "Você não tem a classe necessaria para usar esse item.", BrightRed
                        Exit Sub
                    End If
                End If
               
                ' access requirement
                If Not GetPlayerAccess(index) >= Item(itemnum).AccessReq Then
                    PlayerMsg index, "Você não tem o acesso requerido para usar esse item.", BrightRed
                    Exit Sub
                End If
               
                ' Get the spell num
                n = Item(itemnum).Data1

                If n > 0 Then

                    ' Make sure they are the right class
                    If Spell(n).ClassReq = GetPlayerClass(index) Or Spell(n).ClassReq = 0 Then
                        ' Make sure they are the right level
                        i = Spell(n).LevelReq

                        If i <= GetPlayerLevel(index) Then
                            i = FindOpenSpellSlot(index)

                            ' Make sure they have an open spell slot
                            If i > 0 Then

                                ' Make sure they dont already have the spell
                                If Not HasSpell(index, n) Then
                                    Call SetPlayerSpell(index, i, n)
                                    Call SendAnimation(GetPlayerMap(index), Item(itemnum).Animation, 0, 0, TARGET_TYPE_PLAYER, index)
                                    Call TakeInvItem(index, itemnum, 0)
                                    Call PlayerMsg(index, "Agora você pode usar a magia " & Trim$(Spell(n).Name) & ".", BrightGreen)
                                Else
                                    Call PlayerMsg(index, "Você ja tem essa magia.", BrightRed)
                                End If

                            Else
                                Call PlayerMsg(index, "Você não pode aprender mais magias.", BrightRed)
                            End If

                        Else
                            Call PlayerMsg(index, "Você precisa estar no nivel " & i & " para aprender essa magia.", BrightRed)
                        End If

                    Else
                        Call PlayerMsg(index, "Essa magia so pode ser aprendida pela classe " & CheckGrammar(GetClassName(Spell(n).ClassReq)) & ".", BrightRed)
                    End If
                End If
               
                ' send the sound
                SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seItem, itemnum

Abaixo adicione:

Código:
            Case ITEM_TYPE_SPRITE
           
                ' stat requirements
                For i = 1 To Stats.Stat_Count - 1
                    If GetPlayerRawStat(index, i) < Item(itemnum).Stat_Req(i) Then
                        PlayerMsg index, "Você não tem os status requeridos para equipar esse equipamento.", BrightRed
                        Exit Sub
                    End If
                Next
               
                ' level requirement
                If GetPlayerLevel(index) < Item(itemnum).LevelReq Then
                    PlayerMsg index, "Você não tem o level requerido para usar esse item.", BrightRed
                    Exit Sub
                End If
               
                ' class requirement
                If Item(itemnum).ClassReq > 0 Then
                    If Not GetPlayerClass(index) = Item(itemnum).ClassReq Then
                        PlayerMsg index, "Você não tem a classe necessaria para usar esse item.", BrightRed
                        Exit Sub
                    End If
                End If
               
                ' access requirement
                If Not GetPlayerAccess(index) >= Item(itemnum).AccessReq Then
                    PlayerMsg index, "Você não tem o acesso requerido para usar esse item.", BrightRed
                    Exit Sub
                End If
               
                ' Trocar sprite
                Call SetPlayerSprite(index, Item(itemnum).Sprite)
               
                ' send the sound
                SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seItem, itemnum

                ' atualizar player
                Call SendPlayerData(index)

Creditos:

Ricardo

https://arenarpgmaker.forumeiros.com

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos