[Development] Adding Effects to Items (Easy Way)
Well, I now have a much better method than this, so I made this for those who want to learn something interesting..
First thing to understand: Formulas for calc "ItemID" and "ObjectID"
for ItemID is: #define ItemId(x, y) ((x * 512) + y)
Small explain:
x = item type get of your: Item(XXX).txt from server side
y = item index get of your: Item(XXX).txt from server side
512 = is max item index possible on: Item.bmd from client side
For example:
for calculate ItemID for item: "Divine Sword of Archangel" you must apply the Formula
Divine Sword ItemId = 0 * 512 + 19 = 19 (This value must be passed to hexadecimal: 0x13)
then: 0x13 is ItemId for: Divine Sword of Archangel (on any main.exe version more than: 1.01 series)
but, for example for calculate ItemID for: "Wings of Storm" of Blade Master:
Wings of Storm ItemId = 12 * 512 + 36 = 6180 (This value must be passed to hexadecimal: 0x1824)
then: 0x1824 is ItemId for: Wings of Storm (of course than on any main.exe more than: 1.01 series, and in main.exe from versions more old not exists this wings :p)
for ObjectID is: #define ObjectId(x, y) ((x * 512) + y + ItemArray)
Well is the same.. but have 1 aditional factor: ItemArray?? is very simple to find for any version of main.exe, in my case is: 834 (in decimal value) but in hexadecimal value is: 0x342
Small Guide to find: "ItemArray" in any main.exe (more than: 1.01 series)
http://forum.ragezone.com/f508/item-...effect-868154/
Well then to calculate our ObjectID for each case of Item:
for example: Wings of Storm ObjectID = 12 * 512 + 36 + 834 = 7014 (in decimal value but passed to hexadecimal value is: 0x1B66)
then: 0x1B66 is ObjectID for: Wings of Storm in own main.exe version: 1.03.11 JPN :)
with main.exe open in ollydbg -> second click -> search for -> all constants and write: 1B66
http://i.imgur.com/Dz7gPDV.jpg
the function allocated on: 005CFAC0 is the function for identifier: Wings of Storm and Render Sprites and Effects on this..
Well here a Individual part of code for understand..
Code:
void __declspec(naked) WingsOfStormEffect(){
_asm
{
MOV EAX, DWORD PTR SS:[EBP+0x0C]
MOV dwItem, EAX
CMP dwItem,ObjectId(12,36) //Original case for Wings of Storm item
JE Return
Return:
MOV ECX,0x005CFAC7
JMP ECX
}
}
then.. If you add your own item to this Assembler Inline function re-writed of 1 asm Line of main.exe, and you put on your added item like: .smd the same count of Bones or Nodes, and convert to: .bmd, put on your client folder ussually: "Data/Item", and hook your compiled: Nemesis.dll to your: 1.03k JPN main.exe, you can see something like this:
http://i.imgur.com/QnrasgZ.jpg
Download FULL SOURCE CODE (100% FIXED NOT EXTRANGE CRASHS):
https://mega.co.nz/#!WJYgxIZJ!-kF7Xk...3dzix-Mt48uRoE
PS 1 :
Sorry for put the same effect on this Staff you must add your item case ObjectID in: WingsOfIllusion Inline function of my code and usage this model: https://mega.co.nz/#!fMhi1BJR!pnDeI6...VoKWzbzdfbHJfg
PS 2 :
For create your own items using this method of: "COPY" of original Wings 3 Effects every one of your added models .bmd must have exactly the same: counts of: Bones or Nodes, than original Wings Models effect, because main.exe get bone positions for calculate the effect lights positions.
Example with: Staff of Angel .smd:
Code:
version 1
nodes
0 "Box01" -1
1 "Bone01" 0
2 "Bone02" 1
3 "Bone03" 2
4 "Bone35" 2
5 "Bone34" 2
6 "Bone33" 2
7 "Bone32" 2
8 "Bone31" 2
9 "Bone36" 1
10 "Bone04" 1
11 "Bone05" 10
12 "Bone06" 11
13 "Bone37" 11
14 "Bone38" 1
15 "Bone07" 0
16 "Bone08" 15
17 "Bone09" 16
18 "Bone40" 16
19 "Bone39" 15
20 "Bone51" 0
21 "Bone52" 20
22 "Bone53" 21
23 "Bone43" 21
24 "Bone42" 21
25 "Bone41" 21
26 "Bone45" 21
27 "Bone44" 21
28 "Bone54" 20
29 "Bone55" 28
30 "Bone56" 29
31 "Bone47" 29
32 "Bone46" 20
33 "Bone48" 20
34 "Bone57" 0
35 "Bone58" 34
36 "Bone59" 35
37 "Bone50" 35
38 "Bone49" 34
end
skeleton
time 0
0 0.000000 -100.000000 -0.333302 1.570796 -0.000000 0.000000
1 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
2 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
3 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
4 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
5 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
6 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
7 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
8 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
9 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
10 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
11 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
12 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
13 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
14 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
15 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
16 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
17 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
18 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
19 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
20 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
21 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
22 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
23 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
24 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
25 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
26 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
27 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
28 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
29 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
30 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
31 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
32 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
33 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
34 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
35 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
36 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
37 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
38 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
end
38 is Bone count on: Wings of Illusion original one item than get this effects. :):
Credits for this: ONLY FOR ME (I create this method, like 1 easy way to render cool lights on Items)
And this is like Small Guide for noobs, because people with more knowledge, they may think that this is a silly method, but silly.. or not silly, this method works.
re: [Development] Adding Effects to Items (Easy Way)
Very interesting, Thanks for sharing I am the first to comment XD :tongue:
re: [Development] Adding Effects to Items (Easy Way)
Excelente,surely will help a lot :D
re: [Development] Adding Effects to Items (Easy Way)
I downloaded your code to analyze me and I noticed that you put the offsets of the wings ..
If I wanted to apply these effects in a wing custon, where in the code I put the id of this wing custon?
re: [Development] Adding Effects to Items (Easy Way)
Quote:
Originally Posted by
walter29
I downloaded your code to analyze me and I noticed that you put the offsets of the wings ..
If I wanted to apply these effects in a wing custon, where in the code I put the id of this wing custon?
for example:
Code:
void __declspec(naked) WingsOfStormEffect()
{
_asm
{
MOV EAX, DWORD PTR SS:[EBP+0x0C]
MOV dwItem, EAX
CMP dwItem,ObjectId(12,XX) //XX = your Wings Index get of your: Item(kor).txt file
JE Return
CMP dwItem,ObjectId(12,36) //Original case for Wings of Storm item
JE Return
Return:
MOV ECX,0x005CFAC7
JMP ECX
}
}
PS: is easy.. but remember that your custom model wings must have the same count of Bones, that original Wings model of the Effect.
re: [Development] Adding Effects to Items (Easy Way)
mauro07, analyzing the code again I realized that the offsets to find the two using the formula:
Quote:
for example: Wings of Storm ObjectID = 12 * 512 + 36 + 834 = 7014 (in decimal value but passed to hexadecimal value is: 0x1B66)
as shown in the image below:
http://i.imgur.com/cZob7iR.png
Thus I wonder then what the need to seek the ItemID as in the example below? :
Quote:
Wings of Storm ItemId = 12 * 512 + 36 = 6180 (This value must be passed to hexadecimal: 0x1824)
In that part of the offset or hexa this item fits in code?
and that number 5 after the offset refers to what?
Quote:
void WingsLevel3EffectsHook()
{
SetNop(0x005CFAC0, 5);
WriteJmp(0x005CFAC0, (DWORD)&WingsOfStormEffect);
From already thank you very much for your attention.
re: [Development] Adding Effects to Items (Easy Way)
Amazing! Thanks, Nemesis ;)
re: [Development] Adding Effects to Items (Easy Way)
Quote:
Originally Posted by
psychedelic
Amazing! Thanks, Nemesis ;)
with more work.. you can change too in code the: Bone Count look this:
Code:
CPU Disasm
Address Hex dump Command Comments
005CFB89 |. C785 24FEFFFF MOV DWORD PTR SS:[EBP-1DC],9
005CFB93 |. C785 28FEFFFF MOV DWORD PTR SS:[EBP-1D8],14
005CFB9D |. C785 2CFEFFFF MOV DWORD PTR SS:[EBP-1D4],13
005CFBA7 |. C785 30FEFFFF MOV DWORD PTR SS:[EBP-1D0],0A
005CFBB1 |. C785 34FEFFFF MOV DWORD PTR SS:[EBP-1CC],12
005CFBBB |. C785 38FEFFFF MOV DWORD PTR SS:[EBP-1C8],1C
005CFBC5 |. C785 3CFEFFFF MOV DWORD PTR SS:[EBP-1C4],1B
005CFBCF |. C785 40FEFFFF MOV DWORD PTR SS:[EBP-1C0],24
005CFBD9 |. C785 44FEFFFF MOV DWORD PTR SS:[EBP-1BC],23
005CFBE3 |. C785 48FEFFFF MOV DWORD PTR SS:[EBP-1B8],26
005CFBED |. C785 4CFEFFFF MOV DWORD PTR SS:[EBP-1B4],25
005CFBF7 |. C785 50FEFFFF MOV DWORD PTR SS:[EBP-1B0],35
005CFC01 |. C785 54FEFFFF MOV DWORD PTR SS:[EBP-1AC],30
005CFC0B |. C785 58FEFFFF MOV DWORD PTR SS:[EBP-1A8],3E
005CFC15 |. C785 5CFEFFFF MOV DWORD PTR SS:[EBP-1A4],46
005CFC1F |. C785 60FEFFFF MOV DWORD PTR SS:[EBP-1A0],48
005CFC29 |. C785 64FEFFFF MOV DWORD PTR SS:[EBP-19C],47
005CFC33 |. C785 68FEFFFF MOV DWORD PTR SS:[EBP-198],4E
005CFC3D |. C785 6CFEFFFF MOV DWORD PTR SS:[EBP-194],4F
005CFC47 |. C785 70FEFFFF MOV DWORD PTR SS:[EBP-190],50
005CFC51 |. C785 74FEFFFF MOV DWORD PTR SS:[EBP-18C],57
005CFC5B |. C785 78FEFFFF MOV DWORD PTR SS:[EBP-188],5A
005CFC65 |. C785 7CFEFFFF MOV DWORD PTR SS:[EBP-184],5B
005CFC6F |. C785 80FEFFFF MOV DWORD PTR SS:[EBP-180],6A
005CFC79 |. C785 84FEFFFF MOV DWORD PTR SS:[EBP-17C],66
005CFC83 |. C785 1CFEFFFF MOV DWORD PTR SS:[EBP-1E4],0
005CFC8D |. C785 20FEFFFF MOV DWORD PTR SS:[EBP-1E0],0
debugged from 1.03.11 jpn, this are: Bones from: Wings of Storm by: BoneId :lol:
and this:
Code:
005CFC83 |. C785 1CFEFFFF MOV DWORD PTR SS:[EBP-1E4],0
PS: 1E4 or: 0x1E4 is the total size of OBJ_STRUCT from this main :O:
re: [Development] Adding Effects to Items (Easy Way)
mauro07, sorry for my ignorance but if your answer was regarding my doubts I do not understand anything^^
re: [Development] Adding Effects to Items (Easy Way)
Quote:
Originally Posted by
walter29
mauro07, analyzing the code again I realized that the offsets to find the two using the formula:
as shown in the image below:
http://i.imgur.com/cZob7iR.png
Thus I wonder then what the need to seek the ItemID as in the example below? :
In that part of the offset or hexa this item fits in code?
and that number 5 after the offset refers to what?
From already thank you very much for your attention.
Search ItemID, at least for add Sprites on items.. not is necessary.. but I explain this, because in server side (gameserver), the formula used is: ItemID to find all procs related to Wings (for example), for make fixes. and main.exe use: ItemID formula for some another importants special properties from: Items.. in character inventory view for example.
5 is count of nops for the function: SetNop, because.. in this code I make a JMP from: main.exe code (to) -> Nemesis.dll re-writed code and again from: Nemesis.dll code (to) -> main.exe normal load code..
This code replaces that line of code in the main, by the content of the function in in-line assembly: WingsOfStorm, then the sum of the memory address in the main.exe which is no longer used must be annulled by the function in this case called: SetNop.
I think that you must learn more about assembler :lol:
re: [Development] Adding Effects to Items (Easy Way)
Yes friend you are absolutely right, I have to learn more about assembler ^ ^ I'm pretty novice in this area of programming of muonline, I am venturing to learn this because I found very interesting to add effects to items, I am very thankful to be sharing and also giving support for us.
re: [Development] Adding Effects to Items (Easy Way)
and here I leave full decompile from: 1.03.11 jpn main.exe -> Wings of Storm (12, 36) sprites effects with IDA:
Code:
switch ( a2 )
{
case 7014:
v263 = 0;
v264 = 0;
v265 = 0;
v230 = 0;
v231 = 0;
v232 = 0;
v48 = flt_596ABD8 * 0.00039999999;
v48 = sub_4A1F10(v48);
v266 = sub_5F5EB1(v48) * 0.40000001;
*(float *)&v233 = v266 + 0.5;
v234 = v266 + 0.5;
v235 = v266 + 0.5;
v238 = 9;
v239 = 20;
v240 = 19;
v241 = 10;
v242 = 18;
v243 = 28;
v244 = 27;
v245 = 36;
v246 = 35;
v247 = 38;
v248 = 37;
v249 = 53;
v250 = 48;
v251 = 62;
v252 = 70;
v253 = 72;
v254 = 71;
v255 = 78;
v256 = 79;
v257 = 80;
v258 = 87;
v259 = 90;
v260 = 91;
v261 = 106;
v262 = 102;
v236 = 0.0;
for ( j = 0; j < 25; ++j )
{
sub_4CC40E(
LODWORD(v352),
(int)((char *)&unk_6AB486C + 48 * *(&v238 + j)),
(int)&v263,
(int)&v230,
1);
v236 = 0.5;
*(float *)&v47 = flt_596ABD8 * 0.0099999998;
sub_6BABF2(32242, (int)&v230, 1056964608, (int)&v233, a1, v47, 1);
}
v224 = 11;
v225 = 21;
v226 = 29;
v227 = 63;
v228 = 81;
v229 = 89;
if ( !(rand() % 2) )
{
for ( j = 0; j < 6; ++j )
{
sub_4CC40E(
LODWORD(v352),
(int)((char *)&unk_6AB486C + 48 * *(&v224 + j)),
(int)&v263,
(int)&v230,
1);
if ( !(rand() % 20) )
{
*(float *)&v233 = 0.60000002;
v234 = 0.60000002;
v235 = 0.89999998;
sub_650FF0(388, (int)&v230, a1 + 264, (int)&v233, 1, a1, -1, 0, 0, 0, 0.0, -1);
}
}
}
v267 = 64;
v268 = 61;
v269 = 69;
v270 = 77;
v271 = 86;
v272 = 98;
v273 = 97;
v274 = 99;
v275 = 104;
v276 = 103;
v277 = 105;
v278 = 12;
v279 = 8;
v280 = 17;
v281 = 26;
v282 = 34;
v283 = 52;
v284 = 44;
v285 = 51;
v286 = 50;
v287 = 49;
v288 = 45;
v48 = flt_596ABD8 * 0.003;
v48 = sub_4A1F10(v48);
v236 = sub_5F5EB1(v48) * 0.2;
for ( j = 0; j < 22; ++j )
{
sub_4CC40E(
LODWORD(v352),
(int)((char *)&unk_6AB486C + 48 * *(&v267 + j)),
(int)&v263,
(int)&v230,
1);
if ( *(&v267 + j) != 12
&& *(&v267 + j) != 64
&& *(&v267 + j) != 98
&& *(&v267 + j) != 52 )
{
*(float *)&v233 = 0.80000001;
v234 = 0.5;
v235 = 0.2;
*(float *)&v44 = v236 + 0.30000001;
sub_6BABF2(32002, (int)&v230, v44, (int)&v233, a1, 0, 0);
}
else
{
*(float *)&v233 = 0.89999998;
v234 = 0.0;
v235 = 0.0;
*(float *)&v44 = v236 + 1.4;
sub_6BABF2(32002, (int)&v230, v44, (int)&v233, a1, 0, 0);
}
}
break;
switch (a2) = switch(ObjectId)
and this vXXX are: BoneIds xD
v238 = 9;
v239 = 20;
v240 = 19;
v241 = 10;
v242 = 18;
v243 = 28;
v244 = 27;
v245 = 36;
v246 = 35;
v247 = 38;
v248 = 37;
v249 = 53;
v250 = 48;
v251 = 62;
v252 = 70;
v253 = 72;
v254 = 71;
v255 = 78;
v256 = 79;
v257 = 80;
v258 = 87;
v259 = 90;
v260 = 91;
v261 = 106;
v262 = 102;
v236 = 0.0;
the complete proc for render effects on all items in client init on: 005CDA66
and here I leave the full pseudo code decompiled with ida from: 1.03.11 jpn
http://www.mediafire.com/download/be...udo_by_ida.rar
more?? look this people:
Code:
case 861:
v301 = 0.1;
*(float *)&v302 = 0.89999998;
*(float *)&v303 = 0.1;
sub_4CC249(v310, (int)&v304, SLODWORD(v309), 1, 0);
sub_6BABF2(32358, (int)&v304, 1058642330, (int)&v301, v300, 0, 0);
sub_4CC249(v310, (int)&v304, SLODWORD(v309), 2, 0);
sub_6BABF2(32358, (int)&v304, 1056964608, (int)&v301, v300, 0, 0);
sub_4CC249(v310, (int)&v304, SLODWORD(v309), 3, 0);
sub_6BABF2(32358, (int)&v304, 1056964608, (int)&v301, v300, 0, 0);
sub_4CC249(v310, (int)&v304, SLODWORD(v309), 4, 0);
sub_6BABF2(32358, (int)&v304, 1056964608, (int)&v301, v300, 0, 0);
sub_4CC249(v310, (int)&v304, SLODWORD(v309), 5, 0);
sub_6BABF2(32358, (int)&v304, 1053609165, (int)&v301, v300, 0, 0);
sub_4CC249(v310, (int)&v304, SLODWORD(v309), 6, 0);
sub_6BABF2(32358, (int)&v304, 1050253722, (int)&v301, v300, 0, 0);
sub_4CC249(v310, (int)&v304, SLODWORD(v309), 7, 0);
sub_6BABF2(32358, (int)&v304, 1050253722, (int)&v301, v300, 0, 0);
for ( n = 1; n <= 7; ++n )
{
if ( !(rand() % 4) )
{
*(float *)&v304 = 0.0;
v305 = 0.0;
v306 = 0.0;
v224 = rand() % 7 + 1;
sub_4CC249(v310, (int)&v304, SLODWORD(v309), n, 0);
sub_69BCD9(32271, (int)&v304, LODWORD(v309) + 264, (int)&v301, 12, 0.5, SLODWORD(v309));
}
}
break;
Sword Breaker case 861 of switch :D
Formula for calc ObjectID from Sword Breaker: 0 * 512 + 27 + 834 = 861 (in decimal value)
re: [Development] Adding Effects to Items (Easy Way)
mauro07,I tried to use the effect of item Chaos Dragon Axe on a custon mace, but it does not work out, because I do not know if it was because I put the wrong offset ...
for example: Chaos Dragon Axe ObjectID = 2 * 512 + 6 + 834 = 1864 (in decimal value but passed to hexadecimal value is:748)
I found these offsets as shown in the image below, but I'm not sure which one is right:
http://i.imgur.com/Li3iZTY.png
Chose the offset that the arrow is pointing to your code and added these lines:
Quote:
void __declspec(naked) ChaosDragonAxeEffect()
{
_asm
{
MOV EAX, DWORD PTR SS:[EBP+0x0C]
MOV dwItem, EAX
CMP dwItem,ObjectId(2,30)
JE Return
Return:
MOV ECX,0x005BFE5D
JMP ECX
}
}
void __declspec(naked) WingsOfStormEffect()
{
Quote:
void WingsLevel3EffectsHook()
{
SetNop(0x005BFE56, 5);
WriteJmp(0x005BFE56, (DWORD)&ChaosDragonAxeEffect);
SetNop(0x005CFAC0, 5);
WriteJmp(0x005CFAC0, (DWORD)&WingsOfStormEffect);
SetNop(0x005D008B, 5);
WriteJmp(0x005D008B, (DWORD)&WingsOfVortexEffect);
Now I do not know if wrong in choosing the correct offset or if I did something wrong in the code, since the effect did not work :/:
re: [Development] Adding Effects to Items (Easy Way)
Quote:
Originally Posted by
walter29
mauro07,I tried to use the effect of item Chaos Dragon Axe on a custon mace, but it does not work out, because I do not know if it was because I put the wrong offset ...
for example: Chaos Dragon Axe ObjectID = 2 * 512 + 6 + 834 = 1864 (in decimal value but passed to hexadecimal value is:748)
I found these offsets as shown in the image below, but I'm not sure which one is right:
http://i.imgur.com/Li3iZTY.png
Chose the offset that the arrow is pointing to your code and added these lines:
Now I do not know if wrong in choosing the correct offset or if I did something wrong in the code, since the effect did not work :/:
bad function hook man! I think that your correct function is: 0x004F69FB, look better in your screenshot :)
CMP DWORD PTR SS:[EBP-0x4CC],0x748
PS: YOUR FUNCTION IS BAD!, you must restore original EBP-4CC case in your code:
void __declspec(naked) ChaosDragonAxeEffect()
{
_asm
{
MOV EAX, DWORD PTR SS:[EBP-0x4CC]
MOV dwItem, EAX
CMP dwItem,ObjectId(2,30)
JE Return
Return:
MOV EAX,0x005BFE5D
JMP EAX
}
}
you must try to use the original register to restore section look this:
http://i.imgur.com/A642KSj.jpg
THE COMPLETE EFFECT CODE FOR CHAOS DRAGON AXE:
Code:
CPU DisasmAddress Hex dump Command Comments
004F7E36 |> \C685 88FDFFFF MOV BYTE PTR SS:[EBP-278],0
004F7E3D |. C745 BC 00000 MOV DWORD PTR SS:[EBP-44],0
004F7E44 |. C745 C0 0000A MOV DWORD PTR SS:[EBP-40],C2A80000
004F7E4B |. C745 C4 00000 MOV DWORD PTR SS:[EBP-3C],0
004F7E52 |. 6A 01 PUSH 1 ; /Arg4 = 1
004F7E54 |. 8D45 E4 LEA EAX,[EBP-1C] ; |
004F7E57 |. 50 PUSH EAX ; |Arg3
004F7E58 |. 8D4D BC LEA ECX,[EBP-44] ; |
004F7E5B |. 51 PUSH ECX ; |Arg2
004F7E5C |. 8B95 90FDFFFF MOV EDX,DWORD PTR SS:[EBP-270] ; |
004F7E62 |. 33C0 XOR EAX,EAX ; |
004F7E64 |. 8A42 05 MOV AL,BYTE PTR DS:[EDX+5] ; |
004F7E67 |. 6BC0 30 IMUL EAX,EAX,30 ; |
004F7E6A |. 8B4D 0C MOV ECX,DWORD PTR SS:[EBP+0C] ; |
004F7E6D |. 8B91 A4010000 MOV EDX,DWORD PTR DS:[ECX+1A4] ; |
004F7E73 |. 03D0 ADD EDX,EAX ; |
004F7E75 |. 52 PUSH EDX ; |Arg1
004F7E76 |. 8B45 0C MOV EAX,DWORD PTR SS:[EBP+0C] ; |
004F7E79 |. 8B48 30 MOV ECX,DWORD PTR DS:[EAX+30] ; |
004F7E7C |. 69C9 F4000000 IMUL ECX,ECX,0F4 ; |
004F7E82 |. 8B15 28CB9605 MOV EDX,DWORD PTR DS:[596CB28] ; |
004F7E88 |. 03CA ADD ECX,EDX ; |
004F7E8A |. E8 7F45FDFF CALL 004CC40E ; \main.004CC40E
004F7E8F |. D905 D8AB9605 FLD DWORD PTR DS:[596ABD8] ; FLOAT 0.0
004F7E95 |. D80D 00B78800 FMUL DWORD PTR DS:[88B700] ; FLOAT 0.004000000
004F7E9B |. 51 PUSH ECX
004F7E9C |. D91C24 FSTP DWORD PTR SS:[ESP] ; /Arg1
004F7E9F |. E8 6CA0FAFF CALL 004A1F10 ; \main.004A1F10
004F7EA4 |. 83C4 04 ADD ESP,4
004F7EA7 |. D80D 90B48800 FMUL DWORD PTR DS:[88B490] ; FLOAT 0.3000000
004F7EAD |. D805 4CB18800 FADD DWORD PTR DS:[88B14C] ; FLOAT 0.7000000
004F7EB3 |. D99D 8CFDFFFF FSTP DWORD PTR SS:[EBP-274]
004F7EB9 |. D985 8CFDFFFF FLD DWORD PTR SS:[EBP-274]
004F7EBF |. D80D 889A8800 FMUL DWORD PTR DS:[889A88] ; FLOAT 1.000000
004F7EC5 |. D95D AC FSTP DWORD PTR SS:[EBP-54]
004F7EC8 |. D985 8CFDFFFF FLD DWORD PTR SS:[EBP-274]
004F7ECE |. D80D 64B28800 FMUL DWORD PTR DS:[88B264] ; FLOAT 0.2000000
004F7ED4 |. D95D B0 FSTP DWORD PTR SS:[EBP-50]
004F7ED7 |. D985 8CFDFFFF FLD DWORD PTR SS:[EBP-274]
004F7EDD |. D80D 60B28800 FMUL DWORD PTR DS:[88B260] ; FLOAT 0.1000000
004F7EE3 |. D95D B4 FSTP DWORD PTR SS:[EBP-4C]
004F7EE6 |. 6A 00 PUSH 0
004F7EE8 |. 6A 00 PUSH 0
004F7EEA |. 8B45 0C MOV EAX,DWORD PTR SS:[EBP+0C]
004F7EED |. 50 PUSH EAX
004F7EEE |. 8D4D AC LEA ECX,[EBP-54]
004F7EF1 |. 51 PUSH ECX
004F7EF2 |. D985 8CFDFFFF FLD DWORD PTR SS:[EBP-274]
004F7EF8 |. D805 60A58800 FADD DWORD PTR DS:[88A560] ; FLOAT 1.500000
004F7EFE |. 51 PUSH ECX
004F7EFF |. D91C24 FSTP DWORD PTR SS:[ESP]
004F7F02 |. 8D55 E4 LEA EDX,[EBP-1C]
004F7F05 |. 52 PUSH EDX
004F7F06 |. 68 627D0000 PUSH 7D62
004F7F0B |. E8 E22C1C00 CALL 006BABF2
004F7F10 |. 83C4 1C ADD ESP,1C
BECAUSE THIS OFFSET: 004F6A05 MAKE A JUMP WITH CONDITIONAL TO: 004F7E36 |> \C685 88FDFFFF MOV BYTE PTR SS:[EBP-278],0
CALL 004CC40E IS CALL TO GETBONEID FUNCTION
FLD DWORD PTR DS:[596ABD8] IS STATIC CALL TO WORLDTIME FUNCTION
CALL 004A1F10 I DON'T KNOW..
004F7EE6 |. 6A 00 PUSH 0 //unk
004F7EE8 |. 6A 00 PUSH 0 //this is bone id
PUSH 7D62 IS EFFECT TEXTURE
CALL 006BABF2 IS CALL TO DRAW EFFECT IN SCREEN
re: [Development] Adding Effects to Items (Easy Way)
tried to change the code here but I had no success, I'm already with the whole mind messy here so much I need to understand, I have to give a good asm studied in order to understand better, because it is very complex to me kkkkk