Postado Junho 16, 2012 12 anos Olá pessoal, hoje vou ensinar a vocês como fazer um Light Full no C# sem o uso do TibiaAPI. OBS: ASRL Desabilitado ! Usings: using System; using System.Runtime.InteropServices; using System.Text; Endereços de Memoria: 9.54 FullLightNop = 0x50E6F9; FullLightAdr = 0x50E6FE; FullLightNopDefault = new byte[] { 0x7E, 0x0A }; FullLightNopEdited = new byte[] { 0x90, 0x90 }; FullLightAdrDefault = 0x80; FullLightAdrEdited = 0xFF; Functions: [DllImport("kernel32.dll")] public static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten); public static bool WriteBytes(IntPtr handle, long address, byte[] bytes, uint length) { IntPtr bytesWritten; // Write to memory int result = WriteProcessMemory(handle, new IntPtr(address), bytes, length, out bytesWritten); return result != 0; } public static bool WriteByte(IntPtr handle, long address, byte value) { return WriteBytes(handle, address, new byte[] { value }, 1); } public static void FullLight(bool value) { if (value == true) { Memory.WriteBytes(TibiaHandle, FullLightNop, FullLightNopEdited, 2); Memory.WriteByte(TibiaHandle, FullLightAdr, FullLightAdrEdited); } else { Memory.WriteBytes(FullLightNop, FullLightNopDefault, 2); Memory.WriteByte(FullLightAdr, FullLightAdrDefault); } } Como usar: if (cbbFullLight.Checked) { FullLight(true); } else { FullLight(false); } Editado Junho 16, 2012 12 anos por Kimoszin (veja o histórico de edições)
Postado Junho 16, 2012 12 anos pqp eu simatava tentando fazer se treco loco ¬¬ agora fui ver e coisa facil :s Vlw pela code hehehe Reputado
Postado Junho 26, 2012 12 anos Cara, eu gostaria de testar esse código no 9.53 porém não acho os endereços corretos, pode me ajuda? Obrigado!
Postado Junho 26, 2012 12 anos FullLightNop = 0x50C3C9; FullLightAdr = 0x50C3CE; Eu tinha os seguintes endereços para a versão 9.53, por favor realize um teste. Espero que ajude! Editado Junho 26, 2012 12 anos por campo486 (veja o histórico de edições)
Postado Junho 26, 2012 12 anos Em 26/06/2012 em 11:14, campo486 disse: FullLightNop = 0x50C3C9; FullLightAdr = 0x50C3CE; Eu tinha os seguintes endereços para a versão 9.53, por favor realize um teste. Espero que ajude! Cara, obrigado por me ajudar! Olha só, eu tenho esses mesmos endereços só que pra facilitar, vou postar meu código pois continua não funcionando! //processo tibia public static Process Tibia = Process.GetProcessesByName("Tibia")[0]; //constants public static uint FullLightNop = 0x50C3C9 ; public static uint FullLightAdr = 0x50C3CE ; public static byte[] FullLightNopDefault = new byte[] { 0x7E, 0x05 }; public static byte[] FullLightNopEdited = new byte[] { 0x90, 0x90 }; public static byte FullLightAdrDefault = 0xFF; public static byte FullLightAdrEdited = 0xFF; //função setar luz public static void FullLight(bool value) { if (value == true) { Memory.WriteBytes(Tibia.Handle, FullLightNop, FullLightNopEdited, 2); Memory.WriteByte(Tibia.Handle, FullLightAdr, FullLightAdrEdited); } else { Memory.WriteBytes(Tibia.Handle, FullLightNop, FullLightNopDefault, 2); Memory.WriteByte(Tibia.Handle, FullLightAdr, FullLightAdrDefault); } } Quando chamo a função FullLight(true) não acontece nada no tibia, nem dá erro, nem muda a luz nem nada! Obrigado novamente! Editado Junho 26, 2012 12 anos por dezon (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.