Item mudança de sprite
:: Outras Engines :: Eclipse Engine :: Tutoriais
Página 1 de 1
Item mudança de sprite
Esse item fará o seguinte:
Ao usá-lo, ele salvará uma variável com a sprite atual do player e mudará para qual você quiser, ao desequipar, ele colocará a sprite inicial novamente
Server~Side
Procure pela Sub Packet_UseItem, dentro dela procure por:Em cima dessa linha adicione:
- Código:
' Find out what kind of item it is
Observações: Case 1 significa que o item programado no caso é 1, para adicionar mais é só usá-lo como exemplo.
- Código:
Select Case GetPlayerInvItemNum(Index, InvNum)
Case 1
If InvNum <> GetPlayerArmorSlot(Index) Then
Call MudarSprite(Index, 2)
Else
Call DesmudarSprite(Index)
End If
End Select
GetPlayerArmorSlot(Index) significa que o item é Armor, caso seja outra coisa, deverá trocar!
Call MudarSprite(Index, 2) o 2 significa que mudará a sprite do player para 2
Agora procure por:
- Código:
' This packet seems to me like it's incomplete. [Mellowz]
Em cima dessa linha adicione:
- Código:
Sub MudarSprite(ByVal Index As Long, ByVal Sprite As Long)
If GetVar(App.Path & "\Sprites By FelipeBN.ini", "Sprites", GetPlayerName(Index)) = "" then Call PutVar(App.Path & "\Sprites By FelipeBN.ini", "Sprites", GetPlayerName(Index), GetPlayerSprite(Index))
Call SetPlayerSprite(Index, Sprite)
Call SendPlayerData(Index)
End Sub
Sub DesmudarSprite(ByVal Index As Long)
Call SetPlayerSprite(Index, GetVar(App.Path & "\Sprites By FelipeBN.ini", "Sprites", GetPlayerName(Index)))
Call SendPlayerData(Index)
End Sub
À pedido de augusto95
Créditos: Eu
:: Outras Engines :: Eclipse Engine :: Tutoriais
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
Seg Abr 08, 2013 7:18 pm por L Mars
» PlayGame chego !!
Qua Out 17, 2012 1:59 pm por PlayGame
» Dragon Ball Z Moster Online
Ter Out 16, 2012 8:19 pm por Myke ~
» [EEB]Sistema de Guerra ninja Basic Por ComandButton
Ter Out 16, 2012 8:14 pm por Myke ~
» Meus tutorias
Dom Out 14, 2012 4:55 pm por PlayGame
» Avaliem esse's desenho
Dom Out 14, 2012 4:36 pm por PlayGame
» Tutorial Mapper - Como avaliar um mapa
Sáb Out 13, 2012 4:52 pm por NeeTo
» Movimentação Wasd e Setas V2.0
Qui Out 11, 2012 6:14 pm por Myke ~
» Level Maximo 1000
Qui Out 11, 2012 6:10 pm por Myke ~