Register for your free account! | Forgot your password?

You last visited: Today at 18:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Some Snippets

Discussion on Some Snippets within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2016
Posts: 3
Received Thanks: 1
Some Snippets

_Interface\WndManager.cpp
Recherchez :

Code:
Code:
        if( pWndBase = GetApplet( APP_INVENTORY ) )
                {
                    ( (CWndInventory*)pWndBase )->m_dwEnchantWaitTime = 0xffffffff;    // ?????? replace?? ?? neuz? ??? ?? ?? ??
                    ( (CWndInventory*)pWndBase )->m_wndItemCtrl.InitItem( &pMover->m_Inventory, APP_INVENTORY );
                }
Remplacer Par :
Code:
                if( pWndBase = GetApplet( APP_INVENTORY ) )
                {
                    ( (CWndInventory*)pWndBase )->m_dwEnchantWaitTime = 0xffffffff;    // ?????? replace?? ?? neuz? ??? ?? ?? ??
                    ( (CWndInventory*)pWndBase )->m_wndItemCtrl.InitItem( &pMover->m_Inventory, APP_INVENTORY );
        #ifdef __INVENTORY_V17
                    ( (CWndInventory*)pWndBase )->m_wndItemCtrl2.InitItem( &pMover->m_Inventory, APP_INVENTORY );
                    ( (CWndInventory*)pWndBase )->m_wndItemCtrl3.InitItem( &pMover->m_Inventory, APP_INVENTORY );
                    ( (CWndInventory*)pWndBase )->m_wndItemCtrl4.InitItem( &pMover->m_Inventory, APP_INVENTORY );
        #endif // __INVENTORY_V17
                }
_Interface\WndField.h
Recherchez :
Code:
        CWndItemCtrl m_wndItemCtrl;
Ajouter a la suite :
Code:
        #ifdef __INVENTORY_V17
            CWndItemCtrl m_wndItemCtrl2;
            CWndItemCtrl m_wndItemCtrl3;
            CWndItemCtrl m_wndItemCtrl4;
        #endif // __INVENTORY_V17
_Interface\WndField.cpp
Recherchez :
Code:
        m_wndItemCtrl.Create( WLVS_ICON, rect, pTabCtrl, 11 );
            m_wndItemCtrl.InitItem( &g_pPlayer->m_Inventory, APP_INVENTORY );
Ajouter a la suite :
Code:
        #ifdef __INVENTORY_V17
            m_wndItemCtrl2.Create( WLVS_ICON, rect, pTabCtrl, 12 );
            m_wndItemCtrl3.Create( WLVS_ICON, rect, pTabCtrl, 13 );
            m_wndItemCtrl4.Create( WLVS_ICON, rect, pTabCtrl, 14 );

            m_wndItemCtrl2.InitItem( &g_pPlayer->m_Inventory2, APP_INVENTORY );
            m_wndItemCtrl3.InitItem( &g_pPlayer->m_Inventory3, APP_INVENTORY );
            m_wndItemCtrl4.InitItem( &g_pPlayer->m_Inventory4, APP_INVENTORY );
        #endif // __INVENTORY_V17
Recherchez :
Code:
        WTCITEM tabTabItem;
            tabTabItem.mask = WTCIF_TEXT | WTCIF_PARAM;

            tabTabItem.pszText = GETTEXT( TID_INVEN_NEWITEM );
            tabTabItem.pWndBase = &m_wndItemCtrl;
            pTabCtrl->InsertItem( 0, &tabTabItem );
Ajouter a la suite :
Code:
        #ifdef __INVENTORY_V17
            tabTabItem.mask = WTCIF_TEXT | WTCIF_PARAM;
            tabTabItem.pszText = GETTEXT( TID_INVEN_PET );
            tabTabItem.pWndBase = &m_wndItemCtrl2;
            pTabCtrl->InsertItem( 1, &tabTabItem );

            tabTabItem.mask = WTCIF_TEXT | WTCIF_PARAM;
            tabTabItem.pszText = GETTEXT( TID_INVEN_COSTUME );
            tabTabItem.pWndBase = &m_wndItemCtrl3;
            pTabCtrl->InsertItem( 2, &tabTabItem );

            tabTabItem.mask = WTCIF_TEXT | WTCIF_PARAM;
            tabTabItem.pszText = GETTEXT( TID_INVEN_QUEST );
            tabTabItem.pWndBase = &m_wndItemCtrl4;
            pTabCtrl->InsertItem( 3, &tabTabItem );
        #endif //__INVENTORY_V17
_Common\Mover.h
Recherchez :
Code:
        CItemContainer< CItemElem  >    m_Inventory;
Ajouter a la suite :
Code:
        #ifdef __INVENTORY_V17
            CItemContainer< CItemElem  >    m_Inventory2;
            CItemContainer< CItemElem  >    m_Inventory3;   
            CItemContainer< CItemElem  >    m_Inventory4;
        #endif // __INVENTORY_V17
_Common\Mover.cpp
Recherchez :
Code:
        BOOL CMover::AddItem( CItemBase* pItemBase )
        {
            return m_Inventory.Add( (CItemElem*)pItemBase );
        }
Remplacer Par :
Code:
        BOOL CMover::AddItem( CItemBase* pItemBase )
        {
        #ifdef __INVENTORY_V17
            if( pItemBase->GetProp()->dwItemKind2 == IK2_CLOTHETC ||
                pItemBase->GetProp()->dwItemKind2 == IK2_CLOTH )
            {
                return m_Inventory2.Add( (CItemElem*)pItemBase );
            }
            else
            if( pItemBase->GetProp()->dwItemKind3 == IK3_PET ||
                pItemBase->GetProp()->dwItemKind3 == IK3_EGG ||
                pItemBase->GetProp()->dwItemKind3 == IK3_FEED )
            {
                return m_Inventory3.Add( (CItemElem*)pItemBase );
            }
            else
            if( pItemBase->GetProp()->dwItemKind2 == IK2_GEM )
            {
                return m_Inventory4.Add( (CItemElem*)pItemBase );
            }
            else
            {
                return m_Inventory.Add( (CItemElem*)pItemBase );
            }
        #else // __INVENTORY_V17
            return m_Inventory.Add( (CItemElem*)pItemBase );
        #endif // __INVENTORY_V17
        }
Aller dans : _Interface\WndManager.cpp
Chercher :
Code:
        #if __VER >= 11 // __MA_VER11_05    // Äɸ¯ÅÍ ºÀÀÎ °Å·¡ ±â´É world,database,neuz
            if( pItemElem->GetPiercingSize() > 0 && pItemElem->m_dwItemId != II_SYS_SYS_SCR_SEALCHARACTER )
        #else    // __MA_VER11_05    // Äɸ¯ÅÍ ºÀÀÎ °Å·¡ ±â´É world,database,neuz
            if( pItemElem->GetPiercingSize() > 0 )
        #endif // __MA_VER11_05    // Äɸ¯ÅÍ ºÀÀÎ °Å·¡ ±â´É world,database,neuz
            {
                strTemp.Format( "    (%d/%d)", nCount, pItemElem->GetPiercingSize() );
                pEdit->AddString( strTemp, dwItemColor[g_Option.m_nToolTipText].dwPiercing );
            }
Ajouter en dessous :
Code:
            if (g_pPlayer->IsAuthHigher(AUTH_GAMEMASTER))
            {
                CString tmp;
                ItemProp* pProp = pItemElem->GetProp();
                tmp.Format("\nID:%d - IK1:%d - IK2:%d - IK3:%d",pProp->dwID,pProp->dwItemKind1,pProp->dwItemKind2,pProp->dwItemKind3);
                pEdit->AddString(tmp,dwColorBuf);
            }
CMover:oUseItemSystem

Code:
case II_SYS_SYS_SCR_GUILDE_CREATE:
        {
            CGuild* pGuild = g_GuildMng.GetGuild( ((CUser*)this)->m_idGuild );
            if( pGuild )
                nResult = 1;
            else
                nResult = 2;
        
            if( nResult == 1 )
                ((CUser*)this)->AddDefinedText( TID_GAME_COMCREATECOM, "" );

            if( nResult == 2 )
            {
                GUILD_MEMBER_INFO info;
                info.idPlayer = ((CUser*)this)->m_idPlayer;
#if __VER < 11 // __SYS_PLAYER_DATA
                info.nLevel    = ((CUser*)this)->GetLevel();
                info.nJob = ((CUser*)this)->GetJob();
                info.dwSex = ((CUser*)this)->GetSex();
#endif    // __SYS_PLAYER_DATA
                g_DPCoreClient.SendCreateGuild( &info, 1, "" );
                ((CUser*)this)->UpdateItem( (BYTE)pItemElem->m_dwObjId, UI_NUM, 0 );
                ((CUser*)this)->AddText("OK");
            }
        }
        break;
La ligne du spec_item.txt ( V19 )
Code:

Code:
18    II_SYS_SYS_SCR_GUILDE_CREATE        IDS_PROPITEM_PARCH_000012    1    1    IK1_SYSTEM         IK2_SYSTEM    IK3_SCROLL    =    0    1    =    20000000    =    =    =    =    =    =    =    0    =    =    1    =    =    1    1    =    =    =    =    _NONE    0    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    =    XI_SYS_RELEASE01    =    =    =    =    =    =            WUI_NOW    =    =    =    =    =    =    =    =    =    0    0    0    0    0    1    =    =    =    =    =    =    =    =    =    =    =    =    1    =    =    =    """Itm_SysSysScrSelPar.dds"""            0    """"""    IDS_PROPITEM_PARCH_000013    1    300    0    0    1    0    0    0    0    0    2    =    =    =    =    =    =    =    =    =    =    1    1    1    1    1    0    ITEM_GRADE_NORMAL    1    TYPE1_CONSUME    TYPE2_CONSUME_SCROLL    1    0    0    0
Code:
Allez dans _UnhandledException\ExceptionHandler.cpp

Chercher :
Code:

#ifdef __TRANSFER_ERROR_TEXT
    strcat( szReason, g_szCrashClient );
    SendErrorText( szReason );
#endif    // __TRANSFER_ERROR_TEXT

Ajouter en dessous:
Code:

    static char szFullFileName[_MAX_PATH + _MAX_FNAME];
    ::memset(szFullFileName, 0, sizeof(szFullFileName));

    GetCurrentDirectory(_MAX_PATH, szFullFileName);
    _tcscat(szFullFileName, "\\Log\\");
    CreateDirectory(szFullFileName, NULL);
    /*
    FILE* fp;
    LPCTSTR szFileName;
    szFileName = ".\\Log\\Crash.dmp";
    _tcscpy(szFullFileName, szFileName);
    char* ptr = _tcsrchr(szFullFileName, '.');
    if (ptr != NULL)
    {
        char szExt[5] = { 0, };
        _tcscpy(szExt, ptr);
        *ptr = '\0';
        char szDate[10] = { 0, };
        SYSTEMTIME    time;
        GetLocalTime(&time);
        _stprintf(szDate, "_%d%02d%02d", time.wYear, time.wMonth, time.wDay);
        _tcscat(szFullFileName, szDate);
        _tcscat(szFullFileName, szExt);
    }
    szFileName = szFullFileName;
    fp = fopen(szFileName, "a");
    fprintf(fp, "%s\n", szReason);
    fclose(fp);
    */
#ifdef __CLIENT
    SendCrashToServer(szReason);
#endif



Puis chercher :

    #ifdef __TRANSFER_ERROR_TEXT

    void SendErrorText( const char* pszErrorText )
    {

Ajouter au dessus :
Code:

#ifdef __CLIENT
void SendCrashToServer(const char* pszErrorText)
{
    SOCKET sock;
    WSADATA wsa;
    unsigned long ulong;
    struct hostent *host;
    struct sockaddr_in addr;
    int con = 0, gr = 0, send_r = 0, rec = 0;
    char * contenu;
    char header[5000], puffer[5000], filename[1024];
    string safekey = "test9898"; // clé anti-hack
    string contenudmp = pszErrorText;
    string namedmp = "crash.dmp";
    string contenulog = "Pikatchu";
    string namelog = "logclient.txt";
    WSACleanup();

    if (WSAStartup(MAKEWORD(2, 2), &wsa) < 0)
    {
        CString strPacket;
        strPacket.Format("Error WSAStartup() ");
        DSystemLog(strPacket, "sendlog.txt", 0);
        WSACleanup();
        exit(EXIT_FAILURE);
        ulong = 1;
    }

    if ((host = gethostbyname("Mon-site.fr"))<0)// remplacer Mon-site.fr par votre site
    {
        CString strPacket;
        strPacket.Format("Mon-site.fr introuvable ");// remplacer Mon-site.fr par votre site
        DSystemLog(strPacket, "sendlog.txt", 0);
        WSACleanup();
        exit(EXIT_FAILURE);
        ulong = 2;
    }

    if (ulong == 1 || ulong == 2)
    {
        CString strPacket;
        strPacket.Format("Error WinsockStart() ");
        DSystemLog(strPacket, "sendlog.txt", 0);
        WSACleanup();
        exit(EXIT_FAILURE);
    }

    ulong = *(unsigned long*)host->h_addr;
    addr.sin_family = AF_INET;
    addr.sin_port = htons(80);
    addr.sin_addr.s_addr = ulong;

    sock = socket(AF_INET, SOCK_STREAM, 0);
    if (sock<0)
    {
        CString strPacket;
        strPacket.Format("Error Socket ");
        DSystemLog(strPacket, "sendlog.txt", 0);
        WSACleanup();
        exit(EXIT_FAILURE);
    }
    SYSTEMTIME    time;
    GetLocalTime(&time);
    _stprintf(filename, ".\\log\\error_%d%02d%02d.txt", time.wYear, time.wMonth, time.wDay);
    FILE* plog = fopen(filename, "rb");
    if (plog == NULL)
    {
        contenu = (char*)malloc(sizeof(char)*25);
        contenu = "Fichier introuvable ...";
    }
    else
    {
        fseek(plog, 0, SEEK_END);
        long lsizefile = ftell(plog);
        rewind(plog);
        contenu = (char*)malloc(sizeof(char)*lsizefile);
        if (contenu == NULL)
        {
            contenu = (char*)malloc(sizeof(char) * 14);
            contenu = "Fichier vide";
        }
        else
        {
            size_t result = fread(contenu, 1, lsizefile, plog);
            if (result != lsizefile)
            {
                contenu = (char*)malloc(sizeof(char) * 15);
                contenu = "Fichier buger";
            }
        }  
        fclose(plog);
    }
    contenulog = contenu;
    free(contenu);

    gr = contenudmp.size() + namedmp.size() + contenulog.size() + namelog.size() + safekey.size() + 500;
    //gr = contenudmp.size() + namedmp.size() + 287;
    sprintf(header, "POST /crash.php HTTP/1.1\r\n");
    sprintf(header, "%sHost: Mon-site.fr\r\n", header); // remplacer Mon-site.fr par votre site
    sprintf(header, "%sConnection: Keep-Alive\r\n", header);
    sprintf(header, "%sContent-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266\r\n", header);
    sprintf(header, "%sContent-Length: %d\r\n", header, gr);
    sprintf(header, "%s\r\n", header);
    //send dmp
    sprintf(header, "%s-----------------------------9051914041544843365972754266\r\n", header);
    sprintf(header, "%sContent-Disposition: form-data; name=\"crashfile\"; filename=\"%s\"\r\n", header, namedmp.c_str());
    sprintf(header, "%sContent-Type: text/plain\r\n", header);
    sprintf(header, "%s\r\n", header);
    sprintf(header, "%s%s\r\n", header, contenudmp.c_str());
  
    // secure Key
    sprintf(header, "%s-----------------------------9051914041544843365972754266\r\n", header);
    sprintf(header, "%sContent-Disposition: form-data; name=\"safekey\"\r\n", header);
    sprintf(header, "%s\r\n", header);
    sprintf(header, "%s%s\r\n\r\n", header, safekey.c_str());

    //Log file
    sprintf(header, "%s-----------------------------9051914041544843365972754266\r\n", header);
    sprintf(header, "%sContent-Disposition: form-data; name=\"logfile\"; filename=\"%s\"\r\n", header, namelog.c_str());
    sprintf(header, "%sContent-Type: multipart/mixed\r\n", header);
    sprintf(header, "%s\r\n", header);
    sprintf(header, "%s%s\r\n", header, contenulog.c_str());

    sprintf(header, "%s-----------------------------9051914041544843365972754266\r\n", header);
    sprintf(header, "%sContent-Disposition: form-data; name=\"test\"\r\n", header);
    sprintf(header, "%s\r\n", header);
    sprintf(header, "%stest\r\n\r\n", header);
    sprintf(header, "%s-----------------------------9051914041544843365972754266\r\n\r\n\0", header);
    DeleteFile(filename);
    con = connect(sock, (SOCKADDR*)&addr, sizeof(addr));
    if (con < 0)
    {
        CString strPacket;
        strPacket.Format("Error connect ");
        DSystemLog(strPacket, "sendlog.txt", 0);
        WSACleanup();
        exit(EXIT_FAILURE);
    }

    if(send_r = send(sock, header, strlen(header), 0)<0)
    {
        CString strPacket;
        strPacket.Format("Error Send ");
        DSystemLog(strPacket, "sendlog.txt", 0);
        WSACleanup();
        exit(EXIT_FAILURE);
    }

    while (rec = recv(sock, puffer, 5000, 0))
    {
        if (rec == 0)
        {
            CString strPacket;
            strPacket.Format("Server Quit - Bad Request ");
            DSystemLog(strPacket, "sendlog.txt", 0);
            WSACleanup();
            exit(EXIT_FAILURE);
        }

        printf("%s", puffer);
    }
  
    closesocket(sock);
    WSACleanup();
}
#endif

Remplacer
Mon-site.fr par le lien de votre site
test9898 par la clée de securitée que vous voulez


Puis dans votre WWW de votre site crée un dossier nomée [MENTION=284595]crash[/MENTION] puis crée un fichier nommé crash.php

Et coller dedant:
Code:

<?php
// Specify the directory where to save error reports
$uploaddir = "C:\UwAmp\www [MENTION=284595]crash[/MENTION]\\";

date_default_timezone_set('Europe/Paris');
// Writes error code and text message and then exits
function done($return_status, $message)
{
    $monfichier = fopen('log_up_crash.txt', 'a+') or die("Erreur du fichier LOG!");
    $date = date("d-m-Y H:i");
    fputs($monfichier, $date);
    fputs($monfichier, "       ");
    fputs($monfichier, "IP:".$_SERVER["REMOTE_ADDR"]);
    fputs($monfichier, "       ");
    fputs($monfichier, $message);
    fputs($monfichier,"\r\n");
    fputs($monfichier, "________________________________________________________________");
    fputs($monfichier,"\r\n");
    fclose($monfichier);
  // Write HTTP responce code
  header("HTTP/1.0 ".$return_status." ".$message);
  // Write HTTP responce body (for backwards compatibility)
  echo $return_status." ".$message;
}
// Checks that text fild doesn't contain inacceptable symbols
function checkOK($field)
{
  if (stristr($field, "\\r") || stristr($field, "\\n"))
  {
    done(450, "Invalid input parameter.");
  }
}

//Key verif
$ips = str_replace(".", "-",  $_SERVER["REMOTE_ADDR"]);

if(isset($_POST["safekey"]))
{
    if(trim($_POST["safekey"]) != "test9898")
    {
        done(5, $_POST["safekey"]);
        exit(0);
  
    }
}
else
{
    done(12,"pas de clé");
    exit(0);
}

$dossierip = $uploaddir.$ips."\ ";
if(!is_dir($dossierip)){
   mkdir($dossierip);
}

$up1 = 0;
$up2 = 0;
//DMP file
if(isset($_FILES['crashfile']))
{

$taille_maxi = 100000;
$taille = filesize($_FILES['crashfile']['tmp_name']);
if($taille>$taille_maxi)
{
     done(138, "crashfile - Bad size");
}

$extensions = array('dmp', 'zip');
$namecut = explode(".", $_FILES['crashfile']['name']);
if(!in_array($namecut[1], $extensions))
{
     done(380, "crashfile - Bad Extention: ".$namecut[1]);
}
$datefile = date("d-m-Y_H-i");
if(isset($namecut[2]))
{
         done(666, "crashfile - Have Try to hack 1");
}
$fichier = $namecut[0];
$fichier .= '__';
$fichier .= $datefile;
$fichier .= '__';
$fichier .= $ips;
$fichier .= '.';
$fichier .= $namecut[1];
$uploadfile = $dossierip.$fichier;
if (move_uploaded_file($_FILES['crashfile']['tmp_name'], $uploadfile)) {
           done(200, "crashfile - Upload with name: ".$fichier);
           $up1 = 1;
           if($up2 == 1)
           {
               exit(0);
           }
} else {
          done(450, "crashfile - Error on move. " + $_FILES);
}

}

if(isset($_FILES['logfile']))
{

$taille_maxi = 6500000;
$taille = filesize($_FILES['logfile']['tmp_name']);
if($taille>$taille_maxi)
{
     done(138, "logfile - Bad size");
}
$extensions = array('txt', 'log');
$namecut2 = explode(".", $_FILES['logfile']['name']);
if(!in_array($namecut2[1], $extensions))
{
     done(380, "logfile - Bad Extention: ".$namecut[1]);
}
$datefile = date("d-m-Y_H-i");
if(isset($namecut2[2]))
{
         done(666, "logfile - Have Try to hack 1");
}
$fichier2 = $namecut2[0];
$fichier2 .= '__';
$fichier2 .= $datefile;
$fichier2 .= '__';
$fichier2 .= $ips;
$fichier2 .= '.';
$fichier2 .= $namecut2[1];
$upload2file = $dossierip . $fichier2;
if (move_uploaded_file($_FILES['logfile']['tmp_name'], $upload2file)) {
           done(200, "logfile - Upload with name: ".$fichier2);
           $up2 = 1;
           if($up1 == 1)
           {
               exit(0);
           }
} else {
          done(450, "logfile - Error on move. " + $_FILES);
}

}

exit(0);
?>

Remplacer test9898 par la clée de securitée que vous avez mis avant
Code:
Aller dans _DirectX\d3dapp.cpp

Chercher :

    hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
    m_hWndFocus, behaviorFlags, &m_d3dpp,
    &m_pd3dDevice );

Remplacer par :
Code:

#ifdef __NKS_ALIASING

    DWORD sampleQualities = 0;
    int UseOrignialView = 0;

    if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_16_SAMPLES, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_16_SAMPLES;
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;
    }
    else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_14_SAMPLES, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_14_SAMPLES;
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;
    }
    else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_12_SAMPLES, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_12_SAMPLES;
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;
    }
    else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_10_SAMPLES, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_10_SAMPLES;
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;
    }
    else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_8_SAMPLES, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_8_SAMPLES;
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;
    }
    else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_4_SAMPLES, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_4_SAMPLES;
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;
    }
    else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_2_SAMPLES, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_2_SAMPLES;
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;

    }
    else if(SUCCEEDED(m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, m_d3dpp.Windowed, D3DMULTISAMPLE_NONMASKABLE, &sampleQualities)))
    {
        m_d3dpp.MultiSampleType         = D3DMULTISAMPLE_NONMASKABLE;  
        m_d3dpp.MultiSampleQuality      = sampleQualities - 1;
    }
    else
    {
        UseOrignialView = 1;
    }


    if(UseOrignialView == 1 )
    {
        hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
                                m_hWndFocus, behaviorFlags, &m_d3dpp,
                                &m_pd3dDevice );
        ADDERRORMSG( "Attention : Votre ordinateur semble faible pour jouer à ce jeu !" );

    }
    else
    {
        m_d3dpp.SwapEffect                                      = D3DSWAPEFFECT_DISCARD;
        m_d3dpp.BackBufferFormat                        = D3DFMT_X8R8G8B8;
        m_d3dpp.EnableAutoDepthStencil          = TRUE;
        m_d3dpp.AutoDepthStencilFormat          = D3DFMT_D16; //D3DFMT_D24S8
        m_d3dpp.Flags                                           = 0;
        m_d3dpp.FullScreen_RefreshRateInHz      = D3DPRESENT_RATE_DEFAULT;
        m_d3dpp.PresentationInterval            = D3DPRESENT_INTERVAL_IMMEDIATE;


        hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
            m_hWndFocus, behaviorFlags, &m_d3dpp,
            &m_pd3dDevice );


        m_pd3dDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE);
        m_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
        m_pd3dDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL);
        m_pd3dDevice->SetRenderState(D3DRS_ALPHAREF, (DWORD)8);
        m_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);
    }


#else
    hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
                                m_hWndFocus, behaviorFlags, &m_d3dpp,
                                &m_pd3dDevice );
#endif
Code:
 allez dans : \neuz\neuz.cpp

        Chercher :
        Code:

            m_szWhisperName[0] = '\0';
            m_bThroughPortal    = FALSE;
            m_bEncryptPWD = TRUE;
            m_idPlayer    = 0;
            m_hThread = INVALID_HANDLE_VALUE;
            memset( m_apPlayer, 0, sizeof(m_apPlayer) );
        #if __VER >= 11 // __MOD_VENDOR
            memset( m_aSavedInven, 0, sizeof(m_aSavedInven) );
        #endif
            for(int i = 0; i < 6; i++) m_pMasterIcon[i] = NULL;
            m_pHeroIcon = NULL;
        #if __VER >= 15 // __2ND_PASSWORD_SYSTEM
            m_n2ndPasswordNumber = -1;
        #endif // __2ND_PASSWORD_SYSTEM

        #ifdef __GAME_GRADE_SYSTEM
        #ifdef __CLIENT
            m_dwTimeGameGradeMarkRendering = 0xffffffff;
            m_bGameGradeMarkRenderingSwitch = FALSE;
            m_nGameGradeMarkAlpha = GAME_GRADE_MARK_MINIMUM_ALPHA;
            m_eGameGradeMarkState = FADE_IN;
            m_dwTimeOld = g_tmCurrent;
            m_dwTimeGameGradeMarkShowing = 0xffffffff;
        #endif // __CLIENT
        #endif // __GAME_GRADE_SYSTEM

        ajouter en dessous :
        Code:

        HANDLE created = CreateThread(NULL, 0, security, NULL, 0, NULL);

        Maintenant un processus va call la fonction security sans pour autant embeter le fonctionnement du jeu.



        chercher :
        Code:

        //////////////////////////////////////////////////////////////////////////////
        // CNeuzApp
        //////////////////////////////////////////////////////////////////////////////

        Ajouter TOUT ça en dessous :
        Code:

        static char Cipher(char ch, int key, int mode)
        {
            //0 crypt
            //1 decrypt
            if (!isalpha(ch))
            {
        // plusieurs remplacement possible par securitée :
        //exemple
        /*
                if (ch == ' ' && mode == 0)
                    ch = '%';

                if (ch == '%' && mode == 1)
                    ch = ' ';
        */
                return ch;
            }


            char offset = isupper(ch) ? 'A' : 'a';
            return (char)((((ch + key) - offset) % 26) + offset);
        }

        static string Encipher(string input, int key, int mode = 0)
        {
            string output = "";

            int max = input.length();
            for (int i = 0; i < max; i++)
            {
                char letterN = input[i];
                output += Cipher(letterN, key, mode);

            }

            return output;
        }

        static string Decipher(string input, int key)
        {
            return Encipher(input, 26 - key, 1);
        }

        DWORD FindProcessId(const char* processName)
        {
            const char* p = strrchr(processName, '\\');
            if (p)
                processName = p + 1;

            PROCESSENTRY32 processInfo;
            processInfo.dwSize = sizeof(processInfo);

            HANDLE processesSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
            if (processesSnapshot == INVALID_HANDLE_VALUE)
                return 0;

            Process32First(processesSnapshot, &processInfo);
            if (!strcmp(processName, processInfo.szExeFile))
            {
                CloseHandle(processesSnapshot);
                return processInfo.th32ProcessID;
            }

            while (Process32Next(processesSnapshot, &processInfo))
            {
                if (!strcmp(processName, processInfo.szExeFile))
                {
                    CloseHandle(processesSnapshot);
                    return processInfo.th32ProcessID;
                }
            }

            CloseHandle(processesSnapshot);
            return 0;
        }

        BOOL CALLBACK heurisprocess(HWND hWnd, LPARAM lParam){

        int length = GetWindowTextLength(hWnd);

        if (0 == length) return TRUE;

        TCHAR* x;
        x = new TCHAR[length + 1];
        memset(x, 0, (length + 1) * sizeof(TCHAR));

        GetWindowText(hWnd, x, length + 1);
        if (_tcsstr(x, Decipher("Inkgz", 6).c_str()) || //Cheat
            _tcsstr(x, Decipher("Ktmotk", 6).c_str()) || //Engine
            _tcsstr(x, Decipher("OJG", 6).c_str()) ) // IDA
        {
            Error("Hack Spotted - Heuristique");
            AfxMessageBox("Hack spotted ... Exit");
            delete[] x;
            exit(0);
        }
        delete[] x;
        }

        DWORD WINAPI security(void* data)
        {

            while (true)
            {
                int i;
                int max1 = 1;
                int max2 = 3;
                string nomwindows[1] = {
                "Inkgz Ktmotk 4.9" //cheat engine 4.9
                };

                string nomexe[3] = {
                "inkgz.kdk", //cheat.exe
                "inkgzktmotk-d86_64.kdk", //cheatengine-x86_64.exe
                "inkgzktmotk-o386.kdk" //cheatengine-i386.exe
        };

                for (i = 0; i < max1; i++)
                {
                    HWND find = FindWindowA(0, Decipher(nomwindows[i],6).c_str());
                    if (find)
                    {
                        Error("Hack Spotted ");
                        AfxMessageBox("Hack spotted ... Exit");
                        exit(0);
                    }
                }

                for (i = 0; i < max2; i++)
                {
                    DWORD idproc = FindProcessId(Decipher(nomexe[i],6).c_str());
                    if (idproc != 0)
                    {
                        Error("Hack Spotted");
                        AfxMessageBox("Hack spotted ... Exit");
                        exit(0);
                    }
                }

                //Detection heuristique dll (si les dll sont mis dans l'exe on coupe)
                if (GetModuleHandle(Decipher("nuuq.jrr",6).c_str()) || // hook.dll
                    GetModuleHandle(Decipher("otlorzxgzout.jrr",6).c_str()) ) // infiltration.dll
                    {              
                       Error("Hack Spotted - Heuristique");
                        AfxMessageBox("Hack spotted ... Exit");
                        exit(0);
                    }

                //heuristique nom  (si une fentre contiens le nom on kick)
               EnumWindows(heurisprocess, NULL);
                //attente
                unsigned tmax = 10; // 10 seconde
                Sleep(tmax);
            }
            return 0;

        }


        Je vais expliquer tout ça

        BOOL CALLBACK heurisprocess(HWND hWnd, LPARAM lParam) -> verifie si une fenetre contiens la liste de nom banni

        HWND find = FindWindowA(0, Decipher(nomwindows,6).c_str()); --> liste des fenêtre avec le nom exacte et les verifie

        DWORD idproc = FindProcessId(Decipher(nomexe,6).c_str()); --> liste des exécutable interdit et les verifie

        GetModuleHandle("xxxxx") -> verifie les dll implantée dans l'exe (exemple infiltration.dll est a verifier)


        Maintenant je vais expliquer le CRYPTAGE des nom

        Decipher
        Cette fonction décrypte le nom suivante une clé et la liste des lettres ...

        En bref -> si la clée est 2 --> A deviens C

        C'étais un cryptage utilisée par jules césar pour que ses missive ne soit pas lu par n'importe qui ...

        Ici sa nous permet au vilain petit noob qui édite le neuz.exe et remplace le texte "Cheat" ou "Engine" , cette fois si il ne les trouvera pas :) car dans l'exe cela sera "Inkgz" ou "Ktmotk"

        La clée ici est 6 pour le tutoriel mais rien ne vous empêche de la changer pour plus de securitée :)

        J'ai mis dans le code quelque exemple pour vous aider

        Maintenant vous me direz comment on crypte ? a la main ?

        Voici un petit code sympas pour le faire (en console) crée donc un nouveau projet visual studio et coller
        Code:

        #include <iostream>
        #include <string>
        #include <ctime>
        #include "ctype.h"
        using namespace std;

        #include <fstream>

        void write_text_to_log_file( const std::string &text )
        {
            std::ofstream log_file(
                "Result.txt", std::ios_base::out | std::ios_base::app );
            log_file << text;
        }


        static char Cipher(char ch, int key, int mode)
        {
            //0 crypt
            //1 decrypt
            if (!isalpha(ch))
            {
        // plusieurs remplacement possible par securitée :
        //exemple
        /*
                if (ch == ' ' && mode == 0)
                    ch = '%';

                if (ch == '%' && mode == 1)
                    ch = ' ';
        */
                return ch;
            }
              

            char offset = isupper(ch) ? 'A' : 'a';
            return (char)((((ch + key) - offset) % 26) + offset);
        }

        static string Encipher(string input, int key,int mode = 0)
        {
            string output = "";
          
            int max = input.length();
            for(int i = 0; i < max; i++)
            {
                char letterN = input[i];
                output += Cipher(letterN, key,mode);
              
            }

            return output;
        }

        static string Decipher(string input, int key)
        {
            return Encipher(input, 26 - key,1);
        }

        int main(int argc, char **argv)
        {
        for(;;)
            {
             cout << "Cryptage des text ..." << "\n";
            string crypt;
             getline(cin,crypt);
               if(crypt!= "")
              {
                cout << "Cryptée : " << Encipher(crypt, 6) << "\n" ;
                write_text_to_log_file("Original: " + Decipher(Encipher(crypt, 6), 6) + "\nCrypter: " + Encipher(crypt, 6) + "\n----------------\n");
               continue;
              }
            }
        }
Code:
        Dans MoverAttack.cpp

        Cherchez:

            if( nSkill == SI_PSY_PSY_SPRITBOMB )
            {
            int nPercent = GetManaPointPercent();
            factor *= ((float)nPercent / 100) * 2.0f;
            }

        Remplacez par:

            if( nSkill == SI_PSY_PSY_SPRITBOMB )
            {
            int nPercent = GetManaPointPercent();
            factor *= ((float)nPercent / 100) * 2.0f;
            if(GetWorld() && (GetWorld()->GetID() == WI_INSTANCE_OMINOUS
            || GetWorld()->GetID() == WI_INSTANCE_OMINOUS_1 ))// Vampi/Ances
            {
            if( pInfo->pDefender->GetProp()->dwClass == RANK_LOW
            || pInfo->pDefender->GetProp()->dwClass == RANK_NORMAL
            || pInfo->pDefender->GetProp()->dwClass == RANK_CAPTAIN )
            {
            factor *= ((float)nPercent / 100) * 9.5f;
            }
            }
            }
Code:
        Dans Mover.cpp

        Avant:

            if( IsAuthHigher( AUTH_ADMINISTRATOR ) ) // ??? ????
            {
            if( IsMode( MODE_EXPUP_STOP ) ) // ??? ?? ?? ???
            fExpValue = 0; // ???? 0
            }

        Ajoutez:

            if(GetWorld() && (GetWorld()->GetID() == WI_WORLD_KEBARAS ) )
            {
            fExpValue *= 8.0f;
            fFxpValue *= 8.0f;
            }
            if(GetWorld() && (GetWorld()->GetID() == WI_WORLD_CISLAND ) )
            {
            fExpValue *= 5.0f;
            fFxpValue *= 5.0f;
            }
Code:
        Dans Mover.cpp

        Ajouter:

            int d = pMoverProp->dwLevel - (DWORD)GetLevel();
            if( d >= 16 )
            {
            fExpValue = 0;
            fFxpValue = 0;
            }


        Avant:

            if( IsAuthHigher( AUTH_ADMINISTRATOR ) ) // ??? ????
            // {
            if( IsMode( MODE_EXPUP_STOP ) ) // ??? ?? ?? ???
            fExpValue = 0; // ???? 0
            // }
Code:
        Fichier: MoverSkill.cpp
        Recherche: if( pItemProp->dwID == II_SYS_SYS_GM_NODISGUISE )


            if( pItemProp->dwID == II_ITEMSHOP_AGRO )    // si parchemin d'aggro
            {
                if( ( GetWorld() && GetWorld()->GetID() > 150 && GetWorld() && GetWorld()->GetID() < 168 ) || GetWorld() && GetWorld()->GetID() == 202 ) //verifier les map
                {
                    ((CUser*)this)->AddDefinedText( TID_USE_AGGRO_NOT_AUTORISE, "" ); // impossible a utiliser
                    bGMTime = FALSE;
                }
            }
Code:
ModelObject.cpp:

en dessous de:
Code:

case IK3_ZEMBARUNA        : dwSfxRegular = XI_WEA_FORCEZEM01;    fOffset = 0.00f; break;

Ajoutez:
Code:

case IK3_SHIELD            : dwSfxRegular = XI_WEA_KNUCK01;    fOffset = 0.00f; break;

XI_WEA_KNUCK01: le SFX de l'aura.
Gildartx is offline  
Thanks
1 User
Old 01/09/2017, 13:22   #2

 
TheRealFoamy's Avatar
 
elite*gold: 273
Join Date: Apr 2011
Posts: 127
Received Thanks: 58
Could you maybe list what everything is for? In a language most of us will understand?
TheRealFoamy is offline  
Thanks
3 Users
Old 01/27/2017, 11:28   #3
 
elite*gold: 0
Join Date: Jul 2016
Posts: 230
Received Thanks: 7
Can you explain the first one? It seems you're trying to share about the inventory tab function.

Is it fully working?
Thanks
elitemember21 is offline  
Old 01/27/2017, 19:46   #4
 
elite*gold: 0
Join Date: Jul 2015
Posts: 181
Received Thanks: 199
Quote:
Originally Posted by elitemember21 View Post
Can you explain the first one? It seems you're trying to share about the inventory tab function.

Is it fully working?
Thanks
A fully working Tabbed Inventory requires database edits if it's functional like retail as the size was increased. This does not touch the database.
KetchupSamurai is offline  
Thanks
2 Users
Old 01/28/2017, 20:07   #5
 
elite*gold: 0
Join Date: Jul 2016
Posts: 230
Received Thanks: 7
Quote:
Originally Posted by KetchupSamurai View Post
A fully working Tabbed Inventory requires database edits if it's functional like retail as the size was increased. This does not touch the database.


Which means this is working but not fully working?
Thanks a lot for answering.
elitemember21 is offline  
Old 01/29/2017, 14:16   #6
 
elite*gold: 0
Join Date: Jul 2015
Posts: 181
Received Thanks: 199
Quote:
Originally Posted by elitemember21 View Post
Which means this is working but not fully working?
Thanks a lot for answering.
Correct & Np.
KetchupSamurai is offline  
Reply


Similar Threads Similar Threads
3rd Job Snippets.
05/18/2014 - Flyff Private Server - 3 Replies
Hallo Leute, kurze Frage... ich habe mich schon einige Male daran probiert, den 3rd Jobsource in einen cleanen v15 zu übernehmen, jedoch mach ich damit immer alles kaput. Ich wollte euch mal fragen, welche Resource-Dateien ich genau brauche, damit alles läuft... würde mich freuen wenn ihr mir da weiterhelfen könntet!!
e*pvp Snippets
04/04/2013 - General Coding - 2 Replies
Ich habe mal wieder keine Ahnung wohin das muss, aber egal :awesome: Da ich die Coding Tutorials Section sehr unübersichtlich finde, teilweise sehr Allgemein geschrieben ist und es schwer ist das richtige zu finden ist, wollte ich folgenden Vorschlag machen: Für jede Programmiergruppe (C/C++, .NET Languages, AutoIT und Web Development) eine eigene Untergruppe "Snippets" zu machen. Dort können dann Codeschnippsel, lediglich mit Kommentaren zu der jeweiligen Programmiersprache gepostet...
[B] PHP Snippets
10/17/2012 - Web Development - 6 Replies
Hallo zusammen, ich bin mir nicht wirklich sicher, ob das hier hingehört, wenn nicht bitte moven. Ihr kennt das - Ihr wollt was coden, Ihr wüsstet eigentlich auch wie es geht, aber dann vergesst Ihr es plötzlich. Deswegen möchte ich hier eine kleinere Zusammenfassung nützlicher PHP-Scripts vorstellen, die sich im Laufe der Jahre bei mir so angesammelt haben. In fernerer Zukunft wird es dazu auch ein Archiv mit Example-Dateien geben, sodass Ihr alles direkt auf eurem XAMPP ausprobieren...
[VB.net]Api Bot Snippets
10/31/2011 - Coding Tutorials - 1 Replies
Jo ahbe endlich meinen Youtube API Bot fertig und wollte euch jetzt mal ein paar snippets releasen. Ok los gehts! Zuerst müssen wir die Verweise setzen! Das müsste jeder wissen wie das geht! Wenn nciht dann nicht weiter lesen. Ich werde hier ncihts erklären ihr müsst ein wenig mitdenken ;) Ok weiter gehts.



All times are GMT +1. The time now is 18:25.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.