Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.
Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.

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

Andando com o Mouse.

2 participantes

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

1Andando com o Mouse. Empty Andando com o Mouse. Dom Fev 19, 2012 10:00 pm

AtlaS

AtlaS
Iniciante
Iniciante

Bom sem muito papo galera bora começar.

Client-Side

Faça um novo check lá no picOptions com essas configurações:


Código:
Caption = Andar Com [b]Mouse[/b]

Agora clica duas vezes no Check e poe esse codigo:


Código:
Call PutVar(App.Path & "\config.ini", "CONFIG", "MouseMovement", Check1.Value)

mas antes verifique se o nome do check está "Check1".

Agora no modgamelogic no fim ponha essa nova função:


Código:
Public Function MouseCheck() As BooleanIf Val(GetVar(App.Path & "\config.ini", "CONFIG", "MouseMovement")) = 1 ThenMouseCheck = TrueElseMouseCheck = FalseEnd IfEnd Function

agora vá no frmMirage e procure por:


Código:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)

Ai troque tudo por:


Código:
Dim I As LongIf InSpawnEditor ThenIf SpawnLocator > 0 ThenTempNpcSpawn(SpawnLocator).Used = 1TempNpcSpawn(SpawnLocator).x = Int((x + (NewPlayerX * PIC_X)) / PIC_X)TempNpcSpawn(SpawnLocator).y = Int((y + (NewPlayerY * PIC_Y)) / PIC_Y)frmMapProperties.Spawn(SpawnLocator - 1).Caption = "(" & TempNpcSpawn(SpawnLocator).x & ", " & TempNpcSpawn(SpawnLocator).y & ")"SpawnLocator = 0End IfExit Sub

Novamente no modGamelogic procure por:

Código:
Public MouseX As LongPublic MouseY As Long

Embaixo coloque:

Código:
Public XToGo As LongPublic YToGo As Long

procure no modGamelogic:



Código:
' Blit the backbufferCall DD_PrimarySurf.Blt(rec_pos, DD_BackBuffer, rec, DDBLT_WAIT)

embaixo ponha:


Código:
If XToGo <> -1 Or YToGo <> -1 ThenDim XDif As LongDim YDif As LongXDif = Abs(GetPlayerX(MyIndex) - XToGo)YDif = Abs(GetPlayerY(MyIndex) - YToGo)If XToGo = GetPlayerX(MyIndex) Or XToGo = -1 ThenXToGo = -1XDif = 0ElseXDif = Abs(GetPlayerX(MyIndex) - XToGo)End IfIf YToGo = GetPlayerY(MyIndex) Or YToGo = -1 ThenYToGo = -1YDif = 0ElseYDif = Abs(GetPlayerY(MyIndex) - YToGo)End IfDebug.Print (XDif & " " & YDif)If XDif > YDif ThenIf GetPlayerX(MyIndex) - XToGo > 0 ThenDirLeft = TrueElseDirRight = TrueEnd IfEnd IfIf YDif > XDif ThenIf GetPlayerY(MyIndex) - YToGo > 0 ThenDirUp = TrueElseDirDown = TrueEnd IfEnd IfIf XDif = YDif And XDif <> 0 And YDif <> 0 Then' I'll be nice and give you the non-directional movement code'If Int(Rnd * 2) = 0 ThenIf GetPlayerX(MyIndex) - XToGo > 0 ThenDirLeft = TrueElseDirRight = TrueEnd If' ElseIf GetPlayerY(MyIndex) - YToGo > 0 ThenDirUp = TrueElseDirDown = TrueEnd If'End IfEnd IfEnd If

Procure por:

Código:
Sub CheckInput(ByVal KeyState As Byte, ByVal KeyCode As Integer, ByVal Shift As Integer)

ai troque tudo por:


Código:
If GettingMap = False ThenIf KeyState = 1 ThenIf KeyCode = vbKeyReturn ThenCall CheckMapGetItemEnd IfIf KeyCode = vbKeyControl ThenControlDown = TrueEnd IfIf KeyCode = vbKeyUp ThenDirUp = TrueDirDown = FalseDirLeft = FalseDirRight = FalseEnd IfIf KeyCode = vbKeyDown ThenDirUp = FalseDirDown = TrueDirLeft = FalseDirRight = FalseEnd IfIf KeyCode = vbKeyLeft ThenDirUp = FalseDirDown = FalseDirLeft = TrueDirRight = FalseEnd IfIf KeyCode = vbKeyRight ThenDirUp = FalseDirDown = FalseDirLeft = FalseDirRight = TrueEnd IfIf KeyCode = vbKeyShift ThenShiftDown = TrueEnd IfElseIf KeyCode = vbKeyUp ThenXToGo = -1YToGo = -1End IfIf KeyCode = vbKeyDown ThenXToGo = -1YToGo = -1End IfIf KeyCode = vbKeyLeft ThenXToGo = -1YToGo = -1End IfIf KeyCode = vbKeyRight ThenXToGo = -1YToGo = -1End IfIf KeyCode = vbKeyShift Then ShiftDown = FalseIf KeyCode = vbKeyControl Then ControlDown = FalseEnd IfEnd If

em modClientTCP na Sub TcpInit() ali em baixo onde tem PlayerBuffer = "" em baixo ponha:


Código:
XToGo = -1YToGo = -1

Ufa..Acabo Nao Precisa Explicar o Nome ja diz tudo.

Creditos:Lucas Lopô

2Andando com o Mouse. Empty Re: Andando com o Mouse. Ter Fev 21, 2012 8:51 pm

wyvern670

wyvern670
Iniciante
Iniciante

Tem isso para Eclipse Origins? eu sempre quis que tivesse!

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

Tópicos semelhantes

-

» Mostrar nome com a passagem do mouse

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