Convidado Convidado
| Assunto: Evoluir Automaticamente Seg 13 Jun 2011, 21:41 | |
| Gente fiz um tuto assim:
Client~Side
Procurei por:
- Código:
-
Sub SendLeaveParty() Dim Packet As String
Packet = "LEAVEPARTY" & END_CHAR Call SendData(Packet) End Sub E abaixo adicionei:
- Código:
-
Sub SendAdulto() Dim Packet As String
Packet = "ADULTO" & END_CHAR Call SendData(Packet) End Sub Serve~Side
Procurei por:
- Código:
-
Case "dtrade" E abaixo da casa adicionei:
- Código:
-
Case "Adulto" 'Gohan If GetPlayerLevel(Index) = 6 Then Call SetPlayerSprite(Index, 30) Call SetPlayerstr(Index, GetPlayerstr(Index) + 10) Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 10) Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 20) Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 30) Call SetPlayerMP(Index, GetPlayerMP(Index) + 30) Call PlayerMsg(Index, "Você virou adulto!", BrightBlue) Call SendPlayerData(Index) Call SavePlayer(Index) End If
'Trunks[/font] [font=Comic Sans Ms] If GetPlayerLevel(Index) = 6 Then Call SetPlayerSprite(Index, 48) Call SetPlayerstr(Index, GetPlayerstr(Index) + 30) Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 30) Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 20) Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 10) Call SetPlayerMP(Index, GetPlayerMP(Index) + 10) Call PlayerMsg(Index, "Você virou adulto!", BrightBlue) Call SendPlayerData(Index) Call SavePlayer(Index) End If Exit Sub E um sistema de evoluir automaticamente, mais nao pega poderiam me falar o erro?
Última edição por Ricardo XD em Ter 14 Jun 2011, 07:49, editado 1 vez(es) |
|
Lucas Roberto Administrador
Mensagens : 711
| Assunto: Re: Evoluir Automaticamente Seg 13 Jun 2011, 21:45 | |
| JA DECLARO "Adulto"
PARA FAZER UM CASE SEMPRE TEM QUE DECLARA ALGO NO CLIENT PARA MANDA PARA SERVER E ASSIM QUE FUNCIONA PROGRAMAÇÃO E NA BASE DE LIGAÇÕES | |
|
Convidado Convidado
| Assunto: Re: Evoluir Automaticamente Ter 14 Jun 2011, 07:24 | |
| A entendi, vlw lucas
Edit
Olha la, editei o topico ve agora |
|
Lucas Roberto Administrador
Mensagens : 711
| Assunto: Re: Evoluir Automaticamente Ter 14 Jun 2011, 15:26 | |
| bem e quase isto mais este codigo que você esta fazendo e para comando geralmente vai da nisto... | |
|
Convidado Convidado
| Assunto: Re: Evoluir Automaticamente Ter 14 Jun 2011, 18:16 | |
| Como assim? Daria pra você fazer um pra mim Lucas? |
|
Lucas Roberto Administrador
Mensagens : 711
| Assunto: Re: Evoluir Automaticamente Ter 14 Jun 2011, 20:39 | |
| Sim bom bem facil Esse script é tipo um SSJ automático, q evolui o char automaticamente quando ele upa =]... Procure por: CÓDIGO: - Código:
-
Sub PlayerLevelUp(index) Dim i
' Check if attacker got a level up If GetPlayerExp(Index) >= GetPlayerNextLevel(Index) Then
Cole isso abaixo: CÓDIGO: - Código:
-
If GetPlayerLevel(INDEX) = 13 Then Call PlayerMsg(index, "Vc evoluiu (ponha o q quiser excrever nesse espaço entre aspas)", 7) Call SetPlayerSTR(index, GetPlayerSTR(index) + 1) Call SetPlayerDEF(index, GetPlayerDEF(index) + 1) Call SetPlayerSprite(index, 11) Call SendPlayerData(Index) End If
Explicação e como mudar:If GetPlayerLevel(INDEX) = 13 ThenMude o 13 pelo Level necessário para evoluir, essa linha testa se o player tah no level 13^^ Call PlayerMsg(index, "Vc evoluiu (ponha o q quiser excrever nesse espaço entre aspas)", 7)Dentro das aspas ponha o q quiser q apareça escrito.. troq o 7 pelo número da cor qvc deseja.. Essalinha chama uma mensagem Call SetPlayerSTR(index, GetPlayerSTR(index) + 1)Troque o 1 pela quantidade de força q o char ganha ao evoluir, Essa linha adiciona Str ao personagem Call SetPlayerDEF(index, GetPlayerDEF(index) + 1)Troque o 1 pela quantidade de defesa q o char ganha ao evoluir, essa linha adiciona Def ao personagem Call SetPlayerSprite(index, 11)Troque o 11 pelo sprite q o player terá após evoluir,essa linha troca o sprite do player Call SendPlayerData(Index)Essa linha "atualiza"os dados do player End IfE essa finaliza a condição =] | |
|
Convidado Convidado
| Assunto: Re: Evoluir Automaticamente Qua 15 Jun 2011, 08:41 | |
| A obrigado, pode trancar o topico |
|
Lucas Roberto Administrador
Mensagens : 711
| Assunto: Re: Evoluir Automaticamente Qua 15 Jun 2011, 14:46 | |
| | |
|
Conteúdo patrocinado
| Assunto: Re: Evoluir Automaticamente | |
| |
|