View Single Post
Old 24.04.2005, 17:01   #1
Livid
Архивный участник
 
Join Date: Apr 2005
Posts: 314
Default //create_pet for wyverns

First of all, I suppose that you have applied
Strider: https://postpacific.loc-online.com/f...opic.php?t=323
and
Wyvern data: https://postpacific.loc-online.com/f...opic.php?t=368

So, now we can continue. It is NOT a guide, it is more likely technical documentation

First of all,
Function for creating wyvern
Code:
.006B81E0: 8B550C                       mov         edx,[ebp+0C]
.006B81E3: B95F900F00                   mov         ecx,0000F905F
.006B81E8: 51                           push        ecx
.006B81E9: B8581B0000                   mov         eax,000001B58
.006B81EE: 50                           push        eax
.006B81EF: 52                           push        edx
.006B81F0: E8FB48E9FF                   call       .00054CAF0
.006B81F5: 83C40C                       add         esp,00C
.006B81F8: 32C0                         xor         al,al
.006B81FA: 8B4DF4                       mov         ecx,[ebp-0C]
.006B81FD: 64890D00000000               mov         fs:[0],ecx
.006B8204: 5F                           pop         edi
.006B8205: 5E                           pop         esi
.006B8206: 5B                           pop         ebx
.006B8207: 8BE5                         mov         esp,ebp
.006B8209: 5D                           pop         ebp
.006B820A: C3                           retn
Now we got it, let us modify function, responding to //create_pet
Code:
.004143DC: 83F807                       cmp         eax,007 //: We changed 006 here to 007, 8 will be our code for wyvern
.004143DF: 0F87D8000000                 ja         .0004144BD
.004143E5: FF248550CF5B00               jmp         d,[005BCF50][eax*4]
.004143EC: 8B4D08                       mov         ecx,[ebp][08]
.004143EF: 68DCCF5B00                   push        0005BCFDC
.004143F4: 68FCCA5B00                   push        0005BCAFC
.004143F9: E8B2200F00                   call       .0005064B0
And now, add wyvern creation function to table:
5BCF50:
00414411 == wolf
0041443C == hatchling of wind
00414467 == hatcling of stars
00414492 == of twilight
004245F0 \
004245F0 | == strider of anyhing
004245F0 /
006B81E0 == wyvern

or in raw hex:
Code:
005BCF50:  11 44 41 00-3C 44 41 00-67 44 41 00-92 44 41 00
005BCF60:  F0 45 42 00-F0 45 42 00-F0 45 42 00-E0 81 6B 00
Now, we can use
//create_pet 8
to create wyvern pet. Good luck.
P.S. If you read carefully through "Working strider Thread" then you saw my mini-guide on hexing l2server for striders.
For wyverns, it is mostly the same.
Livid is offline