Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Flyff Register Script

Newbie Spellweaver
Joined
Sep 11, 2007
Messages
84
Reaction score
17
Here a working Register Script we made for the flyff web we are working on and maby some wants it

flyff-madweb-web on ragezone

Code:
<?php
$Flyff_config["mysql_host"]="localhost";    // MySQL IP
$Flyff_config["mysql_port"]=3306;        // MySQP port
$Flyff_config["mysql_db"]="madwebtest";        // Flyff Database name
$Flyff_config["mysql_login"]="madgizmo";        // MySQL Login name    
$Flyff_config["mysql_password"]="mw2";        // MySQL Password

error_reporting(0);
?>
<?php
$Flyff_config["javascript_sort_method"]="bubble";
$link = mysql_connect($Flyff_config['mysql_host'].":".$Flyff_config['mysql_port'], $Flyff_config['mysql_login'], $Flyff_config['mysql_password']);
 if (!$link) die("Couldn't connect to MySQL");
@mysql_select_db($Flyff_config['mysql_db'], $link)
or die ('Error '.mysql_errno().': '.mysql_error());

?>

<script type="text/javascript">//<![CDATA[
function isAlphaNumeric(value)
{
  if (value.match(/^[a-zA-Z0-9]+$/))
    return true;
  else
    return false;
}
function checkform(f)
{
  if (f.account.value=="")
  {
    alert("Fill in all fields Please"); return false;
  }
  if (!isAlphaNumeric(f.account.value))
  {
    alert("Fill in all fields");  return false;
  }
  if (f.password.value=="")
  {
    alert("No password ");  return false;
  }
  if (!isAlphaNumeric(f.password.value))
  {
    alert("444444");  return false;
  }
  if (f.password2.value=="")
  {
    alert("You didnt repeat a password");
    return false;
  }
  if (f.password.value!=f.password2.value)
  {
    alert("Not the same password ");
    return false; 
  }
  return true;
}
//]]>



</script>
<form method="post" action="index.php?op=reg" onsubmit="return checkform(this)">
<table>
  <td><b><font face="Trebuchet MS" color="white" size="1">Login</font></b></td>
  <td><font face="Trebuchet MS" size="1"><b>
  <input type="text" name="account" maxlength="15" size="10" /></b></font></td>

  <td><b><font face="Trebuchet MS" color="white" size="1">Password</font></b></td>
  <td><font face="Trebuchet MS" size="1"><b>
  <input type="password" name="password" maxlength="15" size="10" /></b></font></td>

  <td><b><font face="Trebuchet MS" color="white" size="1">Repeat </font></b></td>
  <td><font face="Trebuchet MS" size="1"><b>
  <input type="password" name="password2" maxlength="15" size="10" /></b></font></td>

  <td colspan="2" style="text-align: center;">
  <font size="1" face="Trebuchet MS"><b>
  <input type="submit" name="submit" value="Register" /></b></font></td>
 </tr>
</table>
</form>

<?php
if(ereg("^([a-zA-Z0-9_-])*$", $_POST['account']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password2']))
{
    if ($page="index.php" && $_POST['account'] && strlen($_POST['account'])<16 && strlen($_POST['account'])>3 && $_POST['password'] && $_POST['password2'] && $_POST['password']==$_POST['password2'])
    {    
        $check=mysql_query("select * from accounts where username='".$_POST['account']."'");
        $check1=mysql_num_rows($check);
        if($check1>0)
        {
            echo "<p clss='error'><b>An account already with that login please try oneother </b></p>";
        }
        else
        {
              mysql_query("INSERT INTO accounts (username, password, accesslevel) VALUES ('".$_POST['account']."', '".base64_encode(pack('H*', sha1($_POST['password'])))."', 0)", $link);
              mysql_close($link);
             print '<p class="error"><b><center>Registration successful Have fun on our Flyff server</center></b></p>';
        }
    }
    else
    {
      print '<p class="error"><b> </b></p>'.mysql_error();
    }
}
else
{
    echo "Error Plz try again.";
}
?>
</font>
</body>
</html>
 

Attachments

You must be registered for see attachments list
Elite Diviner
Joined
Nov 6, 2009
Messages
473
Reaction score
44
You fail.

1st, we are using official files

2nd, for official, we are using MSSQL.



And we already have lots of register scriptz so

baibai
 
Divine Celestial
Joined
May 2, 2009
Messages
862
Reaction score
179
You fail.

1st, we are using official files

2nd, for official, we are using MSSQL.



And we already have lots of register scriptz so

baibai

YOU fail.

1. At least he TRIED making a register script.
2. We can use as many register scripts needed, apparently, he tried making one, but failed badly o_o

Yeah, We use Official files - MSSQL.
 
Master Summoner
Joined
Feb 24, 2009
Messages
590
Reaction score
63
ok that was a fairly sad attempt at a register page. But it's not terrible if you're just learning the language. As it's already been mentioned, the official files use mssql and the encryption used for flyff is md5.

If you're just starting off, look at some of the other register scripts released here and learn from their code. Google and Youtube are also your friends when trying to learn languages.

Get a little experience under your belt, write some scripts on your own and TEST THEM with the official files, then release them if you feel inclined to do so. Don't release it until it's complete, or it's gonna get shot down and flamed to death (like this one did)

Off topic: Woot 300th post XD
 
Last edited:
Newbie Spellweaver
Joined
Sep 11, 2007
Messages
84
Reaction score
17
i dont have a flyff server and i asked someone for the sql so i coult work on a web for flyff
so i am working with it if its not the correct one then srry but i did not know only thing i know it works with the sql i got
 
Master Summoner
Joined
Feb 24, 2009
Messages
590
Reaction score
63
Then the database your friend gave you does not correspond to the official files. It's either a Caali database or it's for an emulator. That's great that it works, but it's kinda useless to release the scripting code then since none of us know what server files it's for.

At the very least, find out what server files the database is for and edit your first post, so people don't assume it's for the official files then witch when it doesn't work.
 
Newbie Spellweaver
Joined
Dec 24, 2006
Messages
71
Reaction score
37
Scripting is fine, knowledge of flyff is off. Tbh, you don't really need to change what type of data is in a password, just check if its an array and etc validation check but no point in check the characters themselves. Not everyone likes to be restricted to what they can put in their password.
 
Back
Top