Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant archive_postsperpage - assumed 'archive_postsperpage' (this will throw an Error in a future version of PHP) in ..../archive/index.php on line 456
How set IsWalking to 1? [Archive] - Forums

PDA

View Full Version : How set IsWalking to 1?



robssito
05-15-2011, 09:48 PM
Hello, how i set my Distance.IsWalking to 1? I read battle list correctly, but how set this?

maozao
05-15-2011, 10:01 PM
You must to use a memory Writer, but why do you want to do that ?! o.o'

robssito
05-15-2011, 10:02 PM
For create a walker? lol




--- other dubt
Public Shared Sub FullLightOn()
WriteBytes(FindWindow("tibiaclient", vbNullString), Addresses.FullLightNop, Addresses.FullLightNopEdited, 2)
WriteByte(FindWindow("tibiaclient", vbNullString), Addresses.FullLightAdr, Addresses.FullLightAdrEdited)
End Sub

Why this dont work? ¬¬

Public Shared FullLightNop As UInteger = &H4EAA09
Public Shared FullLightNopDefault As Byte() = New Byte() {&H7E, &H5}
Public Shared FullLightNopEdited As Byte() = New Byte() {&H90, &H90}

Public Shared FullLightAdr As UInteger = FullLightNop + 3
Public Shared FullLightAdrDefault As Byte = &H80
Public Shared FullLightAdrEdited As Byte = &HFF[hr]
Public Shared Function WriteBytes(ByVal handle As IntPtr, ByVal address As Long, ByVal bytes As Byte(), ByVal length As UInteger) As Boolean
Dim bytesWritten As IntPtr
' Write to memory
Dim result As Integer = WinApi.WriteProcessMemory(handle, New IntPtr(address), bytes, length, bytesWritten)
Return result <> 0
End Function

-


'write byte
Public Shared Function WriteByte(ByVal handle As IntPtr, ByVal address As Long, ByVal value As Byte) As Boolean
Return WriteBytes(handle, address, New Byte() {value}, 1)
End Function

maozao
05-15-2011, 10:12 PM
You don't need to set the IsWalking flag when you create a cavebot(that's what I think that you're trying to do), it's Tibia's job, don't worry about that.

About the FullLight you can check the TibiaAPi source, I'm not good with Vb.NET

http://code.google.com/p/tibiaapi/source/browse/trunk/tibiaapi/Objects/Map.cs#210

robssito
05-15-2011, 10:31 PM
Yes, i see on TibiaApi source and dont work my code in VB.NET :(
Is the same code to api, but converted ;x

robssito
05-16-2011, 03:17 PM
Memory.WriteByte(Memory.FindWindow("tibiaclient", vbNullString), i + Addresses.DistanceIsWalking, 1)
MsgBox(Memory.ReadByte(Memory.FindWindow("tibiaclient", vbNullString), i + Addresses.DistanceIsWalking))


The returb of my code is '0', 'False', why?

Blaster_89
05-16-2011, 03:37 PM
I'm not really familiar with FindWindow, but I'm guessing its parameters are case-sensitive. Try "TibiaClient" instead of "tibiaclient".
You should also store the handle instead of retrieving it whenever you call WriteProcessMemory or ReadProcessMemory

robssito
05-16-2011, 03:48 PM
The FindWindow is correctly, i used to change the name of the player and have success :P
:S

robssito
05-16-2011, 09:01 PM
I think my WriteByte and WriteBytes is wrong, how is for visual basic?
I use this:


Public Shared Function WriteBytes(ByVal handle As IntPtr, ByVal address As Long, ByVal bytes As Byte(), ByVal length As UInteger) As Boolean
Dim bytesWritten As IntPtr
' Write to memory
Dim result As Integer = WinApi.WriteProcessMemory(handle, New IntPtr(address), bytes, length, bytesWritten)
Return result <> 0
End Function

-


'write byte
Public Shared Function WriteByte(ByVal handle As IntPtr, ByVal address As Long, ByVal value As Byte) As Boolean
Return WriteBytes(handle, address, New Byte() {value}, 1)
End Function

Blaster_89
05-16-2011, 10:07 PM
Did you try debugging to see if the parameters are correct?

robssito
05-17-2011, 02:34 PM
The parameters is correctly :/
I get all from TibiaApi, including the WriteBytes / WriteByte.

robssito
05-19-2011, 10:54 AM
Nobody?

Tabgyn
05-20-2011, 08:59 PM
Sorry for writing in Portuguese...

Amigo você não consegue suas respostas por que ninguêm consegue entender o que você está querendo fazer.
O IsWalking não foi feito para ser alterado pelo usuário, isso fica a cargo do cliente. Mas imagina uma situação, você querendo setar o valor em 1 e o cliente setando em 0.
Use o IsWalking apenas para leitura.

maozao
05-20-2011, 10:23 PM
Sorry for writing in Portuguese...

Amigo você não consegue suas respostas por que ninguêm consegue entender o que você está querendo fazer.
O IsWalking não foi feito para ser alterado pelo usuário, isso fica a cargo do cliente. Mas imagina uma situação, você querendo setar o valor em 1 e o cliente setando em 0.
Use o IsWalking apenas para leitura.


Well, the IsWalking flag is seted to 1 when you use the GoTo, so you mus to change the value if you're creating everything from 0, if you're using TibiaAPI you don't need to change this value =)

robssito
05-22-2011, 11:02 PM
Well, the command GoTo dont work without the IsWalking...
I use this to write memory GoTo:



Memory.WriteInt32(Memory.FindWindow("tibiaclient", vbNullString), i + Addresses.GoToX, 31995)
Memory.WriteInt32(Memory.FindWindow("tibiaclient", vbNullString), i + Addresses.GoToY, 32144)
Memory.WriteInt32(Memory.FindWindow("tibiaclient", vbNullString), i + Addresses.GoToZ, 11)

maozao
05-23-2011, 03:23 AM
That's what I said ... you just need to read what people tell you ;s

http://code.google.com/p/tibiaapi/source/browse/trunk/tibiaapi/Objects/Player.cs#50

robssito
05-23-2011, 01:57 PM
http://code.google.com/p/tibiaapi/source/browse/tibiaapi/Objects/Player.cs?spec=svn100&r=100#156



public int GoTo_X
{
get { return client.ReadInt(Addresses.Player.GoTo_X); }
set { client.WriteInt(Addresses.Player.GoTo_X, value); }
}
public int GoTo_Y
{
get { return client.ReadInt(Addresses.Player.GoTo_Y); }
set { client.WriteInt(Addresses.Player.GoTo_Y, value); }
}
public int GoTo_Z
{
get { return client.ReadInt(Addresses.Player.GoTo_Z); }
set { client.WriteInt(Addresses.Player.GoTo_Z, value); }
}