Universo Games
Ola , Convidado

Banco 100% Logo1110

Você ainda não e cadastrado então cadastre-se e veja todas as atualizações no Mundo RPG!!!
Universo Games
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Universo Games

Suporte e Desenvolvimento só no Universo Games
 
InícioInício  PortalPortal  EventosEventos  PublicaçõesPublicações  Últimas imagensÚltimas imagens  RegistarRegistar  EntrarEntrar  
Ola Convidado, Seja Bem vindo a equipe lhe deseja boa sorte no seu projeto!

 

 Banco 100%

Ir para baixo 
AutorMensagem
Lucas Roberto
Administrador
Administrador
Lucas Roberto


Mensagens : 711

Banco 100% Empty
MensagemAssunto: Banco 100%   Banco 100% EmptySáb 02 Jul 2011, 20:24

Bom Aqui um Sistema que funçao 100% ja que vi muitos tutorials que nao valem
para nada asim que vou explicar o tutorial de como deixa o sistema de bank.

Baixem a Formula que tem debaixo de toudo que se chama FrmBanco entao coloque na
Source do seu jogo. Claro que ao Formula vai para o Source do Client.

Entao aghora vai FrmMapeditor, e crie debaixo da Arena um botao chamada o captiom "Banco"
e com nome "optBank"
entao

Procure no modtypes:

Código:
Public Const TILE_TYPE_NONE = 20


E debaixo

Código:
Public Const TILE_TYPE_BANK = 21


Aghora procure por:
Código:

Type ChatBubble
    Text As String
    Created As Long
End Type



Abaixo coloque isso:

Código:
Type BankRec
    Num As Integer
    Value As Long
    Dur As Integer
End Type


Procure:

Spell(1 To MAX_PLAYER_SPELLS) As Long



Abaixo coloque:

Código:
Bank(1 To MAX_BANK) As BankRec



Procure:

Código:
    For n = 1 To MAX_INV
        Player(Index).Inv(n).Num = 0
        Player(Index).Inv(n).Value = 0
        Player(Index).Inv(n).Dur = 0
    Next n


e Novamente abaixo coloque isso:

Código:
 For n = 1 To MAX_BANK
        Player(Index).Bank(n).Num = 0
        Player(Index).Bank(n).Value = 0
        Player(Index).Bank(n).Dur = 0
    Next n


Aghora Abaixo de toudo do modTypes coloque toudo isso:

Código:
Function GetPlayerBankItemNum(ByVal Index As Long, ByVal BankSlot As Long) As Long
    If BankSlot > MAX_BANK Then
        Exit Function
    End If
    GetPlayerBankItemNum = Player(Index).Bank(BankSlot).Num
End Function

Sub SetPlayerBankItemNum(ByVal Index As Long, ByVal BankSlot As Long, ByVal ItemNum As Long)
    Player(Index).Bank(BankSlot).Num = ItemNum
End Sub

Function GetPlayerBankItemValue(ByVal Index As Long, ByVal BankSlot As Long) As Long
    GetPlayerBankItemValue = Player(Index).Bank(BankSlot).Value
End Function

Sub SetPlayerBankItemValue(ByVal Index As Long, ByVal BankSlot As Long, ByVal ItemValue As Long)
    Player(Index).Bank(BankSlot).Value = ItemValue
End Sub

Function GetPlayerBankItemDur(ByVal Index As Long, ByVal BankSlot As Long) As Long
    GetPlayerBankItemDur = Player(Index).Bank(BankSlot).Dur
End Function

Sub SetPlayerBankItemDur(ByVal Index As Long, ByVal BankSlot As Long, ByVal ItemDur As Long)
    Player(Index).Bank(BankSlot).Dur = ItemDur
End Sub



No modGameLogic procure:

Código:
' Visual Inventory
        Dim Q As Long
        Dim Qq As Long
        Dim IT As Long
             
        If GetTickCount > IT + 500 And frmMirage.picInv3.Visible = True Then
            For Q = 0 To MAX_INV - 1
                Qq = Player(MyIndex).Inv(Q + 1).Num
             
                If frmMirage.picInv(Q).Picture <> LoadPicture() Then
                    frmMirage.picInv(Q).Picture = LoadPicture()
                Else
                    If Qq = 0 Then
                        frmMirage.picInv(Q).Picture = LoadPicture()
                    Else
                        Call BitBlt(frmMirage.picInv(Q).hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(Qq).Pic - Int(Item(Qq).Pic / 6) * 6) * PIC_X, Int(Item(Qq).Pic / 6) * PIC_Y, SRCCOPY)
                    End If
                End If
            Next Q
        End If


Abaixo Adicione isso:

Código:
'Banco Visual

                If GetTickCount > IT + 500 And frmBanco.Visible = True Then
                    For Q = 0 To MAX_BANK - 1
                        Qq = GetPlayerBankItemNum(MyIndex, Q + 1)

                        If frmBanco.picBank(Q).Picture <> LoadPicture() Then
                            frmBanco.picBank(Q).Picture = LoadPicture()
                        Else
                            If Qq = 0 Then
                                frmBanco.picBank(Q).Picture = LoadPicture()
                            Else
                                Call BitBlt(frmBanco.picBank(Q).hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(Qq).Pic - Int(Item(Qq).Pic / 6) * 6) * PIC_X, Int(Item(Qq).Pic / 6) * PIC_Y, SRCCOPY)
                            End If
                        End If
                    Next Q
                 
                    For Q = 0 To MAX_INV - 1
                        Qq = Player(MyIndex).Inv(Q + 1).Num

                        If frmBanco.picInvB(Q).Picture <> LoadPicture() Then
                            frmBanco.picInvB(Q).Picture = LoadPicture()
                        Else
                            If Qq = 0 Then
                                frmBanco.picInvB(Q).Picture = LoadPicture()
                            Else
                                Call BitBlt(frmBanco.picInvB(Q).hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(Qq).Pic - Int(Item(Qq).Pic / 6) * 6) * PIC_X, Int(Item(Qq).Pic / 6) * PIC_Y, SRCCOPY)
                            End If
                        End If
                    Next Q
                End If


Procure isso:

Código:
If .Light > 0 Then Call DrawText(TexthDC, x * PIC_X + sx + 18 - (NewPlayerX * PIC_X) - NewXOffset, y * PIC_Y + sx + 14 - (NewPlayerY * PIC_Y) - NewYOffset, "L", QBColor(Yellow))


Abaixo Adicione isso
Código:

If .Type = TILE_TYPE_BANK Then Call DrawText(TexthDC, x * PIC_X + sx + 8 - (NewPlayerX * PIC_X) - NewXOffset, y * PIC_Y + sx + 8 - (NewPlayerY * PIC_Y) - NewYOffset, "BANK", QBColor(BrightRed))


Procure aghora isso:

Código:
If .Type = TILE_TYPE_KILL Then frmMapEditor.optKill.Value = True



Abaixo coloque:

Código:
If .Type = TILE_TYPE_BANK Then frmMapEditor.optBank.Value = True



Procure toudo isso:

Código:

 If frmMapEditor.optKill.Value = True Then
                                .Type = TILE_TYPE_KILL
                                .Data1 = 0
                                .Data2 = 0
                                .Data3 = 0
                                .String1 = ""
                                .String2 = ""
                                .String3 = ""
                            End If


Abaixo Adicione:

Código:
If frmMapEditor.optBank.Value = True Then
                                .Type = TILE_TYPE_BANK
                                .Data1 = 0
                                .Data2 = 0
                                .Data3 = 0
                                .String1 = vbNullString
                                .String2 = vbNullString
                                .String3 = vbNullString
                            End If


Procure aghora:

Código:
 ' :::::::::::::::::::::::::::::::::
    ' :: Login was successful packet ::
    ' :::::::::::::::::::::::::::::::::
    If Parse(0) = "loginok" Then
        ' Now we can receive game data
        MyIndex = Val(Parse(1))
       
        frmChars.Hide
        frmSendGetData.Show
       
        Call SetStatus("Recebendo Informações...")
        Exit Sub
    End If



Abaixo adicione:

Código:
' ::::::::::::::::::::::::
    ' :: Player bank packet ::
    ' ::::::::::::::::::::::::
    If Parse(0) = "playerbanco" Then
        n = 1
        For I = 1 To MAX_BANK
            Call SetPlayerBankItemNum(MyIndex, I, Val(Parse(n)))
            Call SetPlayerBankItemValue(MyIndex, I, Val(Parse(n + 1)))
            Call SetPlayerBankItemDur(MyIndex, I, Val(Parse(n + 2)))

            n = n + 3
        Next I
        Exit Sub
        End If

  ' :::::::::::::::::::::::::::::::
    ' :: Player bank update packet ::
    ' :::::::::::::::::::::::::::::::
    If Parse(0) = "atualizarbanco" Then
        n = Val(Parse(1))

        Call SetPlayerBankItemNum(MyIndex, n, Val(Parse(2)))
        Call SetPlayerBankItemValue(MyIndex, n, Val(Parse(3)))
        Call SetPlayerBankItemDur(MyIndex, n, Val(Parse(4)))
        Exit Sub
        End If
   
    ' :::::::::::::::::::::::::::::::
    ' :: Player bank open packet ::
    ' :::::::::::::::::::::::::::::::

    If Parse(0) = "abrirbanco" Then
        frmBanco.Show
        Exit Sub
        End If

    If Parse(0) = "bancomsgg" Then
    Msg = Parse$(1)
        Call MsgBox(Msg, vbOKOnly, GAME_NAME)
        Exit Sub
        End If


Aghora procuramos por ultimo:

Código:
Public Const MAX_FRIENDS = 20



Abaixo Adicione:

Código:
Public Const MAX_BANK = 50


Aghora a parte do Cliente ja Esta Pronta aghora vamos para o pasta do servidor
Aghora crie uma nova pasta (Carpeta) e Mude el nome para "Bancos"
Bom aghora abra a source do Servidor e procure no modDatabase

procure:
Código:

Sub LoadPlayer(ByVal Index As Long, _


Debaixo de:

Código:
FileName = App.Path & "\Contas" & Trim$(Name) & ".ini"


de um Espaço e Coloque:
Código:

FileNameB = App.Path & "\Bancos" & Trim$(Name) & ".ini"



Aghora no:

Código:
Sub LoadPlayer(ByVal Index As Long, _



Abaixo tem umas linheas e procure:
Código:

Dim FileName As String


Abaixo adicione:

Código:
Dim FileNameB As String



no mesmo Sub LoadPlayer:

Abaixo de Password de 2 enter e coloque isso:
Código:

For N = 1 To MAX_BANK
        Player(Index).Bank(N).num = Val(GetVar(FileNameB, "DADOS GERAIS", "BankItemNum" & N))
        Player(Index).Bank(N).Value = Val(GetVar(FileNameB, "DADOS GERAIS", "BankItemVal" & N))
        Player(Index).Bank(N).Dur = Val(GetVar(FileNameB, "DADOS GERAIS", "BankItemDur" & N))
    Next


Faz o mesmo em Sub SavePlayer(ByVal Index As Long):

procure por:

Código:
Sub SavePlayer(ByVal Index As Long)


Abaixo do Dim FileName coloque isso:
Código:

Dim FileNameB As String


Abaixo de Contas adicione abaixo:

Código:
FileNameB = App.Path & "\Bancos" & Trim$(Player(Index).Login) & ".ini"


e Abaixo de Password adicione 2 enter e coloque:
Código:

For N = 1 To MAX_BANK
        Call PutVar(FileNameB, "DADOS GERAIS", "BankItemNum" & N, STR(Player(Index).Bank(N).num))
        Call PutVar(FileNameB, "DADOS GERAIS", "BankItemVal" & N, STR(Player(Index).Bank(N).Value))
        Call PutVar(FileNameB, "DADOS GERAIS", "BankItemDur" & N, STR(Player(Index).Bank(N).Dur))
    Next


Aghora procure:
Código:

' Check for shop
If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_SHOP Then
        If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1 > 0 Then
            Call SendTrade(Index, Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1)
        Else
            Call PlayerMsg(Index, "There is no shop here.", BrightRed)
        End If
    End If


Abaixo Adicione:

Código:
' Checar se pisou em um tile de banco
    If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_BANK Then
        Call SendDataTo(Index, "ABRIRBANCO" & END_CHAR)
    End If


Aghora vamos ao Fim do modGameLogic e colocamos isso:

Código:
Function FindOpenBankSlot(ByVal Index As Long, ByVal ItemNum As Long) As Long
    Dim i As Long

    ' Check for subscript out of range.
    If ItemNum < 1 Or ItemNum > MAX_ITEMS Then
        Exit Function
    End If

    ' Check for subscript out of range.
    If Not IsPlaying(Index) Then
        Exit Function
    End If

    ' Check to see if they already have the item.
    If Item(ItemNum).Type = ITEM_TYPE_CURRENCY Then
        For i = 1 To MAX_BANK
            If GetPlayerBankItemNum(Index, i) = ItemNum Then
                FindOpenBankSlot = i
                Exit Function
            End If
        Next i
    End If

    ' Try to find an open bank slot.
    For i = 1 To MAX_BANK
        If GetPlayerBankItemNum(Index, i) = 0 Then
            FindOpenBankSlot = i
            Exit Function
        End If
    Next i
End Function

Sub TakeBankItem(ByVal Index As Long, ByVal ItemNum As Long, ByVal ItemVal As Long)
    Dim i As Long, N As Long
    Dim TakeBankItem As Boolean

    TakeBankItem = False

    ' Check for subscript out of range
    If IsPlaying(Index) = False Or ItemNum <= 0 Or ItemNum > MAX_ITEMS Then
        Exit Sub
    End If

    For i = 1 To MAX_BANK
        ' Check to see if the player has the item
        If GetPlayerBankItemNum(Index, i) = ItemNum Then
            If Item(ItemNum).Type = ITEM_TYPE_CURRENCY Then
                ' Is what we are trying to take away more then what they have? If so just set it to zero
                If ItemVal >= GetPlayerBankItemValue(Index, i) Then
                    TakeBankItem = True
                Else
                    Call SetPlayerBankItemValue(Index, i, GetPlayerBankItemValue(Index, i) - ItemVal)
                    Call SendBankUpdate(Index, i)
                End If
            Else
                ' Check to see if its any sort of ArmorSlot/WeaponSlot
                Select Case Item(GetPlayerBankItemNum(Index, i)).Type
                    Case ITEM_TYPE_WEAPON
                        If GetPlayerWeaponSlot(Index) > 0 Then
                            If i = GetPlayerWeaponSlot(Index) Then
                                Call SetPlayerWeaponSlot(Index, 0)
                                Call SendWornEquipment(Index)
                                TakeBankItem = True
                            Else
                                ' Check if the item we are taking isn't already equipped
                                If ItemNum <> GetPlayerBankItemNum(Index, GetPlayerWeaponSlot(Index)) Then
                                    TakeBankItem = True
                                End If
                            End If
                        Else
                            TakeBankItem = True
                        End If

                    Case ITEM_TYPE_ARMOR
                        If GetPlayerArmorSlot(Index) > 0 Then
                            If i = GetPlayerArmorSlot(Index) Then
                                Call SetPlayerArmorSlot(Index, 0)
                                Call SendWornEquipment(Index)
                                TakeBankItem = True
                            Else
                                ' Check if the item we are taking isn't already equipped
                                If ItemNum <> GetPlayerBankItemNum(Index, GetPlayerArmorSlot(Index)) Then
                                    TakeBankItem = True
                                End If
                            End If
                        Else
                            TakeBankItem = True
                        End If

                    Case ITEM_TYPE_HELMET
                        If GetPlayerHelmetSlot(Index) > 0 Then
                            If i = GetPlayerHelmetSlot(Index) Then
                                Call SetPlayerHelmetSlot(Index, 0)
                                Call SendWornEquipment(Index)
                                TakeBankItem = True
                            Else
                                ' Check if the item we are taking isn't already equipped
                                If ItemNum <> GetPlayerBankItemNum(Index, GetPlayerHelmetSlot(Index)) Then
                                    TakeBankItem = True
                                End If
                            End If
                        Else
                            TakeBankItem = True
                        End If

                    Case ITEM_TYPE_SHIELD
                        If GetPlayerShieldSlot(Index) > 0 Then
                            If i = GetPlayerShieldSlot(Index) Then
                                Call SetPlayerShieldSlot(Index, 0)
                                Call SendWornEquipment(Index)
                                TakeBankItem = True
                            Else
                                ' Check if the item we are taking isn't already equipped
                                If ItemNum <> GetPlayerBankItemNum(Index, GetPlayerShieldSlot(Index)) Then
                                    TakeBankItem = True
                                End If
                            End If
                        Else
                            TakeBankItem = True
                        End If
                       
                       
                End Select


                N = Item(GetPlayerBankItemNum(Index, i)).Type
                ' Check if its not an equipable weapon, and if it isn't then take it away
                If (N <> ITEM_TYPE_WEAPON) And (N <> ITEM_TYPE_ARMOR) And (N <> ITEM_TYPE_HELMET) And (N <> ITEM_TYPE_SHIELD) Then
                    TakeBankItem = True
                End If
            End If

            If TakeBankItem = True Then
                Call SetPlayerBankItemNum(Index, i, 0)
                Call SetPlayerBankItemValue(Index, i, 0)
                Call SetPlayerBankItemDur(Index, i, 0)

                ' Send the Bank update
                Call SendBankUpdate(Index, i)
                Exit Sub
            End If
        End If
    Next i
End Sub

Sub GiveBankItem(ByVal Index As Long, ByVal ItemNum As Long, ByVal ItemVal As Long, ByVal BankSlot As Long)
    Dim i As Long

    ' Check for subscript out of range.
    If ItemNum < 1 Or ItemNum > MAX_ITEMS Then
        Exit Sub
    End If

    ' Check for subscript out of range.
    If Not IsPlaying(Index) Then
        Exit Sub
    End If

    i = BankSlot

    ' Check to see if Bankentory is full
    If i > 0 Then
        Call SetPlayerBankItemNum(Index, i, ItemNum)
        Call SetPlayerBankItemValue(Index, i, GetPlayerBankItemValue(Index, i) + ItemVal)

        If (Item(ItemNum).Type = ITEM_TYPE_ARMOR) Or (Item(ItemNum).Type = ITEM_TYPE_WEAPON) Or (Item(ItemNum).Type = ITEM_TYPE_HELMET) Or (Item(ItemNum).Type = ITEM_TYPE_SHIELD) Then
            Call SetPlayerBankItemDur(Index, i, Item(ItemNum).Data1)
        End If
    Else
        Call BancoMsg(Index, "Banco Cheio!")
    End If
End Sub


Bom aghora procure isso:

Código:
' Check if they have the item
            If HasItem(Index, Shop(i).TradeItem(N).Value(z).GiveItem) >= Shop(i).TradeItem(N).Value(z).GiveValue Then
                Call TakeItem(Index, Shop(i).TradeItem(N).Value(z).GiveItem, Shop(i).TradeItem(N).Value(z).GiveValue)
                Call GiveItem(Index, Shop(i).TradeItem(N).Value(z).GetItem, Shop(i).TradeItem(N).Value(z).GetValue)
                Call PlayerMsg(Index, "The trade was successful!", Yellow)
            Else
                Call PlayerMsg(Index, "Trade unsuccessful.", BrightRed)
            End If

            Exit Sub

E abaixo coloque:
Código:

Case "depositarbanco"
            Call BankDeposit(Index, Val(Parse(1)), Val(Parse(2)))
            Exit Sub
           
       
        Case "retirarbanco"
            Call bankwithdraw(Index, Val(Parse(1)), Val(Parse(2)))
        Exit Sub

Aghora ao Fim do modServerTCP coloque isso:
Código:

Sub SendBank(ByVal Index As Long)
    Dim Packet As String
    Dim i As Integer

    Packet = "playerbanco" & SEP_CHAR
    For i = 1 To MAX_BANK
        Packet = Packet & (GetPlayerBankItemNum(Index, i) & SEP_CHAR & GetPlayerBankItemValue(Index, i) & SEP_CHAR & GetPlayerBankItemDur(Index, i) & SEP_CHAR)
    Next i
    Packet = Packet & END_CHAR

    Call SendDataTo(Index, Packet)
End Sub

Sub SendBankUpdate(ByVal Index As Long, ByVal BankSlot As Long)
    Call SendDataTo(Index, "atualizarbanco" & SEP_CHAR & BankSlot & SEP_CHAR & GetPlayerBankItemNum(Index, BankSlot) & SEP_CHAR & GetPlayerBankItemValue(Index, BankSlot) & SEP_CHAR & GetPlayerBankItemDur(Index, BankSlot) & END_CHAR)
End Sub

Sub BancoMsg(ByVal Index As Long, ByVal Msg As String)
    Dim Packet As String
    Packet = "bancomsgg" & SEP_CHAR & Msg & END_CHAR
    Call SendDataTo(Index, Packet)
End Sub

Public Sub BankDeposit(ByVal Index As Long, ByVal InvNum As Long, ByVal Amount As Long)
    Dim BankSlot As Long
    Dim ItemNum As Long
            ItemNum = GetPlayerInvItemNum(Index, InvNum)
       
            BankSlot = FindOpenBankSlot(Index, ItemNum)
            If BankSlot = 0 Then
                Call BancoMsg(Index, "Banco Cheio")
                Exit Sub
            End If
       
            If Amount > GetPlayerInvItemValue(Index, InvNum) Then
                Call BancoMsg(Index, "Você não tem esté valor para depositar!")
                Exit Sub
            End If
       
            If GetPlayerWeaponSlot(Index) = ItemNum Or GetPlayerArmorSlot(Index) = ItemNum Or GetPlayerShieldSlot(Index) = ItemNum Or GetPlayerHelmetSlot(Index) = ItemNum Then
                Call BancoMsg(Index, "Você não pode depositar itens equipados!")
                Exit Sub
            End If
       
            If Item(ItemNum).Type = ITEM_TYPE_CURRENCY Then
                If Amount = 0 Then
                    Call BancoMsg(Index, "0(zero) não é um valor válido para deposito!")
                    Exit Sub
                End If
            End If
       
            Call TakeItem(Index, ItemNum, Amount)
            Call GiveBankItem(Index, ItemNum, Amount, BankSlot)
       
            Call SendBank(Index)
           
End Sub
Sub bankwithdraw(ByVal Index As Long, ByVal BankInvNum As Long, ByVal Amount As Long)
    Dim BankItemNum As Long
    Dim BankInvSlot As Long
    BankItemNum = GetPlayerBankItemNum(Index, BankInvNum)
       
            BankInvSlot = FindOpenInvSlot(Index, BankItemNum)
           
            If BankInvSlot = 0 Then
                Call BancoMsg(Index, "Inventário cheio!")
                Exit Sub
            End If
       
            If Amount > GetPlayerBankItemValue(Index, BankInvNum) Then
                Call BancoMsg(Index, "Você não tem esse valor para retirá-lo!")
                Exit Sub
            End If
       
            If Item(BankItemNum).Type = ITEM_TYPE_CURRENCY Then
                If Amount = 0 Then
                    Call BancoMsg(Index, "0(Zero) é um valor inválido para se retirar!")
                    Exit Sub
                End If
            End If
       
            Call TakeBankItem(Index, BankItemNum, Amount)
            Call GiveItem(Index, BankItemNum, Amount)
       
            Call SendBank(Index)
End Sub



Aghora procure por:

Código:
Public Const MAX_FRIENDS = 20


De um enter e coloque isso:

Código:
Public Const MAX_BANK = 50



Aghora procure:

Código:
Public Const TILE_TYPE_NONE = 20



de um enter e coloque:

Código:
Public Const TILE_TYPE_BANK = 21



Aghora procure por :

Código:
Type PlayerInvRec
    num As Long
    Value As Long
    Dur As Long
End Type



e de um enter e coloque:

Código:
Type BankRec
    num As Long
    Value As Long
    Dur As Long
End Type



procure por:

Código:
' Conta


Abaixo de Password de um enter e adicione isso:

Código:
Bank(1 To MAX_BANK) As BankRec


Procure por:

For N = 1 To MAX_INV
Player(Index).Char(CharNum).Inv(N).num = 0
Player(Index).Char(CharNum).Inv(N).Value = 0
Player(Index).Char(CharNum).Inv(N).Dur = 0
Next



de um enter i abaixo adicione:

Código:
For N = 1 To MAX_BANK
            Player(Index).Bank(N).num = 0
            Player(Index).Bank(N).Value = 0
            Player(Index).Bank(N).Dur = 0
        Next


Aghora ao Fim do modTypes adicione:
Código:

Function GetPlayerBankItemNum(ByVal Index As Long, ByVal BankSlot As Long) As Long
    GetPlayerBankItemNum = Player(Index).Bank(BankSlot).num
End Function

Sub SetPlayerBankItemNum(ByVal Index As Long, ByVal BankSlot As Long, ByVal ItemNum As Long)
    Player(Index).Bank(BankSlot).num = ItemNum
    Call SendBankUpdate(Index, BankSlot)
End Sub

Function GetPlayerBankItemValue(ByVal Index As Long, ByVal BankSlot As Long) As Long
    GetPlayerBankItemValue = Player(Index).Bank(BankSlot).Value
End Function

Sub SetPlayerBankItemValue(ByVal Index As Long, ByVal BankSlot As Long, ByVal ItemValue As Long)
    Player(Index).Bank(BankSlot).Value = ItemValue
    Call SendBankUpdate(Index, BankSlot)
End Sub

Function GetPlayerBankItemDur(ByVal Index As Long, ByVal BankSlot As Long) As Long
    GetPlayerBankItemDur = Player(Index).Bank(BankSlot).Dur
End Function

Sub SetPlayerBankItemDur(ByVal Index As Long, ByVal BankSlot As Long, ByVal ItemDur As Long)
    Player(Index).Bank(BankSlot).Dur = ItemDur
End Sub

Procure por:
Código:
Call SendFriendListToNeeded(GetPlayerName(Index))
de um enter e coloque:
Código:

Call SendBank(Index)
Bom e testado e funçoa correctamente alguma duvina sera resolvida no topico bom espero que gostaram ja que demorei muito para fazer e espero fazer mais tutorials bom ate outra!

FrmBanco.rar
Ir para o topo Ir para baixo
https://universogamesmmo.forumeiros.com
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptySáb 02 Jul 2011, 20:26

Aff, não faz isso não agora o sistema de banco que criei não aianto nada ¬¬

XD

Vlw pela contribuçao
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptySáb 02 Jul 2011, 20:59

hehe

na proxima vou colocar sellitem para vocês só estou esperando ter mais usuarios...
quando se aproximar dos 300 usuarios libero o perfect engine arruma pronto para criar animes com tudo inovado e arrumo brugs na perfect ja não existe mais hehe...

obrigado ate a proxima...
Ir para o topo Ir para baixo
Lucas Roberto
Administrador
Administrador
Lucas Roberto


Mensagens : 711

Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptySáb 02 Jul 2011, 21:15

Game vai apostar aquele que fiz para você ?
Ir para o topo Ir para baixo
https://universogamesmmo.forumeiros.com
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptyDom 03 Jul 2011, 22:16

vlw, mto util. +1 cred
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptySeg 04 Jul 2011, 18:03

sim Lucas roberto, alem ja esta arrumado o bug que tinha
e fiz para seu projeto se quizer usar um sellitem para cash...
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptyDom 19 Fev 2012, 23:25

Copiado da MMORPGBR ... Shocked
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptySeg 20 Fev 2012, 10:55

bom, se vc nao sabe, lucas roberto, é ou era da mmorpgbr...
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptySeg 20 Fev 2012, 11:46

Gabriel Tabarkiewicz sem flood por favor
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptyTer 18 Set 2012, 20:41

Tuto mal feito e ainda copiado.
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptyQui 20 Set 2012, 19:58

Me diz porque mal feiito esta funcionando perfeitamente
e alem do mais o proprietario desse sistema autorizo para repassar para outros forum
alem domais tem os creditos devidos

Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptyQui 20 Set 2012, 20:01

Aguarde ja vo posta o erro









Arrow Ponha os creditos ou Creditos:Desconhecido

Le as regras é sempre bom
Ir para o topo Ir para baixo
Lucas Roberto
Administrador
Administrador
Lucas Roberto


Mensagens : 711

Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% EmptySeg 14 Ago 2017, 22:50

Correção do sistema:

Procure por:


Código:
' ::::::::::::::::::::::::
    ' :: Player bank packet ::
    ' ::::::::::::::::::::::::
    If Parse(0) = "playerbanco" Then
        n = 1
        For I = 1 To MAX_BANK
            Call SetPlayerBankItemNum(MyIndex, I, Val(Parse(n)))
            Call SetPlayerBankItemValue(MyIndex, I, Val(Parse(n + 1)))
            Call SetPlayerBankItemDur(MyIndex, I, Val(Parse(n + 2)))

            n = n + 3
        Next I
        Exit Sub
        End If

Mude para:


Código:
' ::::::::::::::::::::::::
    ' :: Player bank packet ::
    ' ::::::::::::::::::::::::
    If Parse(0) = "playerbanco" Then
        n = 1
        For I = 1 To MAX_BANK
            Call SetPlayerBankItemNum(MyIndex, I, Val(Parse(n)))
            Call SetPlayerBankItemValue(MyIndex, I, Val(Parse(n + 1)))
            Call SetPlayerBankItemDur(MyIndex, I, Val(Parse(n + 2)))

            n = n + 3
        Next I
        Exit Sub
        End If

  ' :::::::::::::::::::::::::::::::
    ' :: Player bank update packet ::
    ' :::::::::::::::::::::::::::::::
    If Parse(0) = "atualizarbanco" Then
        n = Val(Parse(1))

        Call SetPlayerBankItemNum(MyIndex, n, Val(Parse(2)))
        Call SetPlayerBankItemValue(MyIndex, n, Val(Parse(3)))
        Call SetPlayerBankItemDur(MyIndex, n, Val(Parse(4)))
        Exit Sub
        End If
    
    ' :::::::::::::::::::::::::::::::
    ' :: Player bank open packet ::
    ' :::::::::::::::::::::::::::::::

    If Parse(0) = "abrirbanco" Then
        frmBanco.Show
        Exit Sub
        End If

    If Parse(0) = "bancomsgg" Then
    Msg = Parse$(1)
        Call MsgBox(Msg, vbOKOnly, GAME_NAME)
        Exit Sub
        End If

Procure por:
Código:
FileNameB = App.Path & "\Bancos" & Trim$(Name) & ".ini"

Mude Para:
Código:
FileNameB = App.Path & "\Bancos\" & Trim$(Name) & ".ini"

Procure por:
Código:
FileNameB = App.Path & "\Bancos" & Trim$(Player(Index).Login) & ".ini"

Mude Para:
Código:
FileNameB = App.Path & "\Bancos\" & Trim$(Player(Index).Login) & ".ini"

Prontinho agora da correto!

obs: "Os Créditos são do Lucas Lupo"
Ir para o topo Ir para baixo
https://universogamesmmo.forumeiros.com
Conteúdo patrocinado





Banco 100% Empty
MensagemAssunto: Re: Banco 100%   Banco 100% Empty

Ir para o topo Ir para baixo
 
Banco 100%
Ir para o topo 
Página 1 de 1

Permissões neste sub-fórumNão podes responder a tópicos
Universo Games :: Criação de Jogos :: Elysium Diamond :: Tutoriais :: Tutoriais Aprovados-
Ir para: