How to add Startitems (Offi) + Register(Captcha)

Page 1 of 2 12 LastLast
Results 1 to 25 of 30
  1. #1
    Apprentice Caith1991 is offline
    MemberRank
    Mar 2008 Join Date
    14Posts
    Startitems
    Spoiler:
    Also vorweg es gibt 2 Möglchkeiten:
    1. über die Event.lua (gut für welche die nicht gut mit der DB umgehen können.
    AddEvent ( "Anfangsitem" )
    --{
    SetTime( "2009-09-29 00:00", "2020-01-01 00:00" )
    SetLevelUpGift( 2, "all", "II_SYS_BLI_TWO_TOWNBLINKWING", 5 )
    SetLevelUpGift( 2, "all", "II_GEN_FOO_INS_LOLLIPOP", 5 )
    SetLevelUpGift( 2, "all", "II_GEN_FOO_INS_BISCUIT", 1 )
    --}
    II_SYS_BLI_TWO_TOWNBLINKWING => Name des Items
    5 => Anzahl

    =======

    2. Direkt über die DB (macht das am besten mit testserver der ne leere db hat da findet man die sachen schneller)

    1. Also als erstes braucht ihr 2 Chars (male und female)
    diese Rüstet ihr mir den Sachen aus und pakt die Sachen ins Inventar die jeder neue Chars bekommen soll.

    2. geht in die CHARACTER_TBL und schreibt euch die m_idPlayer auf. (schreibt euch dahinter welche male bzw female ist, weil sont könntet ihr sie verwechseln)

    3. geht jetz in die INVENTORY_DBF und sucht die IDs der chars.

    4. öffnet nun parallel folgendes CHARACTER_01_DBF --> Programmierbarkeit --> CHARACTER_STR --> Rechtsklick + Ändern

    5. Sucht folgenden Eintrag IF @im_dwSex = '1' (die Einträge oben sind für den female char)

    6. so und nun kopiert Ihr 1:1 die Eintrge der Spalten m_Inventory, m_apIndex, m_adwEquipment, m_ObjIndex

    7.so jetz nurnoch oen auf [Ausführen] drückn.




    Ich hafte NICHT für eventuelle Fehler die Ihr macht, dürchführung auf eigene Verantwortung.

    Support wird ebenfalls nicht über PN gegeben.

    Und wer fragt wie er mit der Datenbank umgehen muss sollte sich mal gedanken machen ob er wirklich nen Pserver betreiben will.





    =================




    Hier habt Ihr ein Beispiel für 5 TownBlinkwing, 5 Lollipo und 1 Biscuit
    Code:
                    IF @im_dwSex = '1'
                    BEGIN
                    SET @invi1 = '0,512,0,0,,1,0,4500000,0,0,0,-1118993182,0,0,0,0,0/1,504,0,0,,1,0,9000000,0,0,0,946307614,0,0,0,0,0/2,2801,0,0,,1,0,-1,0,0,2,1695360208,0,0,0,0,0/42,508,0,0,,1,0,5850000,0,0,0,750110947,0,0,0,0,0/43,2800,0,0,,5,0,-1,0,0,2,-440263533,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,579001730,0,0,0,0,0/$'
                    SET @invi2 = '45/43/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/-1/-1/1/-1/42/0/-1/-1/-1/-1/44/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    SET @invi3 = '0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/$'
                    SET @invi4 = '47/44/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/46/1/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    END
                    ELSE
                    BEGIN
                    SET @invi1 = '0,506,0,0,,1,0,5850000,0,0,0,-2005860201,0,0,0,0,0/1,502,0,0,,1,0,9000000,0,0,0,688242964,0,0,0,0,0/2,510,0,0,,1,0,4500000,0,0,0,583094601,0,0,0,0,0/42,2800,0,0,,5,0,-1,0,0,2,-2142136381,0,0,0,0,0/43,2801,0,0,,1,0,-1,0,0,2,1657616448,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,2028177266,0,0,0,0,0/$'
                    SET @invi2 = '45/42/43/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/-1/-1/1/-1/0/2/-1/-1/-1/-1/44/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    SET @invi3 = '0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/$'
                    SET @invi4 = '46/44/47/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/1/2/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'                
                    END


    English trnaslation by: HolySinX
    Spoiler:
    First off, there are two methods:
    1. Through Event.lua (Good for the ones that can't work with databases very well)
    II_SYS_BLI_TWO_TOWNBLINKWING => Item name
    5 => Amount

    =======

    2. Directly through the database (I suggest you to do this on a test-server, because it would have an empty database, and it would make things much easier)

    1. First off you'll need two characters (male and female)
    You have to equip the items. Make sure you put the items that every character should get, in your inventory.

    2. Open the CHARACTER_TBL table and write the m_idPlayer down. (make sure you write down which character has which gender, so you won't confuse anything)

    3. Now open INVENTORY_DBF and search for your character ID's

    4. At the same time, open: CHARACTER_01_DBF --> Programmability --> CHARACTER_STR --> Right-click + Modify

    5. Look for the following entry: IF @im_dwSex = '1' (that entry is for the female character)

    6. Now copy the entries of the columns: m_Inventory, m_apIndex, m_adwEquipment, m_ObjIndex

    7. Last, but not least, click on Execute.

    =================




    Heres an example for 5 Town blinkwings, 5 lollipops and 1 Biscuit
    Code:
                    IF @im_dwSex = '1'
                    BEGIN
                    SET @invi1 = '0,512,0,0,,1,0,4500000,0,0,0,-1118993182,0,0,0,0,0/1,504,0,0,,1,0,9000000,0,0,0,946307614,0,0,0,0,0/2,2801,0,0,,1,0,-1,0,0,2,1695360208,0,0,0,0,0/42,508,0,0,,1,0,5850000,0,0,0,750110947,0,0,0,0,0/43,2800,0,0,,5,0,-1,0,0,2,-440263533,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,579001730,0,0,0,0,0/$'
                    SET @invi2 = '45/43/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/-1/-1/1/-1/42/0/-1/-1/-1/-1/44/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    SET @invi3 = '0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/$'
                    SET @invi4 = '47/44/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/46/1/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    END
                    ELSE
                    BEGIN
                    SET @invi1 = '0,506,0,0,,1,0,5850000,0,0,0,-2005860201,0,0,0,0,0/1,502,0,0,,1,0,9000000,0,0,0,688242964,0,0,0,0,0/2,510,0,0,,1,0,4500000,0,0,0,583094601,0,0,0,0,0/42,2800,0,0,,5,0,-1,0,0,2,-2142136381,0,0,0,0,0/43,2801,0,0,,1,0,-1,0,0,2,1657616448,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,2028177266,0,0,0,0,0/$'
                    SET @invi2 = '45/42/43/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/-1/-1/1/-1/0/2/-1/-1/-1/-1/44/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    SET @invi3 = '0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/$'
                    SET @invi4 = '46/44/47/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/1/2/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'                
                    END

    ===

    Registerpage (mit einfachen Captcha)
    Spoiler:
    Code:
    <?php
        $MD5Code = "kikugalanet";        // Your Neuz MD5 Code
        $dbAddr = 'YOURSERVER';        // Your MSSQL Host IP
        $dbUser = 'sa';            // Your Database user
        $dbPass = 'YOURSQLPASS';        // Your Database User password
        $dbName = "ACCOUNT_DBF";        // Your Account Database
        $server_name = "FlyForEver";    // Define your Servername here
        $reg_allow = 1;            // Um Registrierung anzuschalten eine "1" hinschreiben
        if(!extension_loaded("mssql")) {
            echo "Das benötigte Modul MSSQL ist auf Ihren Server nicht aktiviert. Bitte aktivieren Sie es.";
            exit();
        }
        
        $link = mssql_connect($dbAddr, $dbUser, $dbPass) or die ("Es konnte keine Verbindung zur Datenbank hergestellt werden. Bitte überprüfen sie Ihre Einstellungen.");
        mssql_select_db($dbName, $link);
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    <head>
        <title><?php echo ('..:: '.$server_name.' - Registrierung ::..'); ?></title>
    </head>
    <body>
    <?php
    if ($reg_allow == 1) {
        
        function cleanFormData($text) {
            $data = strtolower($text);
            $data = trim($text);
            $data = htmlentities($text);
            $data = strip_tags($text);
            return $data;
        }
    
        if(isset($_POST['submit'])) {
            $userName = cleanFormData($_POST['user']);    // Username
            $userPass = cleanFormData($_POST['pass']);    // Password non-encrypted
            $userPass2 = cleanFormData($_POST['pass2']);    // Password non-encrypted
            $captcha = cleanFormData($_POST['captcha']);    // Password non-encrypted
            
            $checkUserName = mssql_query("SELECT account FROM ACCOUNT_TBL WHERE account='".$userName."'");
            
            if(empty($userName) || empty($userPass) || empty($userPass2) || empty($captcha)) {
                echo "Bitte alle Felder ausfüllen!";
            exit();
            }elseif(mssql_num_rows($checkUserName) >= 1) {
                echo "Der Nutzername <b>".$_POST['user']."</b> ist bereits in Verwendung.";
            exit();
            }elseif($_POST['pass'] != $_POST['pass2']) {
                echo "Passwörter stimmen nicht überein.";
            exit();
            }elseif($_POST['captcha'] != $_POST['captcha_check']) {
                echo "Captcha stimmt nicht.";
            exit();
            } else {
                $passHash = md5($MD5Code . $userPass);
                
                // Create a new stored prodecure
                $stmt = mssql_init("createaccount", $link);
                
                // Bind the field names
                mssql_bind($stmt, '@account', $userName, SQLVARCHAR, false, false, 15);
                mssql_bind($stmt, '@password', $passHash, SQLVARCHAR, false, false, 15);
                
                // Execute
                mssql_execute($stmt) or die ("Something is wrong on the execution");
                
                // Free statement
                mssql_free_statement($stmt);
                
                echo "Der Account <b>".$_POST['user']."</b> wurde erfolgreich erstellt!<br><br>Wir wünschen euch viel Spaß beim Spielen.";
            }
        } else {
    $zahl1 = rand(10,20); //Erste Zahl 10-20
    $zahl2 = rand(1,10);  //Zweite Zahl 1-10
    $operator = rand(1,2); // + oder -
    if($operator == "1"){
       $operatorzeichen = " + ";
       $ergebnis = $zahl1 + $zahl2;
    }else{
       $operatorzeichen = " - ";
       $ergebnis = $zahl1 - $zahl2;
    }
    $rechnung = $zahl1.$operatorzeichen.$zahl2." = ?";
    echo'
    <form method="post">
        <table border="0" cellpadding="0" cellspacing="0" >
            <tr><td width="75">Username:</td><td><input type="text" name="user" size="15" maxlenght="15" /></td></tr>
            <tr><td>Password:</td><td><input type="password" name="pass" size="15" /></td></tr>
            <tr><td><font size="-2">Passwort<br>(wiederholen)<font></td><td><input type="password" name="pass2" size="15" /></td></tr>
            <tr><td>'.$rechnung.'</td><td><input type="text" name="captcha" size="15" /></td></tr>
        <input type="hidden" name="captcha_check" value="'.$ergebnis.'">
        </table>
        <br>
            <tr><td></td><td><input type="submit" name="submit" value="Register" /></td></tr>
    </form>';
        }
    }
    else
    {
    echo 'Derzeit sind keine Registrierungen möglich!';
    exit();
    }
    ?>
    </body>
    </html>


    English translation by: Creed0116
    Spoiler:
    Code:
    <?php
        $MD5Code = "kikugalanet";        // Your Neuz MD5 Code
        $dbAddr = 'YOURHOST';        // Your MSSQL Host IP
        $dbUser = 'sa';            // Your Database user
        $dbPass = 'YOURPASSWORD';        // Your Database User password
        $dbName = "ACCOUNT_DBF";        // Your Account Database
        $server_name = "Flyff";    // Define your Servername here
        $reg_allow = 1;            // To turn on registering a write "1"
        if(!extension_loaded("mssql")) {
            echo "The required module is not enabled on your MSSQL server. Please enable it.";
            exit();
        }
        
        $link = mssql_connect($dbAddr, $dbUser, $dbPass) or die ("Could not connect to the database. Please check your settings.");
        mssql_select_db($dbName, $link);
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    <head>
        <title><?php echo ('..:: '.$server_name.' - Registration ::..'); ?></title>
    </head>
    <body>
    <?php
    if ($reg_allow == 1) {
        
        function cleanFormData($text) {
            $data = strtolower($text);
            $data = trim($text);
            $data = htmlentities($text);
            $data = strip_tags($text);
            return $data;
        }
    
        if(isset($_POST['submit'])) {
            $userName = cleanFormData($_POST['user']);    // Username
            $userPass = cleanFormData($_POST['pass']);    // Password non-encrypted
            $userPass2 = cleanFormData($_POST['pass2']);    // Password non-encrypted
            $captcha = cleanFormData($_POST['captcha']);    // Password non-encrypted
            
            $checkUserName = mssql_query("SELECT account FROM ACCOUNT_TBL WHERE account='".$userName."'");
            
            if(empty($userName) || empty($userPass) || empty($userPass2) || empty($captcha)) {
                echo "Please complete all fields!";
            exit();
            }elseif(mssql_num_rows($checkUserName) >= 1) {
                echo "The username <b>".$_POST['user']."</b> is already in use.";
            exit();
            }elseif($_POST['pass'] != $_POST['pass2']) {
                echo "Passwords do not match.";
            exit();
            }elseif($_POST['captcha'] != $_POST['captcha_check']) {
                echo "Captcha is not true.";
            exit();
            } else {
                $passHash = md5($MD5Code . $userPass);
                
                // Create a new stored prodecure
                $stmt = mssql_init("createaccount", $link);
                
                // Bind the field names
                mssql_bind($stmt, '@account', $userName, SQLVARCHAR, false, false, 15);
                mssql_bind($stmt, '@password', $passHash, SQLVARCHAR, false, false, 15);
                
                // Execute
                mssql_execute($stmt) or die ("Something is wrong on the execution");
                
                // Free statement
                mssql_free_statement($stmt);
                
                echo "The Account <b>".$_POST['user']."</b> was successfully created!<br><br>We wish you much fun playing.";
            }
        } else {
    $zahl1 = rand(10,20); //First Number 10-20
    $zahl2 = rand(1,10);  //Second number 1-10
    $operator = rand(1,2); // + Or --
    if($operator == "1"){
       $operatorzeichen = " + ";
       $ergebnis = $zahl1 + $zahl2;
    }else{
       $operatorzeichen = " - ";
       $ergebnis = $zahl1 - $zahl2;
    }
    $rechnung = $zahl1.$operatorzeichen.$zahl2." = ?";
    echo'
    <form method="post">
        <table border="0" cellpadding="0" cellspacing="0" >
            <tr><td width="75">Username:</td><td><input type="text" name="user" size="15" maxlenght="15" /></td></tr>
            <tr><td>Password:</td><td><input type="password" name="pass" size="15" /></td></tr>
            <tr><td><font size="-2">Password<br>(repeat)<font></td><td><input type="password" name="pass2" size="15" /></td></tr>
            <tr><td>'.$rechnung.'</td><td><input type="text" name="captcha" size="15" /></td></tr>
        <input type="hidden" name="captcha_check" value="'.$ergebnis.'">
        </table>
        <br>
            <tr><td></td><td><input type="submit" name="submit" value="Register" /></td></tr>
    </form>';
        }
    }
    else
    {
    echo 'Currently, no registrations are available!';
    exit();
    }
    ?>
    </body>
    </html>


    Bevor jemand sagt das das mit den Startitems von Godlikerz[MMORPG-Core] geleecht ist möchte ich vorweg sagen das Rejun und ich ein und die selbe Person sind.

    Change here the startpenya, Above the part for the startitems
    Spoiler:
    Code:
                    INSERT CHARACTER_TBL
                                (
                                    m_idPlayer,
                                    serverindex,
                                    account,
                                    m_szName,
                                    playerslot,
                                    dwWorldID,
                                    m_dwIndex,
                                    m_vScale_x,
                                    m_dwMotion,
                                    m_vPos_x,
    
                                    m_vPos_y,
                                    m_vPos_z,
                                    m_fAngle,
                                    m_szCharacterKey,
                                    m_nHitPoint,
                                    m_nManaPoint,
                                    m_nFatiguePoint,
                                    m_nFuel,
                                    m_dwSkinSet,
                                    m_dwHairMesh,
                                    m_dwHairColor,
                                    m_dwHeadMesh,
                                    m_dwSex,
                                    m_dwRideItemIdx,
                                    m_dwGold,
                                    m_nJob,
                                    m_pActMover,
                                    m_nStr,
                                    m_nSta,
                                    m_nDex,
                                    m_nInt,
                                    m_nLevel,
                                    m_nMaximumLevel,
                                    m_nExp1,
                                    m_nExp2,
                                    m_aJobSkill,
                                    m_aLicenseSkill,
                                    m_aJobLv,
                                    m_dwExpertLv,
                                    m_idMarkingWorld,
                                    m_vMarkingPos_x,
                                    m_vMarkingPos_y,
                                    m_vMarkingPos_z,
                                    m_nRemainGP,
                                    m_nRemainLP,
                                    m_nFlightLv,
                                    m_nFxp,
                                    m_nTxp,
                                    m_lpQuestCntArray,
                                    m_aCompleteQuest,
                                    m_chAuthority,
                                    m_dwMode,
                                    m_idparty,
                                    m_idCompany,
                                    --m_nNumKill,
                                    m_idMuerderer,
                                    --m_nSlaughter,
                                    m_nFame,
                                    m_nDeathExp,
                                    m_nDeathLevel,
    
                                    m_dwFlyTime,
                                    m_nMessengerState,
                                    blockby,
                                    TotalPlayTime,
                                    isblock,
                                    End_Time,
                                    BlockTime,
                                    CreateTime,
                                    m_tmAccFuel,
                                    m_tGuildMember,
                                    m_dwSkillPoint,
                                    m_dwReturnWorldID,
                                    m_vReturnPos_x,
                                    m_vReturnPos_y,
                                    m_vReturnPos_z
                                )
                    VALUES
                                (
                                    @om_idPlayer,
                                    @iserverindex,
                                    @iaccount,
                                    @im_szName,
                                    @iplayerslot,
                                    @idwWorldID,
                                    @im_dwIndex,
                                    '1',
    
                                    '0',
                                    @im_vPos_x,
                                    @im_vPos_y,
                                    @im_vPos_z,
                                    '0',
                                    @im_szCharacterKey,
                                    '230',
                                    '63',
                                    '32',
                                    -1, --m_nFuel
                                    @im_dwSkinSet,
                                    @im_dwHairMesh,
                                    @im_dwHairColor,
                                    @im_dwHeadMesh,
                                    @im_dwSex,
                                    '0',
                                    '1000', --Start Gold
                                    '0',
                                    '1,0',
                                    '15',
                                    '15',
                                    '15',
                                    '15',
                                    '1',
                                    '1', --m_nMaximumLevel
                                    '0',
                                    '0',
                                    '',
                                    '',
                                    '0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/$',
                                    '0',
                                    '0',
                                    '0',
                                    '0',
                                    '0',
                                    '0',
                                    '0',
                                    '0',
                                    '0',
                                    '0',
                                    '$',
                                    '$', -- m_aCompleteQuest
                                    'F',
                                    '131072',
                                    '0',
                                    '0', -- m_idCompany
                                    --@om_nNumKill,
                                    '0',
                                    --@om_nSlaughter,
                                    '0',
                                    '0',
                                    '0',
                                    '0'    ,
                                    '0',
                                    @oblockby,
                                    '0',
                                    'F',
                                    '200811030000',
                                    CONVERT(CHAR(8),DATEADD(d,-1,GETDATE()),112),
                                    GETDATE(),
                                    0,
                                    CONVERT(CHAR(8),DATEADD(d,-1,GETDATE()),112)
                                        + RIGHT('00' + CONVERT(VARCHAR(2),DATEPART(hh,DATEADD(d,-1,GETDATE()))),2)
                                        + RIGHT('00' + CONVERT(VARCHAR(2),DATEPART(mi,DATEADD(d,-1,GETDATE()))),2)
                                        + RIGHT('00' + CONVERT(VARCHAR(2),DATEPART(ss,DATEADD(d,-1,GETDATE()))),2),
                                    0, --m_dwSkillPoint
                                1,
                                0,
                                0,
                                0
                                )
    Last edited by Caith1991; 17-01-10 at 05:55 AM.


  2. #2
    Account Upgraded | Title Enabled! Johnatan28 is offline
    MemberRank
    Nov 2008 Join Date
    VenezuelaLocation
    299Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    in english?

  3. #3
    Valued Member Looky is offline
    MemberRank
    Apr 2009 Join Date
    142Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Thanks Caith1991

    and where change start penya please?

  4. #4
    Valued Member Looky is offline
    MemberRank
    Apr 2009 Join Date
    142Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Thanks Caith1991 but this query it's for start penya?
    Last edited by Looky; 27-11-09 at 08:53 PM.

  5. #5
    Apprentice Caith1991 is offline
    MemberRank
    Mar 2008 Join Date
    14Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    no change this in the stored procedure [CHARACTER_STR]
    if you dont know how to make this, then you should think about make a server

    Edit: Thanks Glaphan^^
    Last edited by Caith1991; 28-11-09 at 02:30 AM.

  6. #6
    Alpha Member GlaphanKing is offline
    MemberRank
    Sep 2008 Join Date
    World of MorrowLocation
    2,594Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    I merged your posts so that everything is in the same spot.

  7. #7
    Valued Member Looky is offline
    MemberRank
    Apr 2009 Join Date
    142Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    that is why I ask

  8. #8
    Member thennek501 is offline
    MemberRank
    Oct 2007 Join Date
    Digos City(PhilLocation
    99Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    can someone explain what this means???
    0,512,0,0,,1,0,4500000,0,0,0,-1118993182,0,0,0,0,0/1,504,0,0,,1,0,9000000,0,0,0,946307614,0,0,0,0,0/2,2801,0,0,,1,0,-1,0,0,2,1695360208,0,0,0,0,0/42,26809,0,0,,1,0,5850000,0,0,0,750110947,0,0,0,0,0/43,2800,0,0,,5,0,-1,0,0,2,-440263533,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,579001730,0,0,0,0,0/$

  9. #9
    That Old Flyffer creed0116 is offline
    MemberRank
    Dec 2008 Join Date
    BotsmallLocation
    412Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Quote Originally Posted by thennek501 View Post
    can someone explain what this means???
    0,512,0,0,,1,0,4500000,0,0,0,-1118993182,0,0,0,0,0/1,504,0,0,,1,0,9000000,0,0,0,946307614,0,0,0,0,0/2,2801,0,0,,1,0,-1,0,0,2,1695360208,0,0,0,0,0/42,26809,0,0,,1,0,5850000,0,0,0,750110947,0,0,0,0,0/43,2800,0,0,,5,0,-1,0,0,2,-440263533,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,579001730,0,0,0,0,0/$
    thats for the startiing penya


    Spoiler:
    Code:
    <?php
        $MD5Code = "kikugalanet";        // Your Neuz MD5 Code
        $dbAddr = 'YOURHOST';        // Your MSSQL Host IP
        $dbUser = 'sa';            // Your Database user
        $dbPass = 'YOURPASSWORD';        // Your Database User password
        $dbName = "ACCOUNT_DBF";        // Your Account Database
        $server_name = "Flyff";    // Define your Servername here
        $reg_allow = 1;            // To turn on registering a write "1"
        if(!extension_loaded("mssql")) {
            echo "The required module is not enabled on your MSSQL server. Please enable it.";
            exit();
        }
        
        $link = mssql_connect($dbAddr, $dbUser, $dbPass) or die ("Could not connect to the database. Please check your settings.");
        mssql_select_db($dbName, $link);
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    <head>
        <title><?php echo ('..:: '.$server_name.' - Registration ::..'); ?></title>
    </head>
    <body>
    <?php
    if ($reg_allow == 1) {
        
        function cleanFormData($text) {
            $data = strtolower($text);
            $data = trim($text);
            $data = htmlentities($text);
            $data = strip_tags($text);
            return $data;
        }
    
        if(isset($_POST['submit'])) {
            $userName = cleanFormData($_POST['user']);    // Username
            $userPass = cleanFormData($_POST['pass']);    // Password non-encrypted
            $userPass2 = cleanFormData($_POST['pass2']);    // Password non-encrypted
            $captcha = cleanFormData($_POST['captcha']);    // Password non-encrypted
            
            $checkUserName = mssql_query("SELECT account FROM ACCOUNT_TBL WHERE account='".$userName."'");
            
            if(empty($userName) || empty($userPass) || empty($userPass2) || empty($captcha)) {
                echo "Please complete all fields!";
            exit();
            }elseif(mssql_num_rows($checkUserName) >= 1) {
                echo "The username <b>".$_POST['user']."</b> is already in use.";
            exit();
            }elseif($_POST['pass'] != $_POST['pass2']) {
                echo "Passwords do not match.";
            exit();
            }elseif($_POST['captcha'] != $_POST['captcha_check']) {
                echo "Captcha is not true.";
            exit();
            } else {
                $passHash = md5($MD5Code . $userPass);
                
                // Create a new stored prodecure
                $stmt = mssql_init("createaccount", $link);
                
                // Bind the field names
                mssql_bind($stmt, '@account', $userName, SQLVARCHAR, false, false, 15);
                mssql_bind($stmt, '@password', $passHash, SQLVARCHAR, false, false, 15);
                
                // Execute
                mssql_execute($stmt) or die ("Something is wrong on the execution");
                
                // Free statement
                mssql_free_statement($stmt);
                
                echo "The Account <b>".$_POST['user']."</b> was successfully created!<br><br>We wish you much fun playing.";
            }
        } else {
    $zahl1 = rand(10,20); //First Number 10-20
    $zahl2 = rand(1,10);  //Second number 1-10
    $operator = rand(1,2); // + Or --
    if($operator == "1"){
       $operatorzeichen = " + ";
       $ergebnis = $zahl1 + $zahl2;
    }else{
       $operatorzeichen = " - ";
       $ergebnis = $zahl1 - $zahl2;
    }
    $rechnung = $zahl1.$operatorzeichen.$zahl2." = ?";
    echo'
    <form method="post">
        <table border="0" cellpadding="0" cellspacing="0" >
            <tr><td width="75">Username:</td><td><input type="text" name="user" size="15" maxlenght="15" /></td></tr>
            <tr><td>Password:</td><td><input type="password" name="pass" size="15" /></td></tr>
            <tr><td><font size="-2">Password<br>(repeat)<font></td><td><input type="password" name="pass2" size="15" /></td></tr>
            <tr><td>'.$rechnung.'</td><td><input type="text" name="captcha" size="15" /></td></tr>
        <input type="hidden" name="captcha_check" value="'.$ergebnis.'">
        </table>
        <br>
            <tr><td></td><td><input type="submit" name="submit" value="Register" /></td></tr>
    </form>';
        }
    }
    else
    {
    echo 'Currently, no registrations are available!';
    exit();
    }
    ?>
    </body>
    </html>

    of here is the English Version of the Registration Page!!! Thanks Caith
    Last edited by creed0116; 11-12-09 at 11:47 AM. Reason: ^_^m

  10. #10
    Enthusiast gmerindol is offline
    MemberRank
    Nov 2009 Join Date
    31Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Good job dude!
    Last edited by gmerindol; 12-12-09 at 06:26 AM.

  11. #11
    Account Upgraded | Title Enabled! maisqueporra is offline
    MemberRank
    Sep 2006 Join Date
    251Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    i understand the script for start item,lol anyone can post in english ?

  12. #12
    Valued Member uneprobleme is offline
    MemberRank
    Nov 2009 Join Date
    117Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    dduuuhh? was heisst denn das?

    Das benötigte Modul MSSQL ist auf Ihren Server nicht aktiviert. Bitte aktivieren Sie es.

  13. #13
    Apprentice Caith1991 is offline
    MemberRank
    Mar 2008 Join Date
    14Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Thanks Creed for the translation, I will add this to the first post^^

  14. #14
    Account Upgraded | Title Enabled! HolySinX is offline
    MemberRank
    Sep 2008 Join Date
    LocalhostLocation
    787Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Heres a translation of that Start items thingy. Of course I translated it by myself. (Might not be that accurate, because the sentences that Caith wrote were "unusual" sentences)

    Start items
    Spoiler:
    First off, there are two methods:
    1. Through Event.lua (Good for the ones that can't work with databases very well)
    II_SYS_BLI_TWO_TOWNBLINKWING => Item name
    5 => Amount

    =======

    2. Directly through the database (I suggest you to do this on a test-server, because it would have an empty database, and it would make things much easier)

    1. First off you'll need two characters (male and female)
    You have to equip the items. Make sure you put the items that every character should get, in your inventory.

    2. Open the CHARACTER_TBL table and write the m_idPlayer down. (make sure you write down which character has which gender, so you won't confuse anything)

    3. Now open INVENTORY_DBF and search for your character ID's

    4. At the same time, open: CHARACTER_01_DBF --> Programmability --> CHARACTER_STR --> Right-click + Modify

    5. Look for the following entry: IF @im_dwSex = '1' (that entry is for the female character)

    6. Now copy the entries of the columns: m_Inventory, m_apIndex, m_adwEquipment, m_ObjIndex

    7. Last, but not least, click on Execute.

    =================




    Heres an example for 5 Town blinkwings, 5 lollipops and 1 Biscuit
    Code:
                    IF @im_dwSex = '1'
                    BEGIN
                    SET @invi1 = '0,512,0,0,,1,0,4500000,0,0,0,-1118993182,0,0,0,0,0/1,504,0,0,,1,0,9000000,0,0,0,946307614,0,0,0,0,0/2,2801,0,0,,1,0,-1,0,0,2,1695360208,0,0,0,0,0/42,508,0,0,,1,0,5850000,0,0,0,750110947,0,0,0,0,0/43,2800,0,0,,5,0,-1,0,0,2,-440263533,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,579001730,0,0,0,0,0/$'
                    SET @invi2 = '45/43/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/-1/-1/1/-1/42/0/-1/-1/-1/-1/44/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    SET @invi3 = '0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/$'
                    SET @invi4 = '47/44/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/46/1/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    END
                    ELSE
                    BEGIN
                    SET @invi1 = '0,506,0,0,,1,0,5850000,0,0,0,-2005860201,0,0,0,0,0/1,502,0,0,,1,0,9000000,0,0,0,688242964,0,0,0,0,0/2,510,0,0,,1,0,4500000,0,0,0,583094601,0,0,0,0,0/42,2800,0,0,,5,0,-1,0,0,2,-2142136381,0,0,0,0,0/43,2801,0,0,,1,0,-1,0,0,2,1657616448,0,0,0,0,0/44,21,0,0,,1,0,7200000,0,0,0,-2111939376,0,0,0,0,0/45,4805,0,0,,5,0,-1,0,0,2,2028177266,0,0,0,0,0/$'
                    SET @invi2 = '45/42/43/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/-1/-1/1/-1/0/2/-1/-1/-1/-1/44/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'
                    SET @invi3 = '0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/$'
                    SET @invi4 = '46/44/47/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/1/2/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$'                
                    END

    ===
    Last edited by HolySinX; 13-12-09 at 06:46 PM.

  15. #15
    That Old Flyffer creed0116 is offline
    MemberRank
    Dec 2008 Join Date
    BotsmallLocation
    412Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Quote Originally Posted by Caith1991 View Post
    Thanks Creed for the translation, I will add this to the first post^^
    welcome..^_^ its my pleasure to help

  16. #16
    Apprentice Markiska is offline
    MemberRank
    Feb 2009 Join Date
    10Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Are that for v14 Server Files / Database?
    ____

    Ist das für v14 Server Files / Datenbank ?
    Last edited by Markiska; 02-01-10 at 12:54 PM.

  17. #17
    Apprentice Caith1991 is offline
    MemberRank
    Mar 2008 Join Date
    14Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    grundbau ist in v14 genauso aber vorher lieber immer ein backup machen^^

    @HolySinX ty i will edit the translation in my first post

  18. #18
    Member djhulk001 is offline
    MemberRank
    Jan 2010 Join Date
    Homestead, FlorLocation
    84Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    i get
    The required module is not enabled on your MSSQL server. Please enable it.

    anything wrong? i did everything right

  19. #19
    Account Upgraded | Title Enabled! ryuchao009 is offline
    MemberRank
    Feb 2009 Join Date
    United StatesLocation
    601Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Quote Originally Posted by djhulk001 View Post
    i get
    The required module is not enabled on your MSSQL server. Please enable it.

    anything wrong? i did everything right
    There is one significant thing wrong.

    You just necro posted!

  20. #20
    Member djhulk001 is offline
    MemberRank
    Jan 2010 Join Date
    Homestead, FlorLocation
    84Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Quote Originally Posted by ryuchao009 View Post
    There is one significant thing wrong.

    You just necro posted!
    sorry about that. i was just needing some help i have been looking and could not find one that works. sorry.

  21. #21
    Account Upgraded | Title Enabled! ecKo9321 is offline
    MemberRank
    Nov 2009 Join Date
    forum.ragezoneLocation
    491Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Quote Originally Posted by djhulk001 View Post
    i get
    The required module is not enabled on your MSSQL server. Please enable it.

    anything wrong? i did everything right
    lol necro poster, at least now i can post

    you did everything right my ass

    "The required module is not enabled on your MSSQL server. Please enable it." IS TELLING YOU SOMETHING?

    Noob ~~

    Quote Originally Posted by RayWIlliamJohnson
    That reply was FAKE and GAY

  22. #22
    Member djhulk001 is offline
    MemberRank
    Jan 2010 Join Date
    Homestead, FlorLocation
    84Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    just delete my posts and say i was never here. but it is great coding. thanks. :)

  23. #23
    Now you can tag me! Detox is offline
    MemberRank
    May 2009 Join Date
    NorwayLocation
    1,821Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    Quote Originally Posted by djhulk001 View Post
    just delete my posts and say i was never here. but it is great coding. thanks. :)
    LOL, Okai :)

    Nice bump.

  24. #24
    Proficient Member oOBlissOo is offline
    MemberRank
    Feb 2010 Join Date
    svchost.exeLocation
    157Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    lolz i know from experience this regipage is extremely vulnerable to sql injections took me awhile to fix it <_<

  25. #25
    Member caspaas is offline
    MemberRank
    Sep 2008 Join Date
    74Posts

    Re: How to add Startitems (Offi) + Register(Captcha)

    The required module is not enabled on your MSSQL server. Please enable it. help me here



Page 1 of 2 12 LastLast

Advertisement