[-]
Shout:
Click Refresh to load shouts.

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[8.54]Error in Tibia
02-25-2010, 11:40 AM
Post: #1
[8.54]Error in Tibia
Piece of code:
Code:
public enum TurnDirections
        {
            S = 0x50f,
            E = 0x50e,
            W = 0x50d,
            N = 0x50c
        };
typedef void _Dir(TurnDirections);
static _Dir *Dir = (_Dir*)0x4CFE70;

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        Polacz(); //Connect
        MessageBox(NULL, "DLL Injected!", "Success!", MB_OK);
                Dir(N);

and the error i get (I Lauched tibia, logged in and Lauched the bot... and error)
[Image: errorpj.th.png]

Thenk you very mutch for help.
Marek677
Find all posts by this user
Quote this message in a reply
02-25-2010, 05:54 PM
Post: #2
RE: [8.54]Error in Tibia
You should not be calling that function from the DLL_PROCESS_ATTACH. In general, you don't want to do much of anything in the attach function, except spawn off threads to actually do your work.

TibiaAPI, SharpOT
Visit this user's website Find all posts by this user
Quote this message in a reply
02-26-2010, 03:04 AM
Post: #3
RE: [8.54]Error in Tibia
It might be that you declared the dir function to take an enum as argument, try using an int or something like that.
Find all posts by this user
Quote this message in a reply
02-26-2010, 04:04 AM
Post: #4
RE: [8.54]Error in Tibia
(02-25-2010 11:40 AM)marek677 Wrote:  Piece of code:
Code:
public enum TurnDirections
        {
            S = 0x50f,
            E = 0x50e,
            W = 0x50d,
            N = 0x50c
        };
typedef void _Dir(TurnDirections);
static _Dir *Dir = (_Dir*)0x4CFE70;

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        Polacz(); //Connect
        MessageBox(NULL, "DLL Injected!", "Success!", MB_OK);
                Dir(N);

and the error i get (I Lauched tibia, logged in and Lauched the bot... and error)
[Image: errorpj.th.png]

Thenk you very mutch for help.
Marek677

try this:

Code:
enum TurnDirections
        {
            S = 0x50f,
            E = 0x50e,
            W = 0x50d,
            N = 0x50c
        };
typedef void (*_Dir)(DWORD type);
static _Dir Dir = (_Dir)0x4CFE70;

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        Polacz(); //Connect
        MessageBox(NULL, "DLL Injected!", "Success!", MB_OK);
                Dir(N);
Visit this user's website Find all posts by this user
Quote this message in a reply
02-26-2010, 05:41 AM
Post: #5
RE: [8.54]Error in Tibia
i tryed... but it doesnt works. Acctualy i have it now...
Code:
typedef void _FaceUp();
static _FaceUp *FaceUp = (_FaceUp*)0x00404BC0;

typedef void _FaceDown();
static _FaceDown *FaceDown = (_FaceDown*)0x00404F00;

Anti kick tool done Big Grin
Find all posts by this user
Quote this message in a reply
02-26-2010, 03:50 PM (This post was last modified: 02-26-2010 03:52 PM by volf ram. Edit Reason: N/A)
Post: #6
RE: [8.54]Error in Tibia
Just wondering, but your original error message indicated something had gone wrong with the stack. Also, when you used the parameterless version, you say it worked.

Are you sure you were using the correct calling convention? The function at 004CFE70h seems to use something like stdcall.
Find all posts by this user
Quote this message in a reply
02-26-2010, 04:23 PM (This post was last modified: 02-26-2010 04:27 PM by beziak. Edit Reason: )
Post: #7
RE: [8.54]Error in Tibia
(02-26-2010 03:50 PM)volf ram Wrote:  Just wondering, but your original error message indicated something had gone wrong with the stack. Also, when you used the parameterless version, you say it worked.

Are you sure you were using the correct calling convention? The function at 004CFE70h seems to use something like stdcall.


Your're right - its stdcall
You can recognize it by "RETN 4". Called function pops its own arguments from the stack.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 



Contact UsTProgrammingReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication