Jump to content

Recommended Posts

Posted

hello i have reg script and change password and i dont know how i can add to "regscript" option "meil and accept rules" this is reg script:

 

//////////////////////////// PHP ////////////////////////////////////////

 

<?php

//set host, username and password for MySQL

$dbhost = "localhost";

$dbuser = "root";

$dbpass = "";

 

//connect to MySQL or return an error

$conn = mysql_connect("$dbhost", "$dbuser", "$dbpass")

or die('Could not connect: ' . mysql_error());

 

//set database name

$dbname = "l2jdb";

 

//select database or return an error

$dbselect = mysql_select_db("$dbname") 

or die ('Could not select database');

 

//get username and password info from the form, protecting against SQL injection

$pass = mysql_real_escape_string($_POST["pass"]);

$confirm = mysql_real_escape_string($_POST["confirm"]);

$user = mysql_real_escape_string($_POST["name"]);

 

//validate user input

if(!preg_match('/^[a-zA-Z0-9]{5,20}$/',$user)) {

die ('Error: Usernames can only contain alphanumeric characters and must be between 5 and 20 characters in length.');

}

 

if(!preg_match('/^[a-zA-Z0-9]{5,20}$/',$pass)) {

die ('Error: Passwords can only contain alphanumeric characters and must be between 5 and 20 characters in length.');

}

 

if($pass != $confirm) {

die ('Error: Passwords do not match.');

}

 

//make sure user doesn't already exist and if it doesn't, add new record to the database

$result = mysql_query("SELECT login FROM accounts WHERE login='$user'");

 

if(mysql_num_rows($result)>0) {

die ('Error: Username already exists.');

}else{

mysql_query("INSERT INTO accounts (login, password, access_level) VALUES ('".$_POST['name']."', '".base64_encode(pack('H*', sha1($_POST['pass'])))."', 0)")

or die ('Error: ' . mysql_error());

}

 

//report successful registration

echo "Account created successfully.";

 

//close MySQL connection

mysql_close();

 

?>

 

/////////////////////////////////  HTML ///////////////////////////////////////

 

<center>

<p> </p>

<p> </p>

<p> </p>

 

<b>Register New Account</b>

<p> </p>

<form action="regphp.php" method="post">

UserID: <br>

<input type="text" name="name" style=""/><br />

Password: <br>

<input type="password" name="pass" style=""/><br />

Confirm Password: <br>

<input type="password" name="confirm" style=""/><br />

 

<input type="submit" name="submit" value="Create"><br><br>

 

</form>

</center>

 

 

And how how i can create "reset password script" i write login and email, and base send me email whith my new password. Wait for answer :)

Posted

hello i have reg script and change password and i dont know how i can add to "regscript" option "meil and accept rules" this is reg script:

 

 

 

 

//////////////////////////// PHP ////////////////////////////////////////

 

<?php

//set host, username and password for MySQL

$dbhost = "localhost";

$dbuser = "root";

$dbpass = "";

 

//connect to MySQL or return an error

$conn = mysql_connect("$dbhost", "$dbuser", "$dbpass")

or die('Could not connect: ' . mysql_error());

 

//set database name

$dbname = "l2jdb";

 

//select database or return an error

$dbselect = mysql_select_db("$dbname") 

or die ('Could not select database');

 

//get username and password info from the form, protecting against SQL injection

$pass = mysql_real_escape_string($_POST["pass"]);

$confirm = mysql_real_escape_string($_POST["confirm"]);

$user = mysql_real_escape_string($_POST["name"]);

 

//validate user input

if(!preg_match('/^[a-zA-Z0-9]{5,20}$/',$user)) {

die ('Error: Usernames can only contain alphanumeric characters and must be between 5 and 20 characters in length.');

}

 

if(!preg_match('/^[a-zA-Z0-9]{5,20}$/',$pass)) {

die ('Error: Passwords can only contain alphanumeric characters and must be between 5 and 20 characters in length.');

}

 

if($pass != $confirm) {

die ('Error: Passwords do not match.');

}

 

//make sure user doesn't already exist and if it doesn't, add new record to the database

$result = mysql_query("SELECT login FROM accounts WHERE login='$user'");

 

if(mysql_num_rows($result)>0) {

die ('Error: Username already exists.');

}else{

mysql_query("INSERT INTO accounts (login, password, access_level) VALUES ('".$_POST['name']."', '".base64_encode(pack('H*', sha1($_POST['pass'])))."', 0)")

or die ('Error: ' . mysql_error());

}

 

//report successful registration

echo "Account created successfully.";

 

//close MySQL connection

mysql_close();

 

?>

 

/////////////////////////////////  HTML ///////////////////////////////////////

 

<center>

<p> </p>

<p> </p>

<p> </p>

 

<b>Register New Account</b>

<p> </p>

<form action="regphp.php" method="post">

UserID: <br>

<input type="text" name="name" style=""/><br />

Password: <br>

<input type="password" name="pass" style=""/><br />

Confirm Password: <br>

<input type="password" name="confirm" style=""/><br />

 

<input type="submit" name="submit" value="Create"><br><br>

 

</form>

</center>

 

 

And how how i can create "reset password script" i write login and email, and base send me email whith my new password. Wait for answer :)

 

 

do  javy  reg  ?  po co w jave rejestracja ?

Posted

Pl: Do rejestracji to chyba logiczne? Nie każdy daje autokreacje kont. I na przyszlosc to angielskie forum :)

En: For registration unless it logical? Not everyone gives a self-creation of accounts. And the future this is international forum.

Posted

Pl: Do rejestracji to chyba logiczne? Nie każdy daje autokreacje kont. I na przyszlosc to angielskie forum :)

En: For registration unless it logical? Not everyone gives a self-creation of accounts. And the future this is international forum.

 

 

"uhm"

Posted

Just add a new option with radio button, and right behind it is the rule link.

Then create a procedure that control the radio button, like if the button is blank then print a message etc...

And about the mail check, you must have the mail service to do so.

Everything can be done using your Javascript/PHP knowledge.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • I think that solves the freeze thing, anyway great share! 
    • Introducing: Daily & Weekly Missions!   I've released a major panel update with a new Missions system and expanded language support.   Players can now complete daily and weekly missions directly through the panel and claim rewards such as balance or items. Mission progress is tied to in-game activity and supported panel actions, and the update also adds a dedicated Missions page, dashboard mission previews, claimable mission indicators, and full admin tools for creating and managing missions.   The Roll page now shows the potential reward drops below the roll container.   Alongside this, I’ve expanded the panel’s language support with new locale options, including Bulgarian, Czech, Georgian, Lithuanian, Polish, Romanian, Japanese, Simplified Chinese, and Traditional Chinese.     The Demo is now updated with the new features for you to try out!
    • I sell complete packs. If you want to add an item, NPC, etc., you have to do that yourselves. Your friend bought the pack; he's the one who needs to configure his server type. He received what he bought as agreed, and I'm saying this without knowing who you're talking about, because anyone who buys something receives what was agreed upon.   Regards. mmmmm L2Velmore ????   If that's the one, I see everything went well... if I remember correctly you were crying over $100, I gave you a better price, and I suppose you made thousands with that... And you're still coming back to complain? :=)
    • I know many people have struggled with this specific issue and had trouble setting up the correct behavior for Toggle skills in aCis. By default, toggles interrupt the player's movement (retail-like), which often feels clunky to players who prefer a smoother, more modern experience. I've prepared a clean solution that eliminates this "freeze" and allows for fluid movement while toggling your auras. Below is the code on how to achieve this. Hope it helps! Changes in PlayerAI.java: Modified doActiveIntention to properly update the active state without stalling. Removed the forced stop() during toggle casting. Added a MoveToLocation broadcast to ensure other players see your movement correctly (prevents visual "teleporting" or desync). Best regards 😃 diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java index ba0425a..1b2658d 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java @@ -28,6 +28,7 @@  import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;  import net.sf.l2j.gameserver.network.serverpackets.AutoAttackStart;  import net.sf.l2j.gameserver.network.serverpackets.ChairSit; +import net.sf.l2j.gameserver.network.serverpackets.MoveToLocation;  import net.sf.l2j.gameserver.network.serverpackets.MoveToLocationInVehicle;  import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn;  import net.sf.l2j.gameserver.network.serverpackets.StopMove; @@ -159,7 +160,10 @@      @Override      public synchronized void doActiveIntention()      { -        doIdleIntention(); +        prepareIntention(); +        _currentIntention.updateAsActive(); +        if (!getActor().isMoving()) +            thinkIdle();      }            @Override @@ -280,8 +284,9 @@                    if (skill.isToggle())          { -            getActor().getMove().stop();              getActor().getCast().doToggleCast(skill, target); +            if (getActor().isMoving()) +                getActor().broadcastPacket(new MoveToLocation(getActor()));          }          else          { https://pastebin.com/twZujZ3Y
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..