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


+5
Skull Death
BrunoFox
JuanCollin
Jonny
Valentine
9 participantes

    Aumentando Level Máximo

    Valentine
    Valentine
    Administrador
    Administrador


    Medalhas : Aumentando Level Máximo ZgLkiRU
    Mensagens : 5335
    Créditos : 1163

    Aumentando Level Máximo Empty Aumentando Level Máximo

    Mensagem por Valentine Dom Mar 27, 2011 11:36 am

    Client

    1 - No modConstants, procure por:
    Código:
    Public Const MAX_LEVELS As Byte = 100
    2 - Substitua por:
    Código:
    Public Const MAX_LEVELS As Long = 500
    (O valor 500 é o level máximo)

    3 - No modTypes, procure por:
    Código:
    Private Type PlayerRec

    4 - No lugar de:
    Código:
    Level As Byte

    5 - Substitua por:
    Código:
    Level As Long

    Servidor:
    6 - Repita o mesmo procedimento no Servidor.

    Obs.: Caso você queira alterar o level acima de 500, além de seguir as instruções acima você deve fazer o seguinte:

    7 - No modPlayer do Servidor, procure por:
    Código:
    Function GetPlayerNextLevel(ByVal Index As Long) As Long 
      GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(index) + 1) ^ 3 - (6 * (GetPlayerLevel(index) + 1) ^ 2) + 17 * (GetPlayerLevel(index) + 1) - 12)
    End Function

    8 - Substitua por:
    Código:
    Function GetPlayerNextLevel(ByVal Index As Long) As Long
        GetPlayerNextLevel = (25 / 15) * ((GetPlayerLevel(Index) + 1) ^ 3 - (2 * (GetPlayerLevel(Index) + 1) ^ 2) + 17 * (GetPlayerLevel(Index) + 1) - 12)
    End Function

    9 - No modDatabase do Client, procure por:
    Código:
    Function GetPlayerNextLevel(ByVal Index As Long) As Long
        ' If debug mode, handle error then exit out
        If Options.Debug = 1 Then On Error GoTo errorhandler
       
        If Index > MAX_PLAYERS Then Exit Function
     
        GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(Index) + 1) ^ 3 - (6 * (GetPlayerLevel(Index) + 1) ^ 2) + 17 * (GetPlayerLevel(Index) + 1) - 12)
       
        ' Error handler
        Exit Function
    errorhandler:
        HandleError "GetPlayerNextLevel", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
        Err.Clear
        Exit Function
    End Function

    10 - Substitua por:
    Código:
    Function GetPlayerNextLevel(ByVal Index As Long) As Long
        ' If debug mode, handle error then exit out
        If Options.Debug = 1 Then On Error GoTo errorhandler
       
        If Index > MAX_PLAYERS Then Exit Function
     
        GetPlayerNextLevel = (25 / 15) * ((GetPlayerLevel(Index) + 1) ^ 3 - (2 * (GetPlayerLevel(Index) + 1) ^ 2) + 17 * (GetPlayerLevel(Index) + 1) - 12)
       
        ' Error handler
        Exit Function
    errorhandler:
        HandleError "GetPlayerNextLevel", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
        Err.Clear
        Exit Function
    End Function

    Créditos
    Valentine (Por criar e disponibilizar o tutorial)
    Dragonick (Refez a formula do GetplayerNextLevel)


    Última edição por Valentine em Sex Jun 08, 2012 10:23 am, editado 10 vez(es)

    carlosarruda gosta desta mensagem

    Jonny
    Jonny
    Aldeia Friend
    Aldeia Friend


    Medalhas : Aumentando Level Máximo Trophy11Aumentando Level Máximo 9P5Gx
    Mensagens : 1936
    Créditos : 327

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por Jonny Dom Mar 27, 2011 12:38 pm

    muy bueno =)

    muito bom =)


    _________________
    Spoiler:


    Aumentando Level Máximo KVIdx
    JuanCollin
    JuanCollin
    Membro de Honra
    Membro de Honra


    Mensagens : 988
    Créditos : 98

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por JuanCollin Dom Mar 27, 2011 3:20 pm

    Eu não uso o Eclipse mas pode ser muito util para quem usa ^^
    BrunoFox
    BrunoFox
    Aldeia Friend
    Aldeia Friend


    Mensagens : 1531
    Créditos : 32

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por BrunoFox Sex Set 16, 2011 7:40 pm

    Num deu certo e ja fiz 5x isso, eu uso o 2.6


    _________________
    Aumentando Level Máximo CHlkxwf
    Skull Death
    Skull Death
    Novato
    Novato


    Mensagens : 22
    Créditos : 1

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por Skull Death Sex Set 16, 2011 10:11 pm

    bem legal parabens
    Cocao
    Cocao
    Banido
    Banido


    Mensagens : 58
    Créditos : 4

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por Cocao Qui Dez 29, 2011 6:23 pm

    Nuss nao to conseguindo
    Public Const MAX_LEVELS As Byte = 100
    Nao achei só achei o as long é em qual EO esse tuto?
    DFox
    DFox
    Desenvolvedor
    Desenvolvedor


    Mensagens : 819
    Créditos : 63

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por DFox Qui Dez 29, 2011 6:28 pm

    Olá marlos, eu uso o E.O 2.0, e quero alterar para 150.

    A alteração, creio eu que será assim.
    de:
    Public Const MAX_LEVELS As Byte = 100
    para:
    Public Const MAX_LEVELS As Long = 150
    mas no resto do tutorial, precisa alterar mais alguma coisa para 150?
    ou só mudar isso e o resto do tutorial do jeito que está?


    _________________
    mãe, tô no youtube
    Valentine
    Valentine
    Administrador
    Administrador


    Medalhas : Aumentando Level Máximo ZgLkiRU
    Mensagens : 5335
    Créditos : 1163

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por Valentine Qui Dez 29, 2011 7:08 pm

    Lucky escreveu:Olá marlos, eu uso o E.O 2.0, e quero alterar para 150.

    A alteração, creio eu que será assim.
    de:
    Public Const MAX_LEVELS As Byte = 100
    para:
    Public Const MAX_LEVELS As Long = 150
    mas no resto do tutorial, precisa alterar mais alguma coisa para 150?
    ou só mudar isso e o resto do tutorial do jeito que está?
    Eu refiz o tutorial, da uma olhada.
    DFox
    DFox
    Desenvolvedor
    Desenvolvedor


    Mensagens : 819
    Créditos : 63

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por DFox Qui Dez 29, 2011 7:10 pm

    O meu está
    Public Const MAX_LEVELS As Long = 100
    vou modificar pra 150, qualquer coisa eu edito

    EDIT
    aff agora nem abre mais o E.O
    Eu ligo o server ok, ai vou no eclipse ai na hora do login da erro no server, e ele nao entra...
    sei la oq "Run-Time error 9
    Subscript out of range"

    EDIT2:
    Fiz denovo e consegui, mas ele não passa de 100 oO


    _________________
    mãe, tô no youtube
    Cocao
    Cocao
    Banido
    Banido


    Mensagens : 58
    Créditos : 4

    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por Cocao Qui Dez 29, 2011 7:21 pm

    Obs.: Caso você queira alterar o level acima de 500, além de seguir as instruções acima você deve fazer o seguinte:

    7 - Procure por:
    Código:Function GetPlayerNextLevel(ByVal index As Long) As Long

    GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(index) + 1) ^ 3 - (6 *
    (GetPlayerLevel(index) + 1) ^ 2) + 17 * (GetPlayerLevel(index) + 1) -
    12)
    End Function

    8 - Substitua por:
    Código:Function GetPlayerNextLevel(ByVal index As Long) As Long

    GetPlayerNextLevel = (25 / 15) * ((GetPlayerLevel(index) + 1) ^ 3 - (2 *
    (GetPlayerLevel(index) + 1) ^ 2) + 17 * (GetPlayerLevel(index) + 1) -
    12)
    End Function
    affs aqui vc nao explica onde procurar(em que arquivo que estou falando)

    @Edit:Fui testar com meus 500 de nivel maximo msm e oque aconteceu???
    não sai do lvl 100 só vai até o 100 Fury


    Última edição por Cocao em Qui Dez 29, 2011 7:38 pm, editado 1 vez(es)

    Conteúdo patrocinado


    Aumentando Level Máximo Empty Re: Aumentando Level Máximo

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Ter Mar 19, 2024 8:39 am