|
You last visited: Today at 17:49
Advertisement
[Release] PHP Script Center
Discussion on [Release] PHP Script Center within the Dekaron Private Server forum part of the Dekaron category.
10/11/2009, 09:55
|
#1
|
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
|
[Release] PHP Script Center
|
|
|
10/11/2009, 10:52
|
#2
|
elite*gold: 20
Join Date: Dec 2007
Posts: 1,451
Received Thanks: 840
|
Listing online GMs script (Can be given to public, to quickly find a GM.)
PHP Code:
<?php
/* -------------{The online GMs listing page by Zombe}------------- */
$MSSQLserverIP = 'localhost'; // IP goes here
$MSSQLusername = 'sa'; // MSSQL username goes here
$MSSQLpassword = 'password'; // MSSQL password goes here
// Don't edit below if you don't know what you are doing.
$link = mssql_connect ("$MSSQLserverIP", "$MSSQLusername", "$MSSQLpassword");
if(!$link)
{
die('Something went wrong while connecting to MSSQL');
}
$result1 = mssql_query("
SELECT * FROM character.dbo.user_character
WHERE
login_time > logout_time
AND character_name LIKE '_GM%'
",$link);
$row1 = mssql_fetch_array($result1);
$isgmon = $row1[character_name];
if ($isgmon)
{
echo "
<center>
<b><font size = 5>GMs online:</font><b><br><table border='1'><p> 
<tr>
<td align='center'><b>Char. Name</b></td>
<td align='center'><b>Class</b></td>
</tr>
";
$result = mssql_query("
SELECT * FROM character.dbo.user_character
WHERE
login_time > logout_time
AND character_name LIKE '_GM%'
",$link);
while ($record = mssql_fetch_array($result))
{
if ($record[byPCClass] == 0) $class = 'Azure Knight';
if ($record[byPCClass] == 1) $class = 'Segita Hunter';
if ($record[byPCClass] == 2) $class = 'Incar Magician';
if ($record[byPCClass] == 3) $class = 'Vicious Summoner';
if ($record[byPCClass] == 4) $class = 'Segnale';
if ($record[byPCClass] == 5) $class = 'Bagi Warrior';
if ($record[byPCClass] == 6) $class = 'Aloken';
echo "
<tr>
<td align='center'>$record[character_name]</td>
<td align='center'>$class</td>
</tr>
";
}
echo '</center>';
}
else echo '<center><b><font size = 5>Currently no GMs online.</font></b></center>';
?>
Listing online characters script (Probably for GM/Admin use only.)
PHP Code:
<?php
/* -------------{The online characters listing page by Zombe}------------- */
$MSSQLserverIP = 'localhost'; // IP goes here
$MSSQLusername = 'sa'; // MSSQL username goes here
$MSSQLpassword = 'passqord'; // MSSQL password goes here
// Don't edit below if you don't know what you are doing.
$link = mssql_connect ("$MSSQLserverIP", "$MSSQLusername", "$MSSQLpassword");
if(!$link)
{
die('Something went wrong while connecting to MSSQL');
}
$result1 = mssql_query("
SELECT * FROM character.dbo.user_character
WHERE
login_time > logout_time
AND character_name LIKE '_GM%'
",$link);
$row1 = mssql_fetch_array($result1);
$isgmon = $row1[character_name];
if ($isgmon)
{
echo "
<center>
<b><font size = 5>GMs online:</font><b><br><table border='1'><p> 
<tr>
<td align='center'><b>Char. Name</b></td>
<td align='center'><b>Class</b></td>
</tr>
";
$result = mssql_query("
SELECT * FROM character.dbo.user_character
WHERE
login_time > logout_time
AND character_name LIKE '_GM%'
",$link);
while ($record = mssql_fetch_array($result))
{
if ($record[byPCClass] == 0) $class = 'Azure Knight';
if ($record[byPCClass] == 1) $class = 'Segita Hunter';
if ($record[byPCClass] == 2) $class = 'Incar Magician';
if ($record[byPCClass] == 3) $class = 'Vicious Summoner';
if ($record[byPCClass] == 4) $class = 'Segnale';
if ($record[byPCClass] == 5) $class = 'Bagi Warrior';
if ($record[byPCClass] == 6) $class = 'Aloken';
echo "
<tr>
<td align='center'>$record[character_name]</td>
<td align='center'>$class</td>
</tr>
";
}
echo '</center>';
}
else echo '<center><b><font size = 5>Currently no GMs online.</font></b></center>';
?>
|
|
|
10/11/2009, 13:21
|
#3
|
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
|
FRESH FROM THE PRESS !
Send emails to players from players
Download:
Allows players to send emails to other players there post box tru PHP script
just message without DIL or ITEM
WITH user check, to see if the name DOES exist or not
Screenshot:
Have fun !
|
|
|
10/11/2009, 22:34
|
#4
|
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
|
Is there any chance to write a script that it would be possible to send gm commands not entering into the game as GM? I mean simple gm commands like /gm expratio or /gm itemdropratio.
|
|
|
10/11/2009, 23:44
|
#5
|
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
|
gedimazs, i dont think its possible
Just finished
PHP Register page without odbc
PHP Code:
<?php
// fill in your mssql info here
$mssql = array(
'host' => "localhost",
'user' => "sa",
'pass' => "server"
);
echo "<center>";
if($_POST['activ'] == '1') {
$ms_con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
$result1 = mssql_query("SELECT * FROM account.dbo.USER_PROFILE WHERE user_id = '".$_POST['accname']."'",$ms_con);
$result2 = mssql_query("SELECT * FROM account.dbo.Tbl_user WHERE user_id = '".$_POST['accname']."'",$ms_con);
$result3 = mssql_query("SELECT * FROM account.dbo.Tbl_user WHERE user_mail = '".$_POST['accmail']."'",$ms_con);
$row1 = mssql_num_rows($result1);
$row2 = mssql_num_rows($result2);
$row3 = mssql_num_rows($result3);
$dk_time=strftime("%y%m%d%H%M%S");
list($usec1, $sec1) = explode(" ",microtime());
$dk_user_no=$dk_time.substr($usec1,2,2);
if(empty($_POST['accname']) || empty($_POST['accpass1']) || empty($_POST['accpass2'])|| empty($_POST['accname']) || empty($_POST['accmail'])) {
echo "<br>You didnt fill in all fields<a href='javascript:history.back()'>Go Back</a>";
} elseif($row1 > '0' || $row2 > '0') {
echo "<br>This Account name already exists.<a href='javascript:history.back()'>Go Back</a>";
} elseif($row3 > '0') {
echo "<br>This E-Mail is already in use.<a href='javascript:history.back()'>Go Back</a>";
} elseif($_POST['accpass1'] != $_POST['accpass2']) {
echo "<br>The passwords did not match<a href='javascript:history.back()'>Go Back</a>";
} elseif($_POST['accpass1'] == $_POST['accname']) {
echo "<br>Account name and password are the same.<a href='javascript:history.back()'>Go Back</a>";
} elseif(!preg_match("/^[0-9a-zA-Z]{3,15}$/i", $_POST['accname'])) {
echo "<br>Enter a account name only with 0-9 , a-z and A-Z.<a href='javascript:history.back()'>Go Back</a>";
} elseif(!preg_match("/^[0-9a-zA-Z]{3,15}$/i", $_POST['accpass1'])) {
echo "<br>Enter a password only with 0-9 , a-z and A-Z.<a href='javascript:history.back()'>Go Back</a>";
} elseif(!preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i",$_POST['accmail'])) {
echo "<br>Your e-Mail is not correct.<a href='javascript:history.back()'>Go Back</a>";
} elseif(strlen($_POST['accname']) < 3 || strlen($_POST['accname']) > 15) {
echo "<br>The Accountname must at least 3 indications long and may maximally 15 indications long.<a href='javascript:history.back()'>Go Back</a>";
} elseif(strlen($_POST['accpass1']) < 3 || strlen($_POST['accpass1']) > 15) {
echo "<br>The Password must at least 3 indications long and may maximally 15 indications long.<a href='javascript:history.back()'>Go Back</a>";
} else {
$accpass = md5($_POST['accpass1']);
mssql_query("INSERT INTO account.dbo.USER_PROFILE (user_no,user_id,user_pwd,resident_no,user_type,login_flag,login_tag,ipt_time,login_time,logout_time,user_ip_addr,server_id) VALUES ('$dk_user_no','".$_POST['accname']."','".$accpass."','801011000000','1','0','Y','".$date."',null,null,null,'000')",$ms_con);
mssql_query("INSERT INTO account.dbo.Tbl_user (user_no,user_id,user_pwd,user_mail,user_answer,user_question) VALUES ('$dk_user_no','".$_POST['accname']."','".$_POST['accpass1']."','".$_POST['accmail']."','0','0')",$ms_con);
echo "<center><b><u>The account was successfully created. Have fun !</b></u></center><br><br>";
echo "<center>Here is your login info again:</center>";
echo "<center>Your account name is: <b>".$_POST['accname']."</b></center>";
echo "<center>Your password is: <b>".$_POST['accpass1']."</b></center>";
echo "DO NOT LOOSE THIS INFO, YOU MAY WRITE IS DOWN AND HIDE IT";
}
} else {
$ms_con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
$result1 = mssql_query("SELECT * FROM account.dbo.USER_PROFILE",$ms_con);
$row1 = mssql_num_rows($result1);
echo "<center><b><u>This time we have ".$row1." Registed Accounts on our Server<br>Join us.</b></u></center><br>";
echo "<form action='".$_SEVER['PHP_SELF']."' method='POST'>";
echo "<center><table>";
echo "<tr><td colspan='2' align='center'><b><u>Your Account Info</u></b></td></tr>";
echo "<tr><td>Account Name</td><td><input type='text' name='accname' maxlength='12'></td></tr>";
echo "<tr><td>Password</td><td><input type='password' name='accpass1' maxlength='12'></td></tr>";
echo "<tr><td>Again pass.</td><td><input type='password' name='accpass2' maxlength='12'></td></tr>";
echo "<tr><td> </td><td> </td></tr>";
echo "<tr><td colspan='2' align='center'><b><u>Other account info</u></b></td></tr>";
echo "<tr><td>Email</td><td><input type='text' name='accmail' maxlength='50'></td></tr>";
echo "<tr><td> </td><td> </td></tr>";
echo "<tr><td colspan='2' align='center'>
<input type='hidden' name='activ' value='1'>
<input type='submit' value='Create Account'></td></tr>";
echo "</table></center>";
echo "</form>";
}
echo "</center>";
?>
-------------------------------------------------------------------------------------------------------
Delete character skills
Call it: wipeskills.php
PHP Code:
<?php
$mssql = array(
'host' => "localhost",
'user' => "sa",
'pass' => "server"
);
echo "<center><br><form action='wipeskills.php' method='POST'>
<table class='innertab'>
<tr>
<td colspan='2' align='left'><b>Delete Character Skills</b></td>
</tr>
<tr>
<td colspan='2' align='left'> </td>
</tr>
<tr>
<td align='left'>Character Name</td>
<td><input type='text' name='charname' maxlength='20'></td>
</tr>
<tr>
<td align='left' colspan='2'>
<input type='hidden' name='select' value='1'>
<input type='submit' value='Remove Skills'>
</td>
</tr>
</table>
</form></center>";
if($_POST['select']) {
$ms_con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
$result1 = mssql_query("SELECT character_no FROM character.dbo.user_character WHERE character_name = '".$_POST['charname']."'",$ms_con);
$row1 = mssql_fetch_row($result1);
mssql_query("DELETE FROM character.dbo.user_skill WHERE character_no = '".$row1[0]."'",$ms_con);
echo "<center>All done</center>";
}
?>
|
|
|
10/13/2009, 18:15
|
#6
|
elite*gold: 0
Join Date: Sep 2009
Posts: 48
Received Thanks: 3
|
make for me :
-Any Guild Reach Lv 3 .
-Guild Leader Get On Mail Box Item Index " 60087 "
|
|
|
All times are GMT +1. The time now is 17:52.
|
|