Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Items.dll Source Codes + Offset Main 1.03k (JPN)

Joined
Oct 29, 2007
Messages
1,288
Reaction score
1,308
Well, as lately I was learning a new thing or two, I want to leave the full source code of my model of a DLL to extend the limit of items (Weapons / Sets) and also the limit of textures (Weapons / Sets) + offsets for the main Japanese version 1.03k (Season 4.6)

Items.cpp file:

Code:
[COLOR="RoyalBlue"]#include "StdAfx.h"
#include "Items.h"
#include "Utils.h"

extern "C" _declspec(dllexport) void Items()
{
    DWORD OldProtect;
    if(VirtualProtect(LPVOID(0x401000),4310016,PAGE_EXECUTE_READWRITE,&OldProtect))
{	
	//Items
	//Main.exe support to: C8 = 200
	//Main Offsets version: 1.03k (JPN)

  	*(BYTE*)(0x005D6C8C+3)  = 0xC8; //Helms
  	*(BYTE*)(0x005D6CD6+3)  = 0xC8; //Armor, Pants, Glowes, Boots  
  	*(BYTE*)(0x005D81DD+3)  = 0xC8; //Swords
  	*(BYTE*)(0x005D82B0+3)  = 0xC8; //Axes
  	*(BYTE*)(0x005D82ED+3)  = 0xC8; //Maces
 	*(BYTE*)(0x005D8343+3)  = 0xC8; //Scepters
  	*(BYTE*)(0x005D8399+3)  = 0xC8; //Spears
  	*(BYTE*)(0x005D83EF+3)  = 0xC8; //Shields
  	*(BYTE*)(0x005D845E+3)  = 0xC8; //Staffs
  	*(BYTE*)(0x005D84E6+3)  = 0xC8; //Sticks
  	*(BYTE*)(0x005D8523+3)  = 0xC8; //Bows
  	*(BYTE*)(0x005D8560+3)  = 0xC8; //Crossbows

	//Textures
	//Main.exe support to: C8 = 200
	//Main Offsets version: 1.03k (JPN)

  	*(BYTE*)(0x005D80BE+3)  = 0xC8; //Helms
  	*(BYTE*)(0x005D8109+3)  = 0xC8; //Armor, Pants, Glowes, Boots
  	*(BYTE*)(0x005DA753+3)  = 0xC8; //Swords
  	*(BYTE*)(0x005DA8F1+3)  = 0xC8; //Axes
  	*(BYTE*)(0x005DA92E+3)  = 0xC8; //Maces
  	*(BYTE*)(0x005DA96B+3)  = 0xC8; //Scepters
  	*(BYTE*)(0x005DA9A7+3)  = 0xC8; //Spears
  	*(BYTE*)(0x005DAA02+3)  = 0xC8; //Shields
  	*(BYTE*)(0x005DAA3F+3)  = 0xC8; //Staffs
  	*(BYTE*)(0x005DAB6B+3)  = 0xC8; //Sticks
  	*(BYTE*)(0x005DACD4+3)  = 0xC8; //Bows
  	*(BYTE*)(0x005DAD11+3)  = 0xC8; //Crossbows
}
}[/COLOR]

Items.h file:

Code:
[COLOR="RoyalBlue"]#ifdef _DLL_H_
#define _DLL_H_
#include <stdio.h>
#include <windows.h>
//extern "C" __declspec(dllexport) void Items();
#endif[/COLOR]

NOTE: The others are the files in Winrar to herein below.



Items.dll Compiled from shows & 100% functional



Credits: RMST, chris05 & Nemesis(Me).
 
Last edited:
IGCN Co-Founder
Joined
Jun 26, 2006
Messages
303
Reaction score
487
PS: I did this, because for example in the case of the main.exe 1.03k Japanese version.. when he wants to make the arrangement to extend the limit load of items / textures (with OllyDbg) breaks to put a value like: 7F = 127 (the maximum that supports any main.exe when it is changing with olly) but through the DLL can be placed without any kind of problem C8 = 200, and the main.exe not break or make Crash while loading...


it crash because signed char is from -127 - 127, if u overpass it it will start count from -127 again and u cant have negative items , thats why main crash. to fix it you must change the data type in main.exe to unsigned char not signed. good luck
 
Joined
Oct 29, 2007
Messages
1,288
Reaction score
1,308
In Assembly Lenguaje:

Signed char: 0 - 127

Unsigned char: 0 - 512 (This method used by zemmatana with ENCClient.dll)

Thanks drakelv :)

ps: too must remove in main.exe with ollydbg some checks! ^^

eg:

Memory map of a Char

(9) How char data type is represented in the memory?
Ans:
char data type may be signed or unsigned .Both has different memory representation.Both are 8 bit data type.
unsigned char:
All 8 bit is used as data bit.
e.g memory representation of unsigned char a= 7;
Binary equivalent of 7 is 111
For 8 bit we will add 5 zero in the left side i.e 00000111
In the memory:



Here MSD is most significant digit and LSD is list significant digit.
signed char:
1 bit: signed bit
7 bit: data bit
Note: In C, negative number is stored in the 2’s complement format.
Signed bit is 0: Number is positive.
Signed bit is 1: Number is negative.

e.g memory representation of char a=7;
Binary equivalent of 7 is 111
For 8 bit we will add 5 zero in the left side i.e 00000111
Memory representation:



It's easy, but for DLL method is better for the main.exe charge
 
Last edited:
IGCN Co-Founder
Joined
Jun 26, 2006
Messages
303
Reaction score
487
unsigned char is max 255 not 512 lol.. 1 byte max value = 0xFF (max value for 8 bits and 1 byte = 8 bits), for 512 it iwll be 0x200 10 bits. so first learn basics before trying to write things u dont understand
 
Last edited:
Kingdom of Shadows
Loyal Member
Joined
Jul 13, 2007
Messages
923
Reaction score
320
Better read some documentation before you post something, some new coders may read your post and they got a wrong information.
Here is a documentation of all data types available in windows systems for c++ .

Also 8 bits can hold a maximum values of 11111111 which equals in hex 0xFF and in decimal 255.
512 will require 2 bytes to be represented.
(if you put 512 value in 8 bits you get crash)
 
Junior Spellweaver
Joined
Jan 19, 2008
Messages
127
Reaction score
110
I free 512 items rewriting items load function doing all respective calls for all new item...

In other words, I create a new loop to load new items, not just up the original loops limit.


====

signed char = -127 - 127
unsigned char = 0 - 256

signed word = -32767 - 32767
unsigned word = 0 - 65535

signed dword = -2147483647 - 2147483647
unsigned dword = 0 - 4294967295


====

To create new wings, you have to create new CharSet, compatible with GameServer, not just free the slot for it.
The new CharSet is for dont have any visual bug, the same for new pets.
 
Last edited:
Junior Spellweaver
Joined
Oct 21, 2008
Messages
188
Reaction score
17
I free 512 items rewriting items load function doing all respective calls for all new item...

In other words, I create a new loop to load new items, not just up the original loops limit.


====

signed char = -127 - 127
unsigned char = 0 - 256

signed word = -32767 - 32767
unsigned word = 0 - 65535

signed dword = -2147483647 - 2147483647
unsigned dword = 0 - 4294967295


====

To create new wings, you have to create new CharSet, compatible with GameServer, not just free the slot for it.
The new CharSet is for dont have any visual bug, the same for new pets.
you can share the code for gs 90 to fix new wings and pets ? :rolleyes:
 
Experienced Elementalist
Joined
Apr 8, 2008
Messages
218
Reaction score
141
Interesting, if you can call with me to make tests to added new pets and wings i have, one think can be usefully its make a optional player.bmd to load in game. cause something animations of the player in pets can be altered here, if its posible choose from 2 player.bmd files its posible choose not only the pet type, its posible also choose the pj size, and this give more options to the game.
 
Apprentice
Joined
Dec 14, 2007
Messages
839
Reaction score
430
mauro, can u upload MSVCR90D.dll version="9.0.21022.8"? i need this ...
 
Back
Top