[Tutorial] Same-sex marriage in perfect world properly done

Results 1 to 5 of 5
  1. #1
    Would You Kindly? Bola is offline
    DeveloperRank
    Dec 2011 Join Date
    BrazilLocation
    1,758Posts

    [Tutorial] Same-sex marriage in perfect world properly done

    ------------------- server -------------------

    Open libtask.so in IDA Pro

    Go to function ATaskTempl:CheckMarriage(Task Interface*)

    in IDA View-A
    search for this

    cmp al, [ebp+m2.m_bMale]



    click on jnz
    Go to Menu > Edit > Patch Program > Change Byte

    change the first byte 75 to EB

    Go to Menu > Edit > Patch Program > Apply Patches to input file.

    ------------------- client -------------------

    this is the hardest part since client doesnt have debug symbols, we have to find using strings and things to be used as reference.

    i have looked at source code from client leaked by scena, and we can find a function called CheckMarriage inside TaskTempl.inl, then i check where this function is called, and i find one that has a string to be tracked, so lets start this part.

    first you gonna press on IDA View, then press CTRL + T and search for this string "CheckPrerequisite: ret"
    press F5 so you will find a giant IF Else code, this code will looks like this.



    then you will need to find the function checkmarriage, i have set a comentary block in picture down bellow but you can find yourself looking for a function that first return is value 51 and next returns is 20 until return 0.



    after you click on function, it will looks like this



    select the last IF that return 20 code, press tab to return on IDA Pro View with the jz selected,

    Go to Menu > Edit > Patch Program > Change Byte

    change the first byte 74 to EB ( maybe can be 75, it depends on the compiler decision, replace by EB anyway )





    Go to Menu > Edit > Patch Program > Apply Patches to input file.

    -----------------------------------------
    Create box with quest mission,
    use in party and complete in NPC.

    -----------------------------------------------------------


    credits to @Scena that shares source code from perfect world to the public that could make this guide possible.

    here the source code references for the client code above.





  2. #2
    Account Upgraded | Title Enabled! Teemo Cell is offline
    MemberRank
    Oct 2012 Join Date
    404Location
    510Posts

    re: [Tutorial] Same-sex marriage in perfect world properly done

    Looks really good and it works. Tyvm for the Tut.

  3. #3
    sarcasm-mode: active jv90 is offline
    MemberRank
    Jun 2013 Join Date
    IDALocation
    467Posts

    re: [Tutorial] Same-sex marriage in perfect world properly done

    In 1.5.3 I made these exact changes to libtask.so and in the elementclient I found two byte sequences within the same function that match the one at the end for that function that has 51 20 20 20 and return 0.

    Did all the patches correctly but we still can't take the items to npc and marry two of the same gender it feels like another layer of protection somewhere. Tasks.data is correctly configured, Can we only marry via box?

  4. #4
    Would You Kindly? Bola is offline
    DeveloperRank
    Dec 2011 Join Date
    BrazilLocation
    1,758Posts

    re: [Tutorial] Same-sex marriage in perfect world properly done

    Quote Originally Posted by jv90 View Post
    In 1.5.3 I made these exact changes to libtask.so and in the elementclient I found two byte sequences within the same function that match the one at the end for that function that has 51 20 20 20 and return 0.

    Did all the patches correctly but we still can't take the items to npc and marry two of the same gender it feels like another layer of protection somewhere. Tasks.data is correctly configured, Can we only marry via box?
    Clone the two existent tasks for marriage, and set on those two new tasks, the requirement for marriage for any type, then place a new item for sure, both for same task if you want, then you free to go

  5. #5
    sarcasm-mode: active jv90 is offline
    MemberRank
    Jun 2013 Join Date
    IDALocation
    467Posts

    re: [Tutorial] Same-sex marriage in perfect world properly done

    So the specific item ids and specific task IDs cause a problem / limitation?



Advertisement