Topic: ExtraWork-How to use it?
Does anyone know how to use this module? Thank you for sharing!
PvPGN Community Forums |
forums.pvpgn.pro → [EN] Diablo → ExtraWork-How to use it?
Does anyone know how to use this module? Thank you for sharing!
Research thread
https://github.com/pvpgn/pvpgn-server/issues/72
Добавлено: 11.03.2019 12:12
Brief example which I wrote long ago on Russian, there is also ready example is attached
https://forums.pvpgn.pro/viewtopic.php?pid=6662#p6662
Translation is below.
How to repeat:
1. Download ExtraWork DLL template https://github.com/xboi209/ExtraWork
2. Modify function ExtraWork with appropriate to your requirements. For example show a message box:
BOOL __fastcall ExtraWork(EXTRAWORK *inStruct, int unused)
{
// show messagebox
int msgboxID = MessageBox(NULL, game.classname, "Greetings from the server!", MB_ICONWARNING | MB_CANCELTRYCONTINUE | MB_DEFBUTTON2);
...
3. Download MPQSigner and run MPQSigner.cmd, which will pack IX86ExtraWork.dll into IX86ExtraWork.mpq and sign it with a weak signature https://github.com/xboi209/MPQSigner/
4. Put IX86ExtraWork.mpq into a directory files (in PvPGN)
5. Build PvPGN from the latest source code https://github.com/HarpyWar/pvpgn
6. Uncomment code in lua\handle_user.lua which sends MPQ file to a user and executes the above function on a user side when he joined on a server:
if account.archtag == ARCHTAG_WINX86 then
api.client_requiredwork(account.name, "IX86ExtraWork.mpq")
end
7. Start pvpgn server and log in from game client. A message box should be shown for you and log message should appear in pvpgn:
pvpgn::bnetd::_client_extrawork: [700] Received EXTRAWORK packet with GameType: 2 and Length: 29 (IX86ExtraWork v1.0 by xboi209)
Thank you for sharing ~very detailed!
forums.pvpgn.pro → [EN] Diablo → ExtraWork-How to use it?