Protocol new fuction for coderz.

Page 1 of 2 12 LastLast
Results 1 to 25 of 28
  1. #1
    Account Upgraded | Title Enabled! FeN$x is offline
    MemberRank
    Sep 2005 Join Date
    you care?Location
    313Posts

    Protocol new fuction for coderz.

    Well hi to all coders, i had been hear than some teams got freaking troubles on understand how new protocol for items works for new clients, so i develop some weeks ago this fuction for reeplase some old one in GS and it will help alot to coders on change the protocol to new clients, so here i left it:

    Code:
    .Const
    ITEMSECTIONSPACE Equ 40H
    ITEMINDEXSPACE Equ 40H
    
    .Data
    ItemSection DB ITEMSECTIONSPACE Dup(0)
    GlobalItemIndex DB ITEMINDEXSPACE Dup(0)
    
    CalculateItemID Proc
    Local CMyItemID:DWord
    Local CMyItemIndex:DWord
     Push Ebx
     Push Esi
     Push Edi
     Mov Ecx, DWord Ptr Ss:[Ebp + 8H]
     Mov CMyItemID, Ecx
     Xor Eax, Eax
     Mov Eax, 1
     Cmp Ecx, 0
     Je CalculateItemIDEnd
     Xor Eax, Eax
    CSubNumbers:
     Add Eax, 1
     Sub Ecx, 10H
     Cmp Ecx, 0
     Je CMoveItemID
     Cmp Ecx, 0FFFFFFFFH
     Jle CMoveItemID
     Jmp CSubNumbers
    CMoveItemID:
     Mov Ecx, CMyItemID
     Cmp Ecx, 1FH
     Jle CDecreaseBytebyone
     Cmp Ecx, 21H
     Jge CCheckAll
     Jmp CCalculateItemSection
    CCheckAll:
     Cmp Ecx, 20H
     Je CCalculateItemSection
     Cmp Ecx, 40H
     Je CCalculateItemSection
     Cmp Ecx, 60H
     Je CCalculateItemSection
     Cmp Ecx, 80H
     Je CCalculateItemSection
     Cmp Ecx, 0A0H
     Je CCalculateItemSection
     Cmp Ecx, 0C0H
     Je CCalculateItemSection
     Cmp Ecx, 0E0H
     Je CCalculateItemSection
     Cmp Ecx, 100H
     Je CCalculateItemSection
     Cmp Ecx, 120H
     Je CCalculateItemSection
     Cmp Ecx, 140H
     Je CCalculateItemSection
     Cmp Ecx, 160H
     Je CCalculateItemSection
     Cmp Ecx, 180H
     Je CCalculateItemSection
     Cmp Ecx, 1A0H
     Je CCalculateItemSection
     Cmp Ecx, 1C0H
     Je CCalculateItemSection
     Cmp Ecx, 1E0H
     Je CCalculateItemSection
    CDecreaseBytebyone:
     Sub Eax, 1
    CCalculateItemSection:
     IMul Eax, Eax, 10H
     Mov CMyItemIndex, Eax
     Mov Ecx, CMyItemID
     Sub Ecx, Eax
     Mov DWord Ptr GlobalItemIndex, Ecx
    CheckByteSection:
     Mov Eax, CMyItemIndex
     Cmp Eax, 10H
     Je Cits0
     Cmp Eax, 20H
     Je Cits10
     Cmp Eax, 40H
     Je Cits20
     Cmp Eax, 60H
     Je Cits30
     Cmp Eax, 80H
     Je Cits40
     Cmp Eax, 0A0H
     Je Cits50
     Cmp Eax, 0C0H
     Je Cits60
     Cmp Eax, 0E0H
     Je Cits70
     Cmp Eax, 100H
     Je Cits80
     Cmp Eax, 120H
     Je Cits90
     Cmp Eax, 140H
     Je Cits100
     Cmp Eax, 160H
     Je Cits110
     Cmp Eax, 180H
     Je Cits120
     Cmp Eax, 1A0H
     Je Cits130
     Cmp Eax, 1C0H
     Je Cits140
     Cmp Eax, 1E0H
     Je Cits150
     Xor Eax, Eax
     Jmp CalculateItemIDEnd
    Cits0:
     Mov ItemSection, 0
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits10:
     Mov ItemSection, 10H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits20:
     Mov ItemSection, 20H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits30:
     Mov ItemSection, 30H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits40:
     Mov ItemSection, 40H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits50:
     Mov ItemSection, 50H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits60:
     Mov ItemSection, 60H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits70:
     Mov ItemSection, 70H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits80:
     Mov ItemSection, 80H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits90:
     Mov ItemSection, 90H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits100:
     Mov ItemSection, 0A0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits110:
     Mov ItemSection, 0B0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits120:
     Mov ItemSection, 0C0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits130:
     Mov ItemSection, 0D0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits140:
     Mov ItemSection, 0E0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits150:
     Mov ItemSection, 0F0H
     Xor Eax, Eax
     Mov Eax, 1
    CalculateItemIDEnd:
     Pop Edi
     Pop Esi
     Pop Ebx
     Mov Esp, Ebp
     Pop Ebp
     Ret
    CalculateItemID EndP
    Well this fuction is a reeplase of the current call:

    Code:
    00434AB8    E8 67F6FCFF     CALL GameServ.00404124
    Most knowed has the item byte converter, wich is used alot of times for take the itembyte, but i will set a example:

    Code:
    C2 00 0E 31 00 01 00 [06] 00 28 00 24 30 00 //1.02 ->Halberd
    C2 00 0C 31 00 01 00 [66] 00 FF 00 00 //1.0h ->Halberd
    well you can check there the difference between 1.02 and 1.0h, what change is the itemID wich is under [] and 2 new bits, one when its holded the section wich belongs to that item, and the last byte wich is for new items.

    what this fuction make is convert the 1.0h value wich on example is 66 and return on ECX regist 06 (value used for 1.02), on EAX will be returned if the instruction was sucefull completed with the value 1 (1 = correct, 0 = wrong). The fuction present also a empty space wich is defined on -data and .const
    section wich is for hold the itemID and the itemSection, so you can easy later can use that empty space for you new packets. (GS to client)

    the source has been compiled on a DLL, and its tested also works fully, this is only a little help to coders than want to mod the item protocol for any new client and hope you guys can make it fast :juggle:.

    Wish best luck to my brothers of real coding, FeN$x.

    Ciao :eek:
    Last edited by FeN$x; 16-09-06 at 05:59 AM.


  2. #2
    I'll take you all on. Liselotte is offline
    MemberRank
    May 2004 Join Date
    Sector 7Location
    5,800Posts
    (response to flame removed - DaRcAntiX)


    i love you Fen$x, keep up the good work

    my coder idol
    Last edited by DaRcAntiX; 16-09-06 at 12:04 PM.

  3. #3
    Enthusiast bleedis is offline
    MemberRank
    Mar 2006 Join Date
    Europe-Latvia-JelgavaLocation
    31Posts
    (Removed non-english content, possible response to flame - DaRcAntiX)


    Have a nice day boyzz :)
    Last edited by DaRcAntiX; 16-09-06 at 12:08 PM.

  4. #4
    Member viper3333 is offline
    MemberRank
    Oct 2005 Join Date
    LatviaLocation
    69Posts
    Nja sarun valodina teu laba!!

    [ENG]

    Nice work FeN$x you are the best

  5. #5
    Account Upgraded | Title Enabled! CockMan is offline
    MemberRank
    Aug 2006 Join Date
    xor eax,eaxLocation
    746Posts
    hmm the code seems real god quality this time. TY again man.

  6. #6
    Apprentice localh0st is offline
    MemberRank
    Feb 2006 Join Date
    MoldovaLocation
    10Posts
    I will work today with this code, THX!

  7. #7
    Apprentice charos is offline
    MemberRank
    Sep 2005 Join Date
    LatviaLocation
    18Posts
    Bla atkal kaut kadu sudu uzkodejis ;D

    Very nice work man ;D

  8. #8
    Account Upgraded | Title Enabled! nazuco is offline
    MemberRank
    Dec 2004 Join Date
    TuscanYLocation
    270Posts
    Good Master!

  9. #9
    Account Upgraded | Title Enabled! Camus_anth is offline
    MemberRank
    Oct 2005 Join Date
    www.muonline.frLocation
    300Posts
    good work thanks a lot man!

  10. #10
    Proficient Member DeejayJrm is offline
    MemberRank
    Sep 2005 Join Date
    Planet Mu TeamLocation
    153Posts
    Quote Originally Posted by FeN$x View Post
    Well hi to all coders, i had been hear than some teams got freaking troubles on understand how new protocol for items works for new clients, so i develop some weeks ago this fuction for reeplase some old one in GS and it will help alot to coders on change the protocol to new clients, so here i left it:

    Code:
    .Const
    ITEMSECTIONSPACE Equ 40H
    ITEMINDEXSPACE Equ 40H
    
    .Data
    ItemSection DB ITEMSECTIONSPACE Dup(0)
    GlobalItemIndex DB ITEMINDEXSPACE Dup(0)
    
    CalculateItemID Proc
    Local CMyItemID:DWord
    Local CMyItemIndex:DWord
     Push Ebx
     Push Esi
     Push Edi
     Mov Ecx, DWord Ptr Ss:[Ebp + 8H]
     Mov CMyItemID, Ecx
     Xor Eax, Eax
     Mov Eax, 1
     Cmp Ecx, 0
     Je CalculateItemIDEnd
     Xor Eax, Eax
    CSubNumbers:
     Add Eax, 1
     Sub Ecx, 10H
     Cmp Ecx, 0
     Je CMoveItemID
     Cmp Ecx, 0FFFFFFFFH
     Jle CMoveItemID
     Jmp CSubNumbers
    CMoveItemID:
     Mov Ecx, CMyItemID
     Cmp Ecx, 1FH
     Jle CDecreaseBytebyone
     Cmp Ecx, 21H
     Jge CCheckAll
     Jmp CCalculateItemSection
    CCheckAll:
     Cmp Ecx, 20H
     Je CCalculateItemSection
     Cmp Ecx, 40H
     Je CCalculateItemSection
     Cmp Ecx, 60H
     Je CCalculateItemSection
     Cmp Ecx, 80H
     Je CCalculateItemSection
     Cmp Ecx, 0A0H
     Je CCalculateItemSection
     Cmp Ecx, 0C0H
     Je CCalculateItemSection
     Cmp Ecx, 0E0H
     Je CCalculateItemSection
     Cmp Ecx, 100H
     Je CCalculateItemSection
     Cmp Ecx, 120H
     Je CCalculateItemSection
     Cmp Ecx, 140H
     Je CCalculateItemSection
     Cmp Ecx, 160H
     Je CCalculateItemSection
     Cmp Ecx, 180H
     Je CCalculateItemSection
     Cmp Ecx, 1A0H
     Je CCalculateItemSection
     Cmp Ecx, 1C0H
     Je CCalculateItemSection
     Cmp Ecx, 1E0H
     Je CCalculateItemSection
    CDecreaseBytebyone:
     Sub Eax, 1
    CCalculateItemSection:
     IMul Eax, Eax, 10H
     Mov CMyItemIndex, Eax
     Mov Ecx, CMyItemID
     Sub Ecx, Eax
     Mov DWord Ptr GlobalItemIndex, Ecx
    CheckByteSection:
     Mov Eax, CMyItemIndex
     Cmp Eax, 10H
     Je Cits0
     Cmp Eax, 20H
     Je Cits10
     Cmp Eax, 40H
     Je Cits20
     Cmp Eax, 60H
     Je Cits30
     Cmp Eax, 80H
     Je Cits40
     Cmp Eax, 0A0H
     Je Cits50
     Cmp Eax, 0C0H
     Je Cits60
     Cmp Eax, 0E0H
     Je Cits70
     Cmp Eax, 100H
     Je Cits80
     Cmp Eax, 120H
     Je Cits90
     Cmp Eax, 140H
     Je Cits100
     Cmp Eax, 160H
     Je Cits110
     Cmp Eax, 180H
     Je Cits120
     Cmp Eax, 1A0H
     Je Cits130
     Cmp Eax, 1C0H
     Je Cits140
     Cmp Eax, 1E0H
     Je Cits150
     Xor Eax, Eax
     Jmp CalculateItemIDEnd
    Cits0:
     Mov ItemSection, 0
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits10:
     Mov ItemSection, 10H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits20:
     Mov ItemSection, 20H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits30:
     Mov ItemSection, 30H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits40:
     Mov ItemSection, 40H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits50:
     Mov ItemSection, 50H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits60:
     Mov ItemSection, 60H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits70:
     Mov ItemSection, 70H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits80:
     Mov ItemSection, 80H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits90:
     Mov ItemSection, 90H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits100:
     Mov ItemSection, 0A0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits110:
     Mov ItemSection, 0B0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits120:
     Mov ItemSection, 0C0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits130:
     Mov ItemSection, 0D0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits140:
     Mov ItemSection, 0E0H
     Xor Eax, Eax
     Mov Eax, 1
     Jmp CalculateItemIDEnd
    Cits150:
     Mov ItemSection, 0F0H
     Xor Eax, Eax
     Mov Eax, 1
    CalculateItemIDEnd:
     Pop Edi
     Pop Esi
     Pop Ebx
     Mov Esp, Ebp
     Pop Ebp
     Ret
    CalculateItemID EndP
    Well this fuction is a reeplase of the current call:

    Code:
    00434AB8    E8 67F6FCFF     CALL GameServ.00404124
    Most knowed has the item byte converter, wich is used alot of times for take the itembyte, but i will set a example:

    Code:
    C2 00 0E 31 00 01 00 [06] 00 28 00 24 30 00 //1.02 ->Halberd
    C2 00 0C 31 00 01 00 [66] 00 FF 00 00 //1.0h ->Halberd
    well you can check there the difference between 1.02 and 1.0h, what change is the itemID wich is under [] and 2 new bits, one when its holded the section wich belongs to that item, and the last byte wich is for new items.

    what this fuction make is convert the 1.0h value wich on example is 66 and return on ECX regist 06 (value used for 1.02), on EAX will be returned if the instruction was sucefull completed with the value 1 (1 = correct, 0 = wrong). The fuction present also a empty space wich is defined on -data and .const
    section wich is for hold the itemID and the itemSection, so you can easy later can use that empty space for you new packets. (GS to client)

    the source has been compiled on a DLL, and its tested also works fully, this is only a little help to coders than want to mod the item protocol for any new client and hope you guys can make it fast :juggle:.

    Wish best luck to my brothers of real coding, FeN$x.

    Ciao :eek:
    Thanks FeN$x For Your Knowledge Sharing...

  11. #11
    Proficient Member kapeika is offline
    MemberRank
    Jan 2006 Join Date
    LatviaLocation
    150Posts
    Quote Originally Posted by charos View Post
    Bla atkal kaut kadu sudu uzkodejis ;D

    Very nice work man ;D
    [ENG]
    I agre :D
    [LAT]
    Da jus esat pimpji .. :D

  12. #12
    Account Upgraded | Title Enabled! -=Balian=- is offline
    MemberRank
    Jul 2006 Join Date
    Rio de Janeiro - BrasilLocation
    500Posts
    "if you dont like FeN$x, you dont like muonline"
    Thanks FeN$x For Your Knowledge Sharing

  13. #13
    Account Upgraded | Title Enabled! FeN$x is offline
    MemberRank
    Sep 2005 Join Date
    you care?Location
    313Posts
    Well thx all, about the fuction i can say its 100% working and the sintax i use for get the 1.02 itemID with the section should work for all the rest of fuctions you just need to mod the code and add it to your DLL, later reeplase it for the call on GS and you will get real ID for 1.02 and even season2 client in ECX regist. :technolog

    Thx again and soon i will released some other sources, cya.

  14. #14
    Member Asafchik is offline
    MemberRank
    Apr 2005 Join Date
    MoscowLocation
    55Posts
    Thanks!

  15. #15
    i haz skillz Xeron is offline
    MemberRank
    Jul 2005 Join Date
    United StatesLocation
    384Posts
    Thanks FeN$x


    EDIT: Where is the offset to change the map protocol?

    And don't you change it to Push E9 ?
    Last edited by Xeron; 17-09-06 at 04:58 PM.

  16. #16
    Apprentice localh0st is offline
    MemberRank
    Feb 2006 Join Date
    MoldovaLocation
    10Posts
    Well this code is at a very average level!
    I have try to make a request to my library from GS that caused a buffer owerflow and it fuck*d all the computer.

  17. #17
    Account Upgraded | Title Enabled! FeN$x is offline
    MemberRank
    Sep 2005 Join Date
    you care?Location
    313Posts
    Quote Originally Posted by localh0st View Post
    Well this code is at a very average level!
    I have try to make a request to my library from GS that caused a buffer owerflow and it fuck*d all the computer.
    i dont what means average level but if the code give you some problem its caused you dont reeplase well the call of byteitemconvert...

    the code is tested and its code on that way caused you need to hook arguments to it, i try alot of ways to make it but this was the most short and fast i made and finally its impossible this code give you a overflow caused it got triggers for any value than could caused overflow:

    Code:
     Cmp Ecx, 0
     Je CMoveItemID
     Cmp Ecx, 0FFFFFFFFH
    Any trouble of code is due the reeplase of call in GS... :wink2:

  18. #18
    Account Upgraded | Title Enabled! FeN$x is offline
    MemberRank
    Sep 2005 Join Date
    you care?Location
    313Posts
    Quote Originally Posted by Xeron View Post
    Thanks FeN$x


    EDIT: Where is the offset to change the map protocol?

    And don't you change it to Push E9 ?
    this is item protocol, please read well and its a very short part of custom fuction for return season2 item values and itemID section for use it on packets.

    nothing to do with map protocol, the map protocol are triggers and no more...

  19. #19
    Account Upgraded | Title Enabled! Deathway is offline
    MemberRank
    Aug 2005 Join Date
    185Posts
    FeN$x I'm trying to create a dll but i don't know if my work is good, im a noob in ASM, could you help me if the code is correct (builded in Masm v9
    Attached Files Attached Files

  20. #20
    i haz skillz Xeron is offline
    MemberRank
    Jul 2005 Join Date
    United StatesLocation
    384Posts
    I know this has nothing to do with the map protocol...

    I was just asking where the map protocol is located inside the GS. But nevermind, I found a guide you posted on CZF Forums.
    Last edited by Xeron; 18-09-06 at 10:11 PM.

  21. #21
    Account Upgraded | Title Enabled! rodrigobmg is offline
    MemberRank
    Jun 2006 Join Date
    217Posts
    have choice to put the new maps in gameserver and not in dll or i´m dream ????

  22. #22
    Account Upgraded | Title Enabled! FeN$x is offline
    MemberRank
    Sep 2005 Join Date
    you care?Location
    313Posts
    Quote Originally Posted by Deathway View Post
    FeN$x I'm trying to create a dll but i don't know if my work is good, im a noob in ASM, could you help me if the code is correct (builded in Masm v9
    Check my released about DLL private code for subserver, that one is complete and compiled by camus, so you can simple copy my fuction and add the .data things including the .const to the connectmember reload DLL and you will have a bigger DLL with 2 fuctions :goku-s:

    Good luck learning

  23. #23
    Account Upgraded | Title Enabled! FeN$x is offline
    MemberRank
    Sep 2005 Join Date
    you care?Location
    313Posts




    thats a pic using the DLL for hooking on vault fuction, at least it works xD.
    Last edited by FeN$x; 19-09-06 at 10:17 PM.

  24. #24
    Ownage xD Ex1Le is offline
    MemberRank
    Jun 2005 Join Date
    EstoniaLocation
    168Posts
    Nice... good work :)

  25. #25
    i haz skillz Xeron is offline
    MemberRank
    Jul 2005 Join Date
    United StatesLocation
    384Posts
    What release of 99.6x GS are did you add the dll to?

    CzF 99.62t GS-CS demo release?



Page 1 of 2 12 LastLast

Advertisement