[Release] PHP Script Center

10/11/2009 09:55 janvier123#1

[Only registered and activated users can see links. Click Here To Register...]


<---! Authors !--->

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]


<---! Info !--->

This page / topic is made for all PHP related scripts for dekaron servers.
These script are written by our members from the epvp community.
Credits go to the rightfull owners and there scripts NOT this topic.
Also me and zombe are working on a other topic where you can request your PHP scripts, NOT mssql scripts.
(PS: ill ask trane. to merge [Only registered and activated users can see links. Click Here To Register...] with this one.)
Requests can be posted here and will be listed on the top page (if ready).


<---! Note !--->

Zombe and me have a very different way of writing our PHP code, so please dont start a flameware about who's got the best script.
If other members want to share there scripts made in PHP ofcourse there can post it here.
Thanks and credits go to them, not me.
Its not a discussion about who has the most and/or best etc scripts !!!!!


<---! Scripts By Janvier123 !--->

Name: [Only registered and activated users can see links. Click Here To Register...] <--- thx to Zombe!
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...] <--- Comming Soon !
Download:

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]


<---! Scripts By Unknown Member(s) !--->


Name: File System (System for Elite PVP DK Server Tools)
Download: [Only registered and activated users can see links. Click Here To Register...]

Name: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]
10/11/2009 10:52 Zombe#2
Listing online GMs script (Can be given to public, to quickly find a GM.)

Listing online characters script (Probably for GM/Admin use only.)
10/11/2009 13:21 janvier123#3
FRESH FROM THE PRESS !
Send emails to players from players :)

Download: [Only registered and activated users can see links. Click Here To Register...]

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 gedimazs#4
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 janvier123#5
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']) < || 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']) < || 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>&nbsp;</td><td>&nbsp;</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>&nbsp;</td><td>&nbsp;</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'>&nbsp;</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 lol2k1#6
make for me :
-Any Guild Reach Lv 3 .
-Guild Leader Get On Mail Box Item Index " 60087 "