![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#26 |
|
Архивный участник
Join Date: Nov 2005
Posts: 504
|
the user struct in the l2server, as told to me by alien003, is stored in ECX for any User:: function, so then all you really need to do is hook the dword table address for userinfo, get all the info u need out of the user struct when the userinfo packet is sent, and store it in a struct... i found that the best way to store the info in the struct is by char id for easy lookup, though i didnt really look into it all that much, i also found it best to store the socket in the struct, aswell as charname and sid, so that for packets such as autoss you can look up in the table by socket, as thats the only thing u will have from the packet, though i dont know if there are any functions to get sid or charid or name from the socket in the l2server, so i dont really know, this was just easyest for what i did as i wasnt sure about any functions at the time...
|
|
|
|
|
#27 |
|
Архивный участник
Join Date: Jun 2005
Posts: 143
|
DS:[socket + 1394h] = User Struct
8) |
|
|
|
|
#28 |
|
Архивный участник
Join Date: Nov 2005
Posts: 504
|
wait a minute... so... the socket as in the one for the user? cos if so im gonna scream ^_^
|
|
|
|
|
#29 |
|
Архивный участник
Join Date: Apr 2006
Posts: 461
|
Is the location where I hook packets (50F8F4) inside this same User scope so that I can get the information? Will the pointer to the start of the packet + 1394h give me the user struct? Also, I don't even know where to begin knowing what is in the User struct. Is there any good way to know what part of it is what, how big each entry is, etc.?
|
|
|
|
|
#30 |
|
Архивный участник
Join Date: Nov 2005
Posts: 504
|
if im not mistaken what u have labled as the "start of the packet" is the socket, i dont know where u hooked the packets so i dunno, but i dont think its the same place i did mine xD
also, good way to find out what is where in user struct, debug userinfo packet |
|
|
|
|
#31 |
|
Архивный участник
Join Date: Apr 2006
Posts: 461
|
Alright, thanks for the reply. I have (some) reference on what is in the UserInfo packet, so I'll try that. Thanks.
|
|
|
|
|
#32 | ||
|
Архивный участник
Join Date: Jun 2005
Posts: 143
|
Quote:
dunno what arguments your hook function is using, I'm catching them using the function table, just like normal packets my functions prototypes are BOOL function(void* pSocket, const char* pData); DS:[pSocket + 1394h] = pUser DS:[DS:[pUser + 0f54h] + numberFromAI] = same parameter as in AI DS:[pUser + 0f60h] = CInventory and just correcting a thing testdude said Quote:
|
||
|
|
|
|
#33 |
|
Архивный участник
Join Date: Apr 2006
Posts: 42
|
Procedures with offsets
Вложения из исходного сообщения (сами файлы в копии отсутствуют): 1190_142.rar — 14909 байт |
|
|
|
|
#34 |
|
Архивный участник
Join Date: May 2006
Posts: 39
|
Great work mcabben7,
Good luck with project Elhaym Looks very promissing |
|
|
|
|
#35 |
|
Архивный участник
Join Date: Oct 2005
Posts: 73
|
I wish my C++ knowledge was better, I can only create small stupid programs.
But I was wondering if the function , when u double click on an item, it changes in another item is possible to add in this dll, or is that function AI, don't know much about it. |
|
|
|
|
#36 |
|
Архивный участник
Join Date: Apr 2006
Posts: 42
|
grillo, pm me in icq or msn
|
|
|
|
|
#37 |
|
Архивный участник
Join Date: Jan 2006
Posts: 69
|
nice project, if I can i try help too
|
|
|
|
|
#38 |
|
Архивный участник
Join Date: Jan 2006
Posts: 69
|
hmm maybe this is good but i dont think so
![]() Code:
//ally limit
const WORD AllyLimit = 0x83 F8 0C 72 38 90 90 90 90
const WORD AllyLimit_1 = 0x0C //0C Clans amount +1 exp.: 0C=12 +1 so in ally 13clans (1slot for owner)
//allyLimit
DWORD * NewAllyLimitAddr = (DWORD *)0x00512877;
*NewAllyLimitAddr = (DWORD)AllyLimit;
DWORD * NewAllyLimit_1Addr = (DWORD *)0x00512879;
*NewAllyLimit_1Addr = (DWORD)AllyLimit_1;
|
|
|
|
|
#39 | |
|
Архивный участник
Join Date: Jun 2005
Posts: 143
|
Quote:
https://postpacific.mmorpg-game.onli...ic.php?p=43314 (its updated btw) |
|
|
|
|
|
#40 |
|
Архивный участник
Join Date: Jan 2006
Posts: 69
|
CLan ppl limits
Code:
//clan limits
const WORD CLan_0 = 0x0A
const WORD CLan_1 = 0x0F
const WORD CLan_2 = 0x14
const WORD CLan_3 = 0x19
const WORD CLan_4 = 0x1E
const WORD CLan_5 = 0x28
//clan limits
DWORD * NewCLan_0Addr = (DWORD *)0x0051038C;
*NewCLan_0Addr = (DWORD)CLan_0;
DWORD * NewCLan_1Addr = (DWORD *)0x005103D6;
*NewCLan_1Addr = (DWORD)CLan_1;
DWORD * NewCLan_2Addr = (DWORD *)0x005103E0;
*NewCLan_2Addr = (DWORD)CLan_2;
DWORD * NewCLan_3Addr = (DWORD *)0x005103EA;
*NewCLan_3Addr = (DWORD)CLan_3;
DWORD * NewCLan_4Addr = (DWORD *)0x005103F4;
*NewCLan_4Addr = (DWORD)CLan_4;
DWORD * NewCLan_5Addr = (DWORD *)0x005103FE;
*NewCLan_5Addr = (DWORD)CLan_5;
|
|
|
|
|
#41 |
|
Архивный участник
Join Date: Jan 2006
Posts: 69
|
tomorrow ill work on clan penaltys
|
|
|
|
|
#42 |
|
Архивный участник
Join Date: Apr 2005
Posts: 354
|
Turns out I cant compile the dll cuz i'm missing windows.h ._.
Free version of VS2K5 ftl
|
|
|
|
|
#43 |
|
Архивный участник
Join Date: Feb 2006
Posts: 8
|
get the plattform sdk here :
http://www.microsoft.com/msdownload/...sdk/sdkupdate/ |
|
|
|
|
#44 | |
|
Архивный участник
Join Date: Apr 2005
Posts: 354
|
Quote:
![]() Ok so i'm totally noob at this but i'm trying to learn...how would I use the code above in the DLL? |
|
|
|
|
|
#45 | |
|
Архивный участник
Join Date: Jun 2006
Posts: 7
|
I fully support your right to make money off of your hard work, as it's certainly a worthy endeavor you're partaking in, and if it comes to fruit, will be a great boon on the community.
However... Quote:
Yet right under that, you say people aren't allowed to sell it, or use it at all in anything that involves them making money, including using it on servers where the operator makes a profit. You can't release something under a license, and then say "disregard part so and so". It leaves you no legal options if someone is violating the terms you mean to set, but are allowed in the actual license you released it under. So, if you're against people using this for money, you might want to choose a different license to release it under
|
|
|
|
|
|
#46 |
|
Архивный участник
Join Date: May 2006
Posts: 39
|
yeah I'm sure the people running a ilegal l2 off server will back off the MIT license ~_~
|
|
|
|
|
#47 |
|
Архивный участник
Join Date: May 2006
Posts: 3
|
I'll look into this, And see what i can contribute, I also pmed you macraben
|
|
|
|
|
#48 |
|
Архивный участник
Join Date: Apr 2006
Posts: 461
|
Meh, I'll rewrite my own License file then :P The code you have now is only a skeleton frame. That much of the code is just fine, M.I.T. license or not :P
BTW, Packet Dump of an AutoSS packet: Packet Dump: d0 05 00 ba 05 00 00 01 00 00 00
|
|
|
|
|
#49 |
|
Архивный участник
Join Date: Apr 2005
Posts: 354
|
Would someone mind posting the steps one would take to complete a basic fix...like getting the packet info and so on.
Trying to learn so what i'm gonna work on is changing the systemmessage when you heal/someone heals you. "BlahblahHP has been restored by blahblah" |
|
|
|
|
#50 |
|
Архивный участник
Join Date: Apr 2006
Posts: 461
|
The code I posted already gets the packet headers for you. If you want to get a specific part of the packet, set header (I renamed it to pBuffer now) to + x bytes, depending where the data you want is. Then read a DWORD (4 bytes) worth of data and store it for your use.
Here is a packet dump function which I will share: Code:
// Allows for the complete dump of a packet to the log file
//
// Parameters:
// DWORD * packet - the address of the start of the packet (pBuffer)
// DWORD bytes - how many bytes to dump to the log file
//
void DumpPacket(DWORD * packet, DWORD bytes)
{
WORD temp = 0;
DWORD * packetAddr = 0;
packetAddr = packet;
file << ">>>>>>>>> Packet Dump: ";
for(unsigned int i=0; i < bytes; ++i)
{
temp = (BYTE)*(packetAddr);
if(temp<16) {
file << "0" << temp << " ";
} else {
file << temp << " ";
}
__asm { add packetAddr, 1 }
}
file << "\n";
file.flush();
}
Also, here is how you access the SystemMessage functionality in L2Server. See L2J for an idea of all the possible combinations and values. It is a pretty robust packet format. Code:
//SystemMessage
format = "cdddd";
__asm
{
push itemID //itemID
push 3 //??
push 1 //??
push msgID //system message ID
push 0x7A //packet header
push format //packet format 'cdddd'
push pSocket //pushes the address of the start of the packet
call fCUserSocketSend
add esp, 0x1C //fix our stack pointer (7 * 0x04 = 0x1C)
}
Enishi: I am not sure exactly which packet handles healing. It might be an internal call to send a SystemMessage packet that will need to be hooked and changed to show the HP healed. I'm not sure on this yet. if it is a specific packet for healing, then hook it, call your own function, and write the code to handle it. |
|
|
|
|