Jump to content

Hergel

Members
  • Posts

    22
  • Joined

  • Last visited

  • Days Won

    1

Community Answers

  1. Hergel's post in Mobinfo atcommand.cpp was marked as the answer   
    The error message msize: estouro nos limites da matrizindicates that the arraymsizehas been declared to have a second dimension size of 7 characters, but you are trying to initialize it with strings that are potentially longer than 6 characters (remember that you need an extra character for the null terminator\0` in C++ strings).
    Similarly, for melement, you're trying to initialize it with strings that might be longer than the declared size once you consider the null terminator.

    Now you can try with this code:
    unsigned char msize[SZ_ALL][8] = { "Pequeno", "Medio", "Grande" }; // changed from [7] to [8] unsigned char melement[ELE_ALL][9] = { "Neutro", "Agua", "Terra", "Fogo", "Vento", "Veneno", "Sagrado", "Sombrio", "Fantasma", "Maldito" }; // changed from [8] to [9]  
  2. Hergel's post in Thor Patcher - Custom icon and title was marked as the answer   
    For the Patcher is not big deal, for the launcher exe is harder. you can use ResourceHacker.exe
    Open your Thor.exe with the program  Open the "icon Group" Right click in the MAINICO option amd select "Replace Icon..."

    Select "Open file with new Icon..." and select your best icon, I can recomend you 64x64 size Then save your change in "Save as" option 
     
    And that's it, let me know if you have any question, 
    resource_hacker.zip
     
     
  3. Hergel's post in Is it possible to append "Player Online Count" back of the Server Name? was marked as the answer   
    I understand that displaying the current online status can be extremely helpful. However, it’s possible that you might be looking in the wrong place. Perhaps you could try the following suggestion:
    /src/login/loginclif.cpp
    method logclif_auth_ok
    find this :
     
    WFIFOW(fd,header+n*size+4) = ntows(htons(ch_server[i].port)); // [!] LE byte order here [!] memcpy(WFIFOP(fd,header+n*size+6), ch_server[i].name, 20); WFIFOW(fd,header+n*size+26) = login_get_usercount( ch_server[i].users );  


    replace for:
    WFIFOW(fd,header+n*size+4) = ntows(htons(ch_server[i].port)); // [!] LE byte order here [!] // Concatenate the server name with the online user count [Hergel] char buffer[20]; int users = ch_server[i].users; snprintf(buffer, 20, "%s (%d)", ch_server[i].name, users); memcpy(WFIFOP(fd, header+n*size+6), buffer, 20); WFIFOW(fd,header+n*size+26) = login_get_usercount( ch_server[i].users );  
×
×
  • Create New...