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

Seu mundo de criatividade!


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

[Tutorial] Evento XP Automático

2 participantes

Ir para baixo  Mensagem [Página 1 de 1]

1[Tutorial] Evento XP Automático Empty [Tutorial] Evento XP Automático Qui maio 12, 2016 10:44 am

Kenshiro

Kenshiro
Iniciante

Requisitos:
-PC
-VB6
-Elysium Engine (Usei Elysium Taberna, ,as qualquer uma serve)

Primeiramente, vá a frmServer e adicione isso:

Frame:
Name: fraEvento
Caption: Evento XP

Timer:
Name: tmrEvento

Label 1:
Name: lblInicio
Caption: Inicio do Evento:

TexBox 1:
Name: txtIniciar
Caption: 00:00:00

Label 2:
Name: lblFim
Caption: Fim do Evento:

TexBox 2:
Name: txtTime
Caption: 00:00:00

Label 3:
Name: lblXP
Caption: XP Extra:

TexBox 3:
Name: txtXP
Caption: 0

CheckBox
Name:chkEStarted
Caption: Evento Ativo?


Imagem com Legendas:
Imagem::


Agora, dentro do Timer Adicione:

Código:
On Error Resume Next
If chkEStarted.Value = 0 Then Exit Sub

If txtIniciar.text <> "00:00:00" And Time >= txtIniciar.text Then
    If Time >= txtTime.text Then
        chkEStarted.Value = 0
        txtTime.text = "00:00:00"
        txtIniciar.text = "00:00:00"
        GlobalMsg "O Evento de Experiência chegou ao Fim!", Red
        Exit Sub
    End If
End If


Na chkEStarted adicione:

Código:
If chkEStarted.Value = 0 Then
    tmrEvento.Enabled = False
Else
    tmrEvento.Enabled = True
End If

Agora Procure no ModGameLogic, Sub AttackNPC por:

Código:
        If Exp < 0 Then
            Exp = 1
        End If

Abaixo Adicone:



Código:
        'Checar se o Evento está ativo e dar bônus de XP.
        If frmServer.chkEStarted.Value <> 0 And frmServer.txtXP > 0 Then
            Exp = Int(Exp * frmServer.txtXP.text)
            BattleMsg Attacker, "Bônus de XP do Evento!", Yellow
        End If


Acho que não esqueci de nada...
Qualquer erro reportem ai, desfrutem...


Créditos:
Kenshiro

2[Tutorial] Evento XP Automático Empty Re: [Tutorial] Evento XP Automático Seg maio 16, 2016 7:28 am

Reborn

Reborn
Ocasional

Parabéns Kenshiro, ótimo tutorial, bem editado! Gostei muit, parabéns e é ótimo para quem quer começar já com adicionais. +rep

Ir para o topo  Mensagem [Página 1 de 1]

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