Conexão Maker

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

    Transformação por Spell

    Thales12
    Thales12
    Administrador
    Administrador


    Mensagens : 140
    Level : 8
    Data de inscrição : 01/11/2011
    Idade : 29
    Localização : Rio de Janeiro

    Transformação por Spell Empty Transformação por Spell

    Mensagem por Thales12 Seg Fev 13, 2012 12:21 am

    Client~Side

    Na frmEdiotr_Spell na cmbTyppe adicione mais um item a list chamado:

    Trans


    Agora crie uma frame com as seguintes configurações:

    Name: fraTrans
    Caption: Trans
    Visible: False


    E dentro dela crie um ScrollBox e uma label com as configurações:

    Label

    Name: lblTrans
    Caption: Sprite da Transformação: None

    ScrollBox

    Name: scrlTrans


    E dentro do scrlTrans adicione:

    Código:
        ' If debug mode, handle error then exit out
        If Options.Debug = 1 Then On Error GoTo errorhandler
       
        lblTrans.Caption = "Sprite da Transformação: " & scrlTrans.Value
        Spell(EditorIndex).trans = scrlTrans.Value
       
        ' Error handler
        Exit Sub
    errorhandler:
        HandleError "scrlTrans_Change", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContext
        Err.Clear
        Exit Sub


    De 2 cliques na cmbType e adicione isso dentro dela:

    Código:
        If cmbType.ListIndex = SPELL_TYPE_TRANS Then
            scrlRange.Value = 0
            chkAOE.Value = 1
            fraTrans.Visible = True
        End If


    Procure por:

    Código:
            .scrlRange.Value = Spell(EditorIndex).Range


    E abaixo adicione:

    Código:
            .scrlTrans.Value = Spell(EditorIndex).Trans


    No final da Private Type SpellRec antes do End Type adicione:

    Código:
        Trans As Long


    Procure por:

    Código:
    Public Const SPELL_TYPE_WARP As Byte = 4


    E abaixo adicione:

    Código:
    Public Const SPELL_TYPE_TRANS As Byte = 5


    Serve~Side

    No final da Private Type SpellRec antes do End Type adicione:

    Código:
        Trans As Long


    Procure por:

    Código:
    Public Const SPELL_TYPE_WARP As Byte = 4


    E abaixo adicione:

    Código:
    Public Const SPELL_TYPE_TRANS As Byte = 5


    Procure por:

    Código:
        ' find out what kind of spell it is! self cast, target or AOE


    E acima adicione:

    Código:
        ' Transformação
        With Spell(SpellNum)
            If .Type = SPELL_TYPE_TRANS Then
                Call SetPlayerSprite(Index, Spell(Index).Trans)
                Call SetPlayerStat(Index, Stats.Strength, GetPlayerRawStat(Index, Stats.Strength) * 2)
                Call SetPlayerStat(Index, Stats.Endurance, GetPlayerRawStat(Index, Stats.Endurance) * 2)
                Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
            End If
        End With


    Creditos:

    Ricardo

      Data/hora atual: Sáb Abr 27, 2024 8:16 am