Quote:
Originally Posted by _fobos_
But it looks like theres another check, because i cant directly change it :p
but maybe when its called it will work as i thought just play with in in C++ ;).
Also make sure to also check if theres enough slots free its the function above it it will compare EBX with EAX and will jump past the " not enough w.h space" if 14 (hex) is larger then free w.h slots.
I quarantee if ur not gonna do that one aswell that your game will crash if u try to deposit when ur w.h is full ;)
|
Code:
00490742 E8 746D0400 CALL Conquer.004D74BB
00490747 3BC3 CMP EAX,EBX
00490749 7C 1D JL SHORT Conquer.00490768
yea, i see that now. Thanks for the heads up.
Edit: Alright, can't get olly to break at that point atm, time to try it in C++.
Edit: Ok, had a few attempts.
The telnet
Code:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet> send item2wh 0
Sent string item2wh 0
Microsoft Telnet> send item2wh 1
Sent string item2wh 1
Microsoft Telnet> send item2wh 2
Sent string item2wh 2
Microsoft Telnet> send item2wh 3
Sent string item2wh 3
Microsoft Telnet> send exit
Sent string exit
Microsoft Telnet>
Connection to host lost.
The function
PHP Code:
static int ConquerItemToWh_slot;
void ConquerItemToWh(int slot)
{
cout << "ConquerItemToWh(" << slot << ")" << endl;
ConquerItemToWh_slot = slot;
/*
00490768 FFB6 40F30A00 PUSH DWORD PTR DS:[ESI+AF340]
0049076E 8BCF MOV ECX,EDI ; Conquer.005DABB8
00490770 E8 D6270400 CALL Conquer.004D2F4B
*/
asm("pushl 0x689EF8;\n"
"movl $0x5DABB8, %ecx;\n"
"movl $0x4D2F4B, %eax;\n"
"call *%eax;\n");
}
The log (CO2Claw.log)
Code:
Binding to port 12345
Listening for connections
Accepting connection
Recieved command: item2wh 0
ConquerItemToWh(0)
Recieved command: item2wh 1
ConquerItemToWh(1)
Recieved command: item2wh 2
ConquerItemToWh(2)
Recieved command: item2wh 3
ConquerItemToWh(3)
Recieved command: exit
Shutting down.
Unfortunately the items did not move from my inventory to my wh, are u sure about this function??
this one here "pushl 0x689EF8;\n" means "push [0x689EF8]", and i assumed ESI would take the same value as EDI of 0x005DABB8. So i went 0x5DABB8 + 0xAF340 = 0x689EF8.
Maybe its the correct function but TQ have a protection on it.
Edit: Wait a sec, nvm that. I'm so silly. I'm ment to push my slot number instead of the address TQ uses. 1 sec lol :p
Edit:
Fixed but not yet working nor breaking in that location for me in olly
PHP Code:
static int ConquerItemToWh_slot;
void ConquerItemToWh(int slot)
{
cout << "ConquerItemToWh(" << slot << ")" << endl;
ConquerItemToWh_slot = slot;
/*
00490768 FFB6 40F30A00 PUSH DWORD PTR DS:[ESI+AF340]
0049076E 8BCF MOV ECX,EDI ; Conquer.005DABB8
00490770 E8 D6270400 CALL Conquer.004D2F4B
*/
asm("pushl _ConquerItemToWh_slot;\n"
"movl $0x5DABB8, %ecx;\n"
"movl $0x0490450, %eax;\n"
"call *%eax;\n");
}
sorry to bug like this :p
Edit: This is really interesting, the breakpoint only triggers sometimes when i put an item in. Are we sure this isn't a function for something else??
Edit: WAIT! I know whats happening now, the code is only triggering the breakpoint if u drop an item onto on another item in the wh. It is not dropping when u drop an item in a free spot inside the wh. I think its a item sorting function or something, not a item insert into wh from inventory function.