-
1 Attachment(s)
New Jewels for 1.03k Main (1.03.11)
New Jewels System for 1.03k Main (1.03.11) and 1.00.90 GameServer with exclusive features. Please respect the credits.
Client Side
- Loader for the jewels models (BMD/OZJ)
- Prices configuration (zen)
- Golden and bold text (inventary/floor) *Exclusive*
- Text description loaded from Text.bmd
- Drop control (on/off)
- Usage enabled for Pendants & Rings *Exclusive*
Screenshots:
http://i.imgur.com/yrOvU.jpg http://i.imgur.com/Mk2ao.jpg
Server Side
- Full control of applicable itens *Exclusive*
- Custom success rate percent
- Custom player messages
- GameServer logging (no console shits) *Exclusive*
- Conditional statements and item names from Item Attribute struct *Exclusive*
I will work in more improvements for this source (like jewel sound on drop), so please leave this topic open.
Credits:
Young (Entire Jewel System + Offsets research)
Gembrid (Custom Models Load + BMD models)
-=DarkSim=- (Provide the usage method of new jewels)
Ps.: I dunno if Gembrid really made this model loader plus models, so if someone knows who is the correct author, please let me know to can I fix this post.
-
Re: New Jewels for 1.03k Main (1.03.11)
Good job.
works on 1.02 versions?
-
Re: New Jewels for 1.03k Main (1.03.11)
Nice job man, i will test on new mains and i'll report, thanks for the release ..., i hope leechers respect credits and don't go to others forums (like latin forums) and say "CREDITS: N...")
-
Re: New Jewels for 1.03k Main (1.03.11)
very good, can you make guide " new Wings for main"
I can fix new Wings on the GS but I can not add new Wings for main (^_^)..
thank you
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
[GM]Terrorian
Good job.
works on 1.02 versions?
Thank you man ! If supports 512 itens, yes. Just research the offsets and fix some stacks (if needed) in the source. If you found and make work, please share with us ! :wink:
Quote:
Originally Posted by
[KeysS]
Nice job man, i will test on new mains and i'll report, thanks for the release ..., i hope leechers respect credits and don't go to others forums (like latin forums) and say "CREDITS: N...")
Thank you man ! Nah, I know that will happen. Unfortunately we can't do nothing about it, but me and you guys know who made this, so it's enough for me ! :love:
Quote:
Originally Posted by
Van_Bom
very good, can you make guide " new Wings for main"
I can fix new Wings on the GS but I can not add new Wings for main (^_^)..
thank you
Thank you man ! I dunno how this can be done YET, but I think that is same as New Jewels. Load the BMD/OZJ models, then hook some functions (research needed)...
Guys, I'm currently working in the New Jewel Server Side (1.00.90 GS), so I want to know what does Jewel of Divinity and Jewel of Assembly ? Soon I will release the Server Side source to fully working New Jewels ! :thumbup1:
-
Re: New Jewels for 1.03k Main (1.03.11)
Young
Its add to your description func:
Quote:
mov dword ptr ds:[eax*0x4+0x7BE239C], ebx;
mov dword ptr ds:[eax*0x4+0x7C114A0], ebx;
one ebx - text color
two ebx - text weight (bold or normal)
Weight table:
// 0x01 = Bold
// 0x00 = Normal
Color table:
// 0x00 = White
// 0x01 = Blue
// 0x02 = Red
// 0x03 = Yellow
// 0x04 = Green
// 0x05 = White on red
// 0x06 = Gray
// 0x07 = White on blue
// 0x08 = White on yellow
// 0x09 = Green on blue
// 0x0A = Gray (2)
// 0x0B = Dark Gray
Example:
Quote:
mov dword ptr ds:[eax*0x4+0x7BE239C], 0x08;
mov dword ptr ds:[eax*0x4+0x7C114A0], 0x1;
White on yellow with bold weight text)
P.S.: Good functions, thanks and good luck)
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
-=DarkSim=-
Young
Its add to your description func:
one ebx - text color
two ebx - text weight (bold or normal)
Weight table:
// 0x01 = Bold
// 0x00 = Normal
Color table:
// 0x00 = White
// 0x01 = Blue
// 0x02 = Red
// 0x03 = Yellow
// 0x04 = Green
// 0x05 = White on red
// 0x06 = Gray
// 0x07 = White on blue
// 0x08 = White on yellow
// 0x09 = Green on blue
// 0x0A = Gray (2)
// 0x0B = Dark Gray
Example:
White on yellow with bold weight text)
P.S.: Good functions, thanks and good luck)
Thanks dude. Very nice and usefull information. This give more custom options to New Jewels. Just register another variable (DWORD Fn3Var3), set it in each item case then mov it to stack in asm code... :thumbup1:
Ps.: Anybody know what Jewel of Assembly and Jewel of Divinity is used for ?
-
Re: New Jewels for 1.03k Main (1.03.11)
Those two jewels can be used for what ever you like :) take example from arieth mu jewels.
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
duracel
Those two jewels can be used for what ever you like :) take example from arieth mu jewels.
What used for in Arieth MU ? I need know to finish the server side source. Thanks.
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Ps.: Anybody know what Jewel of Assembly and Jewel of Divinity is used for?
Its customs jewels names from rmst, where custom jewel system)
Make like this for example:
Jewel Of Skill - Add Skill
Jewel Of Luck - Add Luck
Jewel Of Excellent - Make excellent from normal with random options & with max options control
Jewel Of Assembly - Add options in pendants & rings
Jewel Of Divinity - Upgrade items from 9 to 13
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
-=DarkSim=-
Its customs jewels names from rmst, where custom jewel system)
Make like this for example:
Jewel Of Skill - Add Skill
Jewel Of Luck - Add Luck
Jewel Of Excellent - Make excellent from normal with random options & with max options control
Jewel Of Assembly - Add options in pendants & rings
Jewel Of Divinity - Upgrade items from 9 to 13
Thank you very much dude ! Consider it done.
Jewel Of Skill - 100% Done
Jewel Of Luck - 100% Done
Jewel Of Excellent - 20% Done
Jewel Of Assembly - 0% Done
Jewel Of Divinity - 0% Done
When finish (maybe tomorrow) I will post the full source code... :thumbup1:
-
Re: New Jewels for 1.03k Main (1.03.11)
Hm, i'm using color table for make more colors on items name)
Quote:
void __declspec(naked) ItemTextColor()
{
_asm
{
cmp ax, 0x180F;
je Gold;
cmp ax, ITEM(14,101);
je Gold;
cmp ax, ITEM(14,102);
je Gold;
cmp ax, ITEM(14,103);
je Gold;
cmp ax, ITEM(14,104);
je Gold;
cmp ax, ITEM(14,105);
je Gold;
cmp ax, ITEM(14,106);
je Divine;
cmp ax, ITEM(14,107);
je Divine;
cmp ax, ITEM(14,108);
je Divine;
cmp ax, ITEM(14,109);
je Divine;
cmp ax, ITEM(14,110);
je Divine;
mov edx, 0x0061534F;
jmp edx;
//------------------------------------------------------------------------
// Colors
//------------------------------------------------------------------------
Blue:
MOV DWORD PTR SS:[ESP+0x1C],0x1
je Exit;
Red:
MOV DWORD PTR SS:[ESP+0x1C],0x2
je Exit;
Gold:
MOV DWORD PTR SS:[ESP+0x1C],0x3
je Exit;
Excellent:
MOV DWORD PTR SS:[ESP+0x1C],0x4
je Exit;
Warning:
MOV DWORD PTR SS:[ESP+0x1C],0x5
je Exit;
Divine:
MOV DWORD PTR SS:[ESP+0x1C],0x6
je Exit;
WhiteBlue:
MOV DWORD PTR SS:[ESP+0x1C],0x7
je Exit;
WhiteYellow:
MOV DWORD PTR SS:[ESP+0x1C],0x8
je Exit;
Ancient:
MOV DWORD PTR SS:[ESP+0x1C],0x9
je Exit;
Exit:
mov edx, 0x00615446;
jmp edx;
}
}
It's my function for example, 1.02.11 JPN main (S3)
P.S.: In 1.03K you can just make jmp for other mov edi, like:
0059061B - Gold
00590614 - Divine
0059060D - Ancient
and etc)
-
Re: New Jewels for 1.03k Main (1.03.11)
good job!
normal work here .. part of the bmd but not working ..
void CustomBmdInit ()
{
SetNop (0x005D93F3, 25);
WriteJmp (0x005D93F3, (DWORD) & PatchNewModel);
}
void WriteJmp( DWORD from, DWORD to ) {
DWORD flOldProtect;
#define JMP( frm, to ) ( ( ( int )to - ( int )frm ) - 5 )
VirtualProtect( ( LPVOID )from, 5, PAGE_EXECUTE_READWRITE,&flOldProtect );
*( BYTE* )from = 0xE9;
*( DWORD* )( from + 1 ) = JMP( from, to );
VirtualProtect( ( LPVOID )from, 5, flOldProtect, &flOldProtect );
}
giving error in the main ...
-
Re: New Jewels for 1.03k Main (1.03.11)
SmallHabit source for New Jewels re-write for: 1.03Z+ (Eng) for me:
Jewels.cpp
Code:
#include "Stdafx.h"
char* Custom = "Data\\Custom\\Items\\";
char* CustomFolder = "Custom\\Items\\";
//============================================================================
// Custom Jewels Description Text
//============================================================================
char * JewelofSkill = "It is used to add to your item a skill";
char * JewelofExcellent = "It is used to make your item to excellent item";
char * JewelofLevel = "It is used to make your item level directly to up to +15";
char * JewelofLuck = "It is used to make your item to luck item";
char * JewelofOption = "It is used to make your item option directly to up to +28";
char * JewelofAncient = "It is used to make your item to ancient item";
char * JewelofSocket = "It is used to add to your item to five socket slots";
//============================================================================
// Custom Conditional Text of Jewels
//============================================================================
char * SkillCond = "Only can be used for items that may have an skill";
char * SocketCond = "Only can be used for items that may be socket";
char * AncientCond = "Only can be used for items that may be ancient";
//============================================================================
// Restore Normal Items with Golden Color Name
//============================================================================
char * JewelofSoul = "It is used to make your item level to up to 7,8,9";
char * JewelofLife = "Increase item option by 1 level";
char * JewelofCreation = "Use to create fruits that increase stats";
char * SymbolofKundun = "Must have 5 for create lost map.";
char * JewelofGuardian = "Create and improve items for siege";
char * Gemstone = "Jewel with impurities";
char * JewelofHarmony = "Jewel for item reinforcement";
char * LowerRefiningStone = "Grant actual power to reinforced item.";
char * HigherRefiningStone = "Grant actual power to reinforced item.";
char * JewelofChaos = "It is used to combine Chaos items";
char * RemedyofLove = "Increase damage and attack speed";
char * RenaA = "Can use for exchange for items";
char * RenaB = "Golden Archer Special Item";
char * PetUnicornA = "Increase Attack Speed";
char * PetUnicornB = "Increase Critical Damage";
char * PetUnicornC = "Increase Excellent Damage";
//============================================================================
BOOL APIENTRY DllMain(HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
Init();
break;
}
return TRUE;
}
void SetNop(DWORD dwOffset,int Size)
{
for(int n=0;n<Size;n++)
*(BYTE*)(dwOffset+n) = 0x90;
}
void HookThis(DWORD dwMyFuncOffset,DWORD dwJmpOffset)
{
*(DWORD*)(dwJmpOffset+1) = dwMyFuncOffset-(dwJmpOffset+5);
}
void LoadThisFuckingModelByITEMID(int ItemID,char* ModelName,char* FolderFrom,char* WayFrom)
{
_asm
{
PUSH -1
PUSH ModelName
PUSH WayFrom
PUSH ItemID
mov eax,BMDModelLoad
CALL eax
PUSH 1
PUSH 0x2600
PUSH 0x2901
PUSH FolderFrom
PUSH ItemID
mov eax,OpenTexture
CALL eax
}
}
__declspec(naked) void PatchMainForLoadModels()
{
LoadThisFuckingModelByITEMID(ITEM_IN_MAIN(14,200),"JewelOfLevel",CustomFolder,Custom);
LoadThisFuckingModelByITEMID(ITEM_IN_MAIN(14,201),"JewelOfLuck",CustomFolder,Custom);
LoadThisFuckingModelByITEMID(ITEM_IN_MAIN(14,202),"JewelOfSkill",CustomFolder,Custom);
LoadThisFuckingModelByITEMID(ITEM_IN_MAIN(14,203),"JewelOfOption",CustomFolder,Custom);
LoadThisFuckingModelByITEMID(ITEM_IN_MAIN(14,204),"JewelOfAncient",CustomFolder,Custom);
LoadThisFuckingModelByITEMID(ITEM_IN_MAIN(14,205),"JewelOfExcellent",CustomFolder,Custom);
LoadThisFuckingModelByITEMID(ITEM_IN_MAIN(14,206),"JewelOfSocket",CustomFolder,Custom);
_asm
{
//1.03Z+
PUSH -1
PUSH 0x009AD444
PUSH 0x009AD44C
PUSH 0x20B2
mov eax,BMDModelLoad
CALL eax
ADD ESP,0x10
mov eax,ReturnOffset
JMP eax
}
}
// Item SID ( (Section * 512) + ID = SID )
// Rena = 1C15
#define COLOR_ADR_ALLOW 0x005D5AED //1.03Z+
#define COLOR_ADR_RETURN 0x005D5966 //1.03Z+
void __declspec(naked) JewelsColor()
{
_asm
{
//Original Soul
cmp ax, 0x1C0E;
je AddColor;
//Jewel of Level
cmp ax, 0x1CC8;
je AddColor;
//Jewel of Luck
cmp ax, 0x1CC9;
je AddColor;
//Jewel of Skill
cmp ax, 0x1CCA;
je AddColor;
//Jewel of Option
cmp ax, 0x1CCB;
je AddColor;
//Jewel of Ancient
cmp ax, 0x1CCC;
je AddColor;
//Jewel of Excellent
cmp ax, 0x1CCD;
je AddColor;
//Jewel of Socket
cmp ax, 0x1CCE;
je AddColor;
mov edx, COLOR_ADR_RETURN
jmp edx;
AddColor:
mov edx, COLOR_ADR_ALLOW
jmp edx;
}
}
__declspec(naked) void JewelInfoText()//finished
{
// Color de la tabla:
//------------------------------------------------------------------------
// 0x00 = blanco
// 0x01 = azul
// 0x02 = rojo
// 0x03 = amarillo
// 0x04 = verde
// 0x05 = fondo azul, rojo
// 0x06 = magenta
// 0x07 = fondo blanco, azul
// 0x08 = fondo blanco, beige
// 0x09 = fondo verde, azul
// 0x0A = gris
// 0x0B = púrpura (oscuro)
_asm
{
//Restoring original item
CMP WORD PTR DS:[EDI],0x1C0E
JNZ Item1 //Next Item
PUSH 0x23E //Text Line
MOV ECX, 0x07C24858 //1.03Z+
mov esi, 0x00402470 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[EAX+4] //1.03Z+
CMP EAX,EBP
JNZ 0x005DB96A
MOV EAX, 0x0096A7B8
PUSH EAX
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],EBP //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item1:
CMP WORD PTR SS:[EDI],0x1CC8 //Item Number
JNZ Item2 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofLevel
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item2:
CMP WORD PTR SS:[EDI],0x1CC9 //Item Number
JNZ Item3 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofLuck
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item3:
CMP WORD PTR SS:[EDI],0x1CCA //Item Number
JNZ Item4 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofSkill
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH SkillCond
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x0A //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item4:
CMP WORD PTR SS:[EDI],0x1CCB //Item Number
JNZ Item5 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofOption
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item5:
CMP WORD PTR SS:[EDI],0x1CCC //Item Number
JNZ Item6 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofAncient
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH AncientCond
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x0A //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item6:
CMP WORD PTR SS:[EDI],0x1CCD //Item Number
JNZ Item7 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofExcellent
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item7:
CMP WORD PTR SS:[EDI],0x1CCE //Item Number
JNZ Item8 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofSocket
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH SocketCond
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x0A //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item8:
CMP WORD PTR SS:[EDI],0x1C10 //Item Number
JNZ Item9 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofLife
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item9:
CMP WORD PTR SS:[EDI],0x1C16 //Item Number
JNZ Item10 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofCreation
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item10:
CMP WORD PTR SS:[EDI],0x1C1F //Item Number
JNZ Item11 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofGuardian
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item11:
CMP WORD PTR SS:[EDI],0x1C29 //Item Number
JNZ Item12 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH Gemstone
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item12:
CMP WORD PTR SS:[EDI],0x1C2A //Item Number
JNZ Item13 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofHarmony
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item13:
CMP WORD PTR SS:[EDI],0x1C2B //Item Number
JNZ Item14 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH LowerRefiningStone
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item14:
CMP WORD PTR SS:[EDI],0x1C2C //Item Number
JNZ Item15 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH HigherRefiningStone
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item15:
CMP WORD PTR SS:[EDI],0x1C1D //Item Number
JNZ Item16 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH SymbolofKundun
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x07 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item16:
CMP WORD PTR SS:[EDI],0x1C14 //Item Number
JNZ Item17 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH RemedyofLove
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x06 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item17:
CMP WORD PTR SS:[EDI],0x1C15 //Item Number
JNZ Item18 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH RenaA
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x0B //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH RenaB
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x02 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item18:
CMP WORD PTR SS:[EDI],0x180F //Item Number
JNZ Item19 //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH JewelofChaos
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x00 //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Item19:
CMP WORD PTR SS:[EDI],0x1A6A //Item Number
JNZ Return //Jnz to Next Item or Return
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH PetUnicornA
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x0B //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH PetUnicornB
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x0B //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
LEA EAX,DWORD PTR DS:[EAX+EAX*4]
PUSH PetUnicornC
LEA EDX,DWORD PTR DS:[EAX+EAX*4]
LEA EAX,DWORD PTR DS:[EDX*4+0x7D70050] //1.03Z+
PUSH EAX
mov esi, 0x0092CC18 //1.03Z+
call esi
MOV EAX,DWORD PTR DS:[0x7DA6EF4] //1.03Z+
ADD ESP,8
MOV DWORD PTR DS:[EAX*4+0x7D71248],0x0B //1.03Z+
MOV DWORD PTR DS:[EAX*4+0x7DA0C40],EBP //1.03Z+
INC EAX
MOV DWORD PTR DS:[0x7DA6EF4],EAX //1.03Z+
JMP Return
Return:
mov edi, 0x005DB99F //1.03Z+
jmp edi;
}
}
__declspec(naked) void JewelsSwitcher()
{
_asm
{
//Original
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1C0D
JE ItemAllowed
//Jewel of Level
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CC8
JE ItemAllowed
//Jewel of Luck
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CC9
JE ItemAllowed
//Jewel of Skill
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCA
JE ItemAllowed
//Jewel of Option
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCB
JE ItemAllowed
//Jewel of Ancient
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCC
JE ItemAllowed
//Jewel of Excellent
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCD
JE ItemAllowed
//Jewel of Socket
MOV EDX,DWORD PTR SS:[EBP-0x20]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCE
JE ItemAllowed
mov eax,0x007EE833 //1.03Z+
jmp eax
ItemAllowed:
mov eax,0x007EE897 //1.03Z+
jmp eax
}
}
__declspec(naked) void JewelMoveOnItem2()
{
_asm
{
//Original
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1C0E
JNZ Next1
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next1
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next1
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next1:
//Jewel of Level
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CC8
JNZ Next2
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next2
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next2
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next2:
//Jewel of Luck
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CC9
JNZ Next3
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next3:
//Jewel of Skill
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCA
JNZ Next4
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next4:
//Jewel of Option
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCB
JNZ Next5
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next5:
//Jewel of Ancient
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCC
JNZ Next6
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next6:
//Jewel of Excellent
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCD
JNZ Next7
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next7:
//Jewel of Socket
MOV EDX,DWORD PTR SS:[EBP+0x08]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCE
JNZ Next
CMP DWORD PTR SS:[EBP-0x4],0x00
JL Next
CMP DWORD PTR SS:[EBP-0x4],0x08
JG Next
MOV AL,0x01
mov edi, 0x007AAA5C //1.03Z+
jmp edi
Next:
mov edi, 0x0079A4CC
jmp edi
}
}
__declspec(naked) void JewelMoveOnItem1()
{
_asm
{
//Original
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1C0E //Item
JNZ Next1
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
Next1:
//Jewel of Level
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CC8 //Item
JNZ Next2
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
mov esi, 0x007A9300 //1.03Z+
jmp esi
Next2:
//Jewel of Luck
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CC9 //Item
JNZ Next3
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
mov esi, 0x007A9300 //1.03Z+
jmp esi
Next3:
//Jewel of Skill
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCA //Item
JNZ Next4
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
mov esi, 0x007A9300 //1.03Z+
jmp esi
Next4:
//Jewel of Option
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCB //Item
JNZ Next5
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
mov esi, 0x007A9300 //1.03Z+
jmp esi
Next5:
//Jewel of Ancient
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCC //Item
JNZ Next6
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
mov esi, 0x007A9300 //1.03Z+
jmp esi
Next6:
//Jewel of Excellent
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCD //Item
JNZ Next7
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
mov esi, 0x007A9300 //1.03Z+
jmp esi
Next7:
//Jewel of Socket
MOV EDX,DWORD PTR SS:[EBP-0x78]
MOVSX EAX,WORD PTR DS:[EDX]
CMP EAX,0x1CCE //Item
JNZ Next
MOV ECX,DWORD PTR SS:[EBP-0x9C]
PUSH ECX
MOV EDX,DWORD PTR SS:[EBP-0x78]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0xB4]
mov edi, 0x007AA974
call edi
MOV BYTE PTR SS:[EBP-0xA0],AL
mov esi, 0x007A9300 //1.03Z+
jmp esi
Next:
mov esi, 0x007A9230 //1.03Z+
jmp esi
}
}
void HookOffset(DWORD my, DWORD tohook, BYTE type)
{
*(BYTE*)tohook = type;
*(DWORD*)(tohook+1) = my - (tohook+5);
}
void Init()
{
//Hook JewelColor
BYTE JewelsColors[] = { 0xFF, 0x25, 0xE0, 0x9F, 0x96, 0x00, 0x90, 0x90, 0x90, 0x90 };
memcpy((int*)0x005D595C,JewelsColors,sizeof(JewelsColors)); //1.03Z+
*(unsigned int*)0x00969FE0 = (unsigned int)JewelsColor; //1.03Z+ (Offset y en BYTE)
//Hook JewelText
BYTE JewelText[] = { 0xFF, 0x25, 0x20, 0x9F, 0x96, 0x00, 0x90, 0x90, 0x90, 0x90 };
SetNop(0x005DB953,62); //1.03Z+
memcpy((int*)0x005DB94D,JewelText,sizeof(JewelText)); //1.03Z+
*(unsigned int*)0x00969F20 = (unsigned int)JewelInfoText; //1.03Z+ (Offset y en BYTE)
//Hook JewelMoveItem1
BYTE JewelMove1[] = { 0xFF, 0x25, 0xD5, 0x9F, 0x96, 0x00, 0x90, 0x90, 0x90, 0x90 };
memcpy((int*)0x007A9202,JewelMove1,sizeof(JewelMove1)); //1.03Z+
*(unsigned int*)0x00969FD5 = (unsigned int)JewelMoveOnItem1; //1.03Z+ (Offset y en BYTE)
//Hook JewelMoveItem2
BYTE JewelMove2[] = { 0xFF, 0x25, 0xB0, 0x9F, 0x96, 0x00, 0x90, 0x90, 0x90, 0x90 };
memcpy((int*)0x007AAA3D,JewelMove2,sizeof(JewelMove2)); //1.03Z+
*(unsigned int*)0x00969FB0 = (unsigned int)JewelMoveOnItem2; //1.03Z+ (Offset y en BYTE)
//Hook JewelsSwitcher
BYTE JewelsSwitchers[] = { 0xFF, 0x25, 0x00, 0x9F, 0x96, 0x00, 0x90, 0x90, 0x90, 0x90 };
memcpy((int*)0x007EE826,JewelsSwitchers,sizeof(JewelsSwitchers)); //1.03Z+
*(unsigned int*)0x00969F00= (unsigned int)JewelsSwitcher; //1.03Z+ (Offset y en BYTE)
DataJMP ModelJMP;
SetNop(LoadModel_Offset,25);
ModelJMP.Command=0xE9;
ModelJMP.PointerToFunc=(DWORD)&PatchMainForLoadModels;
memcpy((int*)LoadModel_Offset,&ModelJMP,sizeof(ModelJMP));
HookThis((DWORD)&PatchMainForLoadModels,LoadModel_Offset);
}
ps: But to this code is lacking jewels name color on the floor... very good job Young.. now only is lacking.. Jewels sound when Drop and when Character Get.. and Jewel Special Glow Effect.
FOR JEWELS SOUND I NOT HAVE OFFSETS.. BUT I HAVE PROTTYPE OF FUNCTION:
zerg.dll (of: 0.97d)
Code:
//Exp bug fix
//Level Sound
SetNop(0x0042D9E7,7);
HookOffset((DWORD)&ExpBugLvlUp,0x00430948,0xE8);
HookOffset((DWORD)&ExpBugObtainedExp,0x0042D9E7,0xE8);
void ExpBugLvlUp()
{
_asm
{
PUSH ECX
MOV ECX, DWORD PTR DS:[EAX+0x34]
MOV DWORD PTR DS:[EAX+0x10], ECX
MOV BYTE PTR DS:[0x561616], 1
POP ECX
}
originalLvlUp();
PlayLevelSound();
}
void ExpBugObtainedExp()
{
_asm
{
POP ESI
TEST BYTE PTR DS:[0x561616], 1
JNZ SHORT q1
ADD ESI, ECX
q1: MOV ECX, 0x55C4C20
MOV BYTE PTR DS:[0x561616], 0
PUSH ESI
}
}
void PlayLevelSound()
{
LoadWav(0x400,"Data\\Sound\\LevelUp.wav",1,1);
PlayWav(0x400,0,0);
}
zerg.h file
Code:
typedef int(*TLoadWav)(int, char *, int, int);
TLoadWav LoadWav = (TLoadWav) 0x4048B0;
typedef int(*TPlayWav)(int, int, int);
TPlayWav PlayWav = (TPlayWav) 0x404A60;
typedef int(*ToriginalGlow)(DWORD, DWORD, DWORD, FRGB&, BYTE);
ToriginalGlow originalGlow = (ToriginalGlow)0x4FF2A0;
typedef int(*ToriginalLvlUp) ();
ToriginalLvlUp originalLvlUp = (ToriginalLvlUp)0x47C040;
FOR GLOW EFFECT IN JEWELS, I DON'T HAVE OFFSETS BUT I HAVE THIS:
zerg.dll (of: 0.97d)
Code:
//Glow bug fix 99 items
if(FixGlow)
{
HookOffset((DWORD)&Glow,0x00458B25,0xE8);
HookOffset((DWORD)&Glow,0x004FFA75,0xE8);
}
void __cdecl Glow(DWORD dwItemId, DWORD uk1, DWORD uk2, FRGB& cl, BYTE bUkn)
{
switch(dwItemId)
{
//Blade of Devouver
case 0x1A4:
cl.r = 0.7f; cl.g = 0.6f; cl.b = 0.6f;
break;
//Double Sided Blunt Sword
case 0x1A5:
cl.r = 0.5f; cl.g = 0.5f; cl.b = 0.7f;
break;
//Rune Blade
case 0x1AF:
cl.r = 0.7f; cl.g = 0.7f; cl.b = 0.7f;
break;
//Elemental Mace
case 0x1D7:
cl.r = 0.5f; cl.g = 0.7f; cl.b = 0.0f;
break;
//Battle Scepter
case 0x1D8:
cl.r = 0.5f; cl.g = 0.5f; cl.b = 0.7f;
break;
//Slayer's Mace
case 0x1D9:
cl.r = 0.4f; cl.g = 0.4f; cl.b = 0.4f;
break;
//Great Scepter
case 0x1DA:
cl.r = 0.5f; cl.g = 0.5f; cl.b = 0.4f;
break;
//Lord Scepter
case 0x1DB:
cl.r = 0.5f; cl.g = 0.4f; cl.b = 0.3f;
break;
//Great Lord Scepter
case 0x1DC:
cl.r = 0.5f; cl.g = 0.5f; cl.b = 0.5f;
break;
//Mace of the King
case 0x1DD:
cl.r = 0.5f; cl.g = 0.5f; cl.b = 0.5f;
break;
//Dragon Spear
case 0x1FA:
cl.r = 0.6f; cl.g = 0.5f; cl.b = 0.4f;
break;
//Kundun Staff
case 0x23B:
cl.r = 0.5f; cl.g = 0.4f; cl.b = 0.3f;
break;
//Hurricane Set
case 0x2A7: case 0x2C7: case 0x2E7: case 0x307:
cl.r = 0.3f; cl.g = 0.3f; cl.b = 0.7f;
break;
//Great Dragon Set
case 0x285: case 0x2A5: case 0x2C5: case 0x2E5: case 0x305:
cl.r = 0.6f; cl.g = 0.3f; cl.b = 0.1f;
break;
//Dark Soul Set
case 0x286: case 0x2A6: case 0x2C6: case 0x2E6: case 0x306:
cl.r = 0.5f; cl.g = 0.4f; cl.b = 0.3f;
break;
//Red Spirit Set
case 0x288: case 0x2A8: case 0x2C8: case 0x2E8: case 0x308:
cl.r = 0.5f; cl.g = 0.3f; cl.b = 0.1f;
break;
//Light Plate Set
case 0x289: case 0x2A9: case 0x2C9: case 0x2E9: case 0x309:
cl.r = 0.4f; cl.g = 0.4f; cl.b = 0.4f;
break;
//Adamantine Set
case 0x28A: case 0x2AA: case 0x2CA: case 0x2EA: case 0x30A:
cl.r = 0.4f; cl.g = 0.6f; cl.b = 0.7f;
break;
//Dark Steel Set
case 0x28B: case 0x2AB: case 0x2CB: case 0x2EB: case 0x30B:
cl.r = 0.6f; cl.g = 0.6f; cl.b = 0.6f;
break;
//Dark Master Set
case 0x28C: case 0x2AC: case 0x2CC: case 0x2EC: case 0x30C:
cl.r = 0.1f; cl.g = 0.2f; cl.b = 0.7f;
break;
//Other items
default:
originalGlow(dwItemId, uk1, uk2, cl, bUkn);
break;
}
}
Credits: SmallHabit, Crazzy, ZergNM and Nemesis.
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
Genilson
good job!
normal work here .. part of the bmd but not working ..
void CustomBmdInit ()
{
SetNop (0x005D93F3, 25);
WriteJmp (0x005D93F3, (DWORD) & PatchNewModel);
}
void WriteJmp( DWORD from, DWORD to ) {
DWORD flOldProtect;
#define JMP( frm, to ) ( ( ( int )to - ( int )frm ) - 5 )
VirtualProtect( ( LPVOID )from, 5, PAGE_EXECUTE_READWRITE,&flOldProtect );
*( BYTE* )from = 0xE9;
*( DWORD* )( from + 1 ) = JMP( from, to );
VirtualProtect( ( LPVOID )from, 5, flOldProtect, &flOldProtect );
}
giving error in the main ...
This is because your SetNop function don't have VirtualProtect function. Implement VirtualProtect to it or comment out from the source !
Quote:
Originally Posted by
mauro07
SmallHabit source for New Jewels re-write for: 1.03Z+ (Eng) for me:
...
Maybe you could open one topic for your source. This topic is about 1.03k main, not 1.03Z+. Please keep on the topic.
About the sound and glow I will make based on webzen functions, but thanks anyway.
--
Guys, I found some register problems in my tests, then I fixed them. Please copy "newjewels.cpp" again and recompile it.
Server side was 80% done !
-
Re: New Jewels for 1.03k Main (1.03.11)
young vejo que voce e brasileiro..
eu acho que e nessa parte do código
void InitModel(int ItemID, char *ModelName, char *Folder, char *Form)
{
_asm
{
push -1;
push ModelName;
push Form;
push ItemID;
mov eax, 0x005D5DC3;
call eax;
push 1;
push 0x2600;
push 0x2901;
push Folder;
push ItemID;
mov eax, 0x005D5710;
call eax;
}
}
pois quando a essa função chama a função InitModel da ero no main quando ta carregando..
void __declspec(naked) PatchNewModel()
{
InitModel(LOAD_ITEM(14,120), "ExcelentJewel", ItemFolder, ItemDir); // ExcelentJewel.bmd
InitModel(LOAD_ITEM(14,121), "BlueJewel", ItemFolder, ItemDir); // BlueJewel.bmd
InitModel(LOAD_ITEM(14,122), "BlackJewel", ItemFolder, ItemDir); // BlackJewel.bmd
InitModel(LOAD_ITEM(14,123), "RedJewel", ItemFolder, ItemDir); // RedJewel.bmd
InitModel(LOAD_ITEM(14,124), "GreenJewel", ItemFolder, ItemDir); // GreenJewel.bmd
_asm
{
push -1;
push 0x008C7E74;
push 0x008C7E7C;
push 0x1F61;
mov eax, 0x005D5DC3;
call eax;
add esp, 0x10;
mov eax, 0x005D940C;
jmp eax;
}
}
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
Genilson
young vejo que voce e brasileiro..
eu acho que e nessa parte do código
...
Sim, porém este fórum é americano, portanto continuemos no inglês, ok ?
I don't see any problem with this function, so the problem can be with the hook process. Try to put this at the start of your your API Entrypoint (or in DLL_ATTACH):
Code:
DWORD dwOldProtect;
VirtualProtect(LPVOID(0x00401000), 0x00875FFF, PAGE_EXECUTE_READWRITE, &dwOldProtect);
-
Re: New Jewels for 1.03k Main (1.03.11)
Code:
#define iItemDropSound 0x0068AE2F
//------------------------------------------------------------------------
DWORD dwItemDropSound_Pointer;
bool bItemDropSound_Set;
//------------------------------------------------------------------------
void __declspec(naked) cItemDropSound()
{
bItemDropSound_Set = false;
// ----
_asm
{
mov esi, dword ptr ss:[ebp-0x4]
mov dwItemDropSound_Pointer, esi
}
// ----
if( dwItemDropSound_Pointer == ITEM(14, 14) )
{
bItemDropSound_Set = true;
}
else if( dwItemDropSound_Pointer == ITEM(14,106) )
{
bItemDropSound_Set = true;
}
// ----
if( bItemDropSound_Set == true )
{
_asm
{
mov esi, 0x0068AE5C
jmp esi
}
}
else
{
_asm
{
mov esi, 0x0068AE38
jmp esi
}
}
}
//------------------------------------------------------------------------
SetRange((LPVOID)iItemDropSound, 9, ASM::NOP);
SetJmp((LPVOID)iItemDropSound, cItemDropSound);
mauro07
- For play drop sound need search drop and pick functions & hook this, simple hook 1/9 of used in main function like Jewel Of Bless.
And for shine effect on jewels need use gl function or hook anyther in main, not glow effect =/
Like this:
Code:
_asm
{
PUSH -1 // option
PUSH -1 // option
MOV EAX,DWORD PTR SS:[ARG.2]
MOV ECX,DWORD PTR DS:[EAX+0A0]
PUSH ECX
MOV EDX,DWORD PTR SS:[ARG.2]
MOV EAX,DWORD PTR DS:[EDX+9C]
PUSH EAX
MOV ECX,DWORD PTR SS:[ARG.2]
MOV EDX,DWORD PTR DS:[ECX+98]
PUSH EDX
MOV EAX,DWORD PTR SS:[ARG.2]
MOV ECX,DWORD PTR DS:[EAX+94]
PUSH ECX
PUSH 3F666666 // KML color
PUSH 2 // Shine type (2 or 44 like)
MOV ECX,DWORD PTR SS:[ARG.1]
CALL 0051932D // Call to gl function
}
Young
- Offsets for 1.02.11 JPN main, for pick sound you need hook like function) If need i'm upload pick sound)
-
Re: New Jewels for 1.03k Main (1.03.11)
Thanks for help with this: DarkSim, you are the best! :D
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
mauro07
Thanks for help with this: Crazzy, you are the best! :D
Where do you see crazzy? :w00t: that's DarkSim :ott1:
on topic: i'll look in my old pc and see if i can find my research on adding new wings.
-
Re: New Jewels for 1.03k Main (1.03.11)
Quote:
Originally Posted by
-=DarkSim=-
Jewel Of Divinity - Upgrade items from 9 to 13
Dark, how this level upgrade works ? Is sequential or random ?
For sequential I mean:
Each Jewel of Divinity increment 1 level from +9 to +13. It's interesting implement a failure chance for this method...
For random I mean:
Each Jewel of Divinity random from 1 to 4 then increment item level with the result. If the item level is 11 and the rand returns 3, then the max result will be 2 (11 + 2 = 13). I think this function sucks, but I don't know how this Jewel works in RMTS server. :blush:
--
Server side progress:
Jewel Of Skill - 100% Done
Jewel Of Luck - 100% Done
Jewel Of Excellent - 100% Done
Jewel Of Assembly - 100% Done
Jewel Of Divinity - 0% Done
-
Re: New Jewels for 1.03k Main (1.03.11)
Young
Code:
if((gObj->pInventory[lpMsg->invenrotyTarget].m_Level < MaxLevel) && (gObj->pInventory[lpMsg->invenrotyTarget].m_Level >= MinLevel))
{
if(iRate < SucRate2)
{
gObj->pInventory[lpMsg->invenrotyTarget].m_Level++;
gObjInventoryItemSet(aIndex,lpMsg->inventoryPos, -1);
ItemClear(aIndex,lpMsg->inventoryPos);
GCInventoryItemOneSend(aIndex, lpMsg->invenrotyTarget);
GCInventoryItemDeleteSend(aIndex, lpMsg->inventoryPos, 1);
}
else
{
gObjInventoryItemSet(aIndex,lpMsg->inventoryPos, -1);
ItemClear(aIndex,lpMsg->inventoryPos);
GCInventoryItemOneSend(aIndex, lpMsg->invenrotyTarget);
GCInventoryItemDeleteSend(aIndex, lpMsg->inventoryPos, 1);
}
}
else
{
MsgNormal(aIndex,"[SYSTEM] This Jewel not used to this item");
return;
}
-
Re: New Jewels for 1.03k Main (1.03.11)
after finishing the project can u share a guide how to add them on server .... Thanks
-
Re: New Jewels for 1.03k Main (1.03.11)
Simple guide -> Learn C++.
-
Re: New Jewels for 1.03k Main (1.03.11)
Server side 100% done. Topic updated. Please recompile client with the new files to enable New Jewel usage in Pendants & Rings.
Please respect credits !
Thanks everybody.