Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 07:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Question(about php Scripting

Discussion on Question(about php Scripting within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2009
Posts: 4
Received Thanks: 0
Question(about php Scripting

First of all hello, OK,there's my question first of all nothing its wrong with this php script but i want to know how to add a image as result of each classes example
$classes = array('0' => "Azure Knight", '1' => "Segita Hunter", '2' => "Incar Magician", '3' => "Vicious Summoner", '4' => "Segnale", '5' => "Bagi Warrior");
i want to change those result Azure,segita,etc for a image like azure.jpg ,dont know how to explain it better...Thanks for read
PHP Code:
<?php

    $msconnect 
mssql_connect("localhost","sa","sacha29");

echo 
"<center>Top 50 List<br><font size='1'>Sortiert nach Level</font><br>";

echo 
"<table border='1'>
    <tr>
        <td align='center'>Pos.</td>
        <td align='center'>Char.Name</td>
        <td align='center'>Level</td>
        <td align='center'>Class</td>
        <td align='center'>Guild</td>
        <td align='center'>PK's</td>
        <td align='center'>PvP's</td>
    </tr>"
;

$con mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']) or die("Verbinndung zum MSSQL Server fehlgeschlagen,bitte zu einem späteren zeitpunkt erneut probieren.");

$result1 mssql_query("
    SELECT c.character_name,c.wLevel,c.byPCClass,c.dwPVPPoint,c.wPKCount,
    (SELECT guild_code FROM character.dbo.GUILD_CHAR_INFO WHERE character_name = c.character_name) AS guildcode
    FROM character.dbo.user_character AS c
    WHERE character_name <> '[' AND character_name <> ']' AND user_no < '9999999999' 
    ORDER BY wLevel DESC,dwExp DESC"
,$con);

$i '1';

$classes = array('0' => "Azure Knight"'1' => "Segita Hunter"'2' => "Incar Magician"'3' => "Vicious Summoner"'4' => "Segnale"'5' => "Bagi Warrior");  

while(
$row1 mssql_fetch_row($result1)) {

    if(
$i >= '0' || $i <= '50') { 

        if(!
preg_match("/[[]/i",$row1[0])) {

            if(empty(
$row1[5])) {
                
$guildname "No Guild";
            } else {
                
$result2 mssql_query("SELECT guild_name FROM character.dbo.GUILD_INFO WHERE guild_code = '".$row1[5]."'",$con);
                
$row2 mssql_fetch_row($result2);
                
$guildname $row2[0];
            }

            echo 
"<tr>
                <td align='center'>"
.$i."</td>
                <td align='center'>"
.$row1[0]."</td>
                <td align='center'>"
.$row1[1]."</td>
                <td align='center'>"
.$classes[$row1[2]]."</td>
                <td align='center'>"
.$guildname."</td>
                <td align='center'>"
.$row1[4]."</td>
                <td align='center'>"
.$row1[3]."</td>
            </tr>"
;

            
$i++;

        }

    }

}

echo 
"</table></center>";

?>
cjm299 is offline  
Old 05/13/2011, 06:00   #2
 
elite*gold: 3
Join Date: Nov 2008
Posts: 5,333
Received Thanks: 1,335
#reported spam (#2) and wrong section (1#)
Vaidas B is offline  
Old 05/13/2011, 11:01   #3

 
elite*gold: 35
Join Date: Aug 2009
Posts: 5,822
Received Thanks: 1,958
#deleted
#moved
~Kakkarot~ is offline  
Old 05/14/2011, 03:26   #4
 
Decima's Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 1,297
Received Thanks: 928
PHP Code:
<?php 

    $msconnect 
mssql_connect("localhost","sa","sacha29"); 

echo 
"<center>Top 50 List<br><font size='1'>Sortiert nach Level</font><br>"

echo 
"<table border='1'> 
    <tr> 
        <td align='center'>Pos.</td> 
        <td align='center'>Char.Name</td> 
        <td align='center'>Level</td> 
        <td align='center'>Class</td> 
        <td align='center'>Guild</td> 
        <td align='center'>PK's</td> 
        <td align='center'>PvP's</td> 
    </tr>"


$con mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']) or die("Verbinndung zum MSSQL Server fehlgeschlagen,bitte zu einem späteren zeitpunkt erneut probieren."); 

$result1 mssql_query(
    SELECT c.character_name,c.wLevel,c.byPCClass,c.dwPVPPoint,c.wPKCount, 
    (SELECT guild_code FROM character.dbo.GUILD_CHAR_INFO WHERE character_name = c.character_name) AS guildcode 
    FROM character.dbo.user_character AS c 
    WHERE character_name <> '[' AND character_name <> ']' AND user_no < '9999999999'  
    ORDER BY wLevel DESC,dwExp DESC"
,$con); 

$i '1'

$classes = array('0' => "Azure Knight"'1' => "Segita Hunter"'2' => "Incar Magician"'3' => "Vicious Summoner"'4' => "Segnale"'5' => "Bagi Warrior");   

$classimg = array('0' => "ak.jpg"'1' => "hunter.jpg"'2' => "mage.jpg"'3' => "summy.jpg"'4' => "seg.jpg"'5' => "bagi.jpg");   


while(
$row1 mssql_fetch_row($result1)) { 

    if(
$i >= '0' || $i <= '50') {  

        if(!
preg_match("/[[]/i",$row1[0])) { 

            if(empty(
$row1[5])) { 
                
$guildname "No Guild"
            } else { 
                
$result2 mssql_query("SELECT guild_name FROM character.dbo.GUILD_INFO WHERE guild_code = '".$row1[5]."'",$con); 
                
$row2 mssql_fetch_row($result2); 
                
$guildname $row2[0]; 
            } 

            echo 
"<tr> 
                <td align='center'>"
.$i."</td> 
                <td align='center'>"
.$row1[0]."</td> 
                <td align='center'>"
.$row1[1]."</td> 
                <td align='center'>"
.$classes[$row1[2]]."<br /><img src='images/".$classimg[$row1[2]]."'></td> 
                <td align='center'>"
.$guildname."</td> 
                <td align='center'>"
.$row1[4]."</td> 
                <td align='center'>"
.$row1[3]."</td> 
            </tr>"


            
$i++; 

        } 

    } 



echo 
"</table></center>"

?>
untested, but name ur images like so:

ak.jpg
hunter.jpg
mage.jpg
summy.jpg
seg.jpg
bagi.jpg

put them in a folder called images that should be in the same folder as this script.

then u should see ur image below the class name, if you dont want the class name showing, just take out this part:

PHP Code:
".$classes[$row1[2]]."<br /> 
Decima is offline  
Reply

Tags
dekaron, how to add image, php scripting, ranking php


Similar Threads Similar Threads
Question about scripting
10/06/2010 - General Coding - 0 Replies
Hi I'm new to scripting and have a question was wondering if someone could help me. I am playing a game called Nexus TK. I wish to make a script for it for a healing character. Their is only a very few people who make scripts for this game and they sell them for 100-150$ I think it is very unfair to charge so much but, to the point I'd like to know how I could make a script to auto heal a warrior in my group when he needs to be healed and a script to cast a spell on monsters in a room anyone...
[Question] Editing Monster drops and NPC scripting?
08/01/2009 - CO2 Private Server - 2 Replies
Hey guys. I just recently created my own private server (w00t) and it's cool and all. However, it currently runs on Hamachi, because I'm a fucking retard and I don't know how to Port Forward. Anyway, I have no knowledge of C++, C#, C Natural or C Flat (lol), so I'm pretty much clueless. I am using PowerSource CO to make the server, and it's all good for now. However, I don't know how to edit monster drops and NPC scripting. I also don't know how to change what NPCs do. I went into my...
Question about Scripting[[Winhex]]
02/27/2009 - Dekaron - 3 Replies
ok i kno how to edit things with winhex but how do i make what i edited into a winhex script file?
question on l2walker scripting
11/02/2008 - Lineage 2 - 3 Replies
a noob question since im new into scripting.... is there any way ... how to make a script pm a certain char?? i've read the guide made by emir0n under the Lin2 Exploits, Hacks, Bots, Tools & Macros....but what i've read from the guide is just only this SAY(writing) Speaks generally. Anyone in game can view. so is it possible to pm a certain char??
BJX Scripting Question
09/13/2005 - Conquer Online 2 - 4 Replies
hey When creating ur own script how would you talk to an npc twice? i tried the npc command then move to a new loacation then the new npc command but it didnt work. Is there another way or am i missing something. I have also tried another lot of brackets behind the first and that didnt work either. edit: just saw a post by darklady whch had a similar set as me. Does it work or am i just not moving far enough.



All times are GMT +1. The time now is 07:14.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.