[Release] Modules for DarksWeb 0.3 part 2

hrisiz

Active Member
Joined
Feb 3, 2010
Messages
429
Reaction score
81
здравейте направих си нещо ново в моя сървър за което ми дадоха идея хора от този форум и реших че е добре да го кача мислех да го кача в Modules for DarksWeb 0.3 но реших че темата стана много дълга и затова реших тук :) отново ще кажа че всичко сложено тук е за
DarksWeb 0.3 by Backo с модификацията на killar4eto ето и Link ако искате да го изтеглите с модификацията :)
Легенда:
1-Characters and Guilds
2-Reset and GrandReset
3-Reference


if ($youwant==1){ :D:
Така ето го и това всъщност заради което е темата :)Characters and Guilds-ето и леко обяснение това е когато примерно влезеш в ranking или guild ranking като цъкнеш върху името да вади информация за даден герой или guild :) stats не показва на character :)

ето го първото php което ви трябва
PHP:
case "guilds1":

						
						if(!isset($_GET['option']))
							{
							header("Location:?id=error&type=symbols");
							}
						else
							{$guild = $_GET['option'];
                                if (empty($guild)) {echo"<center>I don't think SO !</table>";}
						else{     
							switch($_GET['option'])
								{
								case "$guild":
									include("modules/guild.php");
									break;
								
								}
							}}
   						break;
				case "char":

						
						if(!isset($_GET['option']))
							{
							header("Location:?id=error&type=symbols");
							}
						else
							{$char1 = $_GET['option'];
                                if (empty($char1)) {echo"<center>I don't think SO !</table>";}
						else{     
							switch($_GET['option'])
								{
								case "$char1":
									include("modules/char.php");
									break;
								
								}
							}}
						break;
то се слага в index.php под следните редове
PHP:
				if(isset($_GET['id']))
					{
					$page = $_GET['id'];
					}
				else
					{
					$page = "home";
					}
				switch($page)
					{
след това влизате в папка modules и там правите следните файлове :)
char.php
PHP:
<center>
<?php
$char1=$_GET['option'];
$query = "SELECT Name from Character ";
$result = mssql_query($query);
while (($i <= mssql_num_rows($result)) and ($i>=0))
{
$row = mssql_fetch_row($result);
if ($row[0]==$char1){$char=$char1;$i=-1;}
$i++;
}
if ($char1==$char)
{
$query=mssql_query("Select Name,Class,MapNumber,CtlCode,TotalTime,AccountID,QuestNumber,Resets,cLevel,GrandResets,BonusPoints,PkCount From Character Where Name='$char'");
$row1 = mssql_fetch_row($query);

$guilds=mssql_query("Select G_Name From GuildMember Where Name='$char'");
$guild = mssql_fetch_row($guilds);

$status="select ConnectStat from MEMB_STAT where memb___id='$row1[5]'";
$sql_status_check=mssql_query($status);
$stats=mssql_fetch_row($sql_status_check);

$condis=mssql_query("Select ConnectTM,DisConnectTM From MEMB_STAT Where memb___id='$row1[5]'");
$row2 = mssql_fetch_row($condis);

$min = $row1[4];
$chas = floor($min/60);
$days = floor($chas/24);
$chas = $chas % 24;
$min = $row[4] % 60;  

if (empty($guild[0])){$guild[0]='None';}

if($stats[0] == 0){ $stats ='<img src=images/Offline.gif> <img src=images/Offline1.gif>';
}
if($stats[0] == 1){ $stats ='<img src=images/Online.gif> <img src=images/Online11.gif>';
}

if ($row1[3]==8){$row1[3]='GameMaster';}
if ($row1[3]<>8){$row1[3]='NormalUser';}

if($row1[1]==0){$cl='Dark Wizard'; $pic='<img src=images/dw.jpg heigh=80 width=310>';}
elseif($row1[1]==1){$cl='Soul Master'; $pic='<img src=images/dw.jpg heigh=80 width=310>';}
elseif($row1[1]==16){$cl='Dark Knight'; $pic='<img src=images/dk.jpg heigh=90 width=310>';}
elseif($row1[1]==17){$cl='Blade Knight'; $pic='<img src=images/dk.jpg heigh=90 width=310>';}
elseif($row1[1]==32){$cl='Elf'; $pic='<img src=images/elf.jpg heigh=90 width=310>';}
elseif($row1[1]==33){$cl='Muse Elf'; $pic='<img src=images/elf.jpg heigh=90 width=310>';}
elseif($row1[1]==48){$cl='Magic Gladiator'; $pic='<img src=images/mg.jpg heigh=90 width=310>';}
else{$cl=$row1[1];}

if($row1[2]==0){$map='Lorencia';}
elseif($row1[2]==1){$map='Dungeon';}
elseif($row1[2]==2){$map='Devias';}
elseif($row1[2]==3){$map='Noria';}
elseif($row1[2]==4){$map='LostTower';}
elseif($row1[2]==5){$map='Excile';}
elseif($row1[2]==6){$map='Stadium';}
elseif($row1[2]==7){$map='Atlans';}
elseif($row1[2]==8){$map='Tarkan';}
elseif($row1[2]==9){$map='Devil Square';}
elseif($row1[2]==32){$map='Devil Square';}
elseif($row1[2]==10){$map='Icarus';}
elseif($row1[2]==11){$map='Blood Castle 1';}
elseif($row1[2]==12){$map='Blood Castle 2';}
elseif($row1[2]==13){$map='Blood Castle 3';}
elseif($row1[2]==14){$map='Blood Castle 4';}
elseif($row1[2]==15){$map='Blood Castle 5';}
elseif($row1[2]==16){$map='Blood Castle 6';}
elseif($row1[2]==17){$map='Blood Castle 7';}
else{$map=$row[7];}
echo "
<table width=250>
";
if (($cl=='Soul Master') or ($cl=='Dark Wizard') or ($cl=='Magic Gladiator')){
echo"
<tr class=buttons><td>Character:<font color='#00CC66'>$row1[0]</font></td><td class='news-head' rowspan='16'>$pic</td></tr>
";}
else
{ echo "
<tr class=buttons><td class='news-head' rowspan='16'>$pic</td><td>Character:<font color='#00CC66'>$row1[0]</font></td></tr>
";}
echo "
<tr class=buttons><td>Guild:";
if ($guild[0]!='None'){ echo"<a href='?id=guilds1&option=$guild[0]'>";}echo"<font color='blue'>$guild[0]</a></td></tr>
<tr class=buttons><td>Class:<font color='#00CC66'>$cl</font></td></tr>
<tr class=buttons><td>Map:<font color='#00CC66'>$map</font></td></tr>
<tr class=buttons><td>Status:<font color='#00CC66'>$stats</font></td></tr>
<tr class=buttons><td>Special:<font color='#00CC66'>$row1[3]</font></td></tr>
<tr class=buttons><td>Level:<font color='#00CC66'>$row1[8]</font></td></tr>
<tr class=buttons><td>Resets:<font color='#00CC66'>$row1[7]</font></td></tr>
<tr class=buttons><td>GradnResets:<font color='#00CC66'>$row1[9]</font></td></tr>
<tr class=buttons><td>BonusPoints:<font color='#00CC66'>$row1[10]</font></td></tr>
<tr class=buttons><td>Player Kills:<font color='#00CC66'>$row1[11]</font></td></tr>
<tr class=buttons><td>Strength:<font color='#00CC66'>XXXX</font></td></tr>
<tr class=buttons><td>Vitality:<font color='#00CC66'>XXXX</font></td></tr>
<tr class=buttons><td>Agiliti:<font color='#00CC66'>XXXX</font></td></tr>
<tr class=buttons><td>Energy:<font color='#00CC66'>XXXX</font></td></tr>
<tr class=buttons><td>Quest Number:<font color='#00CC66'>$row1[6]</font></td></tr>
</table>
<table class=buttons align='center' width=250 border=10>

<tr class=buttons><td align='right'>LastConnect:</td><td><font color='#00CC66'>$row2[0]</font></td></tr>
<tr class=buttons><td align='right'>LastDisconnect:</td><td><font color='#00CC66'>$row2[1]</font></td></tr>
<tr class=buttons><td align='right'>TotalOnlineTime:</td><td><font color='#00CC66'>$days days:$chas hours</font></td></tr>

</table>

";
}
?>
</center>
</table>
и другия файл е guild.php
PHP:
<center>
<?php

$i=0;
$guilds1=$_GET['option'];
$query = "SELECT G_Name from guild ";
$result = mssql_query($query);
while (($i <= mssql_num_rows($result)) and ($i>=0))
{
$row = mssql_fetch_row($result);
if ($row[0]==$guilds1){$guilds=$guilds1;$i=-1;}
$i++;
}

if ($guilds1==$guilds)
{
$xa = mssql_query("SELECT * from guild WHERE G_Name='$guilds'"); 
$row = mssql_fetch_array($xa);
$logo = urlencode(bin2hex($row[1]));
echo "<table>
<tr><td width='250' align='center' class=buttons>Name:<font color='green' size=2><b>$guilds</b></font></td></tr>
<tr><td align='center' class=buttons>Guild Score:<font color='blue' size=2><b>$row[2]</b></font></td></tr>
<tr><td align='center' class=buttons>Guild Master:<font color='red' size=2><b>$row[3]</b></font></td></tr>
<tr><td  align='center' class=buttons>Guild Symbol:<br><center><img src='./inc/decode.php?decode=$logo' height=40 width=40 broder=0></td></tr>
</table>
<br>
<br>
<br>
<br>
<table border=5>
<font color='white' size=5><b>GuildMembers</b></font>
<tr><td align='center' >#</td><td align='center' >Name</td><td align='center' >Level/Resets/GR</td><td align='center' >Class</td><td align='center' >Status</td></tr>
";
$query1 = "SELECT Name,G_Name from GuildMember";
$result1 = mssql_query($query1);
$i1=0;
while ($i1 <= mssql_num_rows($result1)){
$row1 = mssql_fetch_array($result1);
if ($row1[1]==$guilds)
{
$rank+=1;
$xa1 = mssql_query("SELECT cLevel,Resets,GrandResets,class,AccountId from Character WHERE Name='$row1[0]'"); 
$row2 = mssql_fetch_array($xa1);
$status="select ConnectStat from MEMB_STAT where memb___id='$row2[4]'";
$sql_status_check=mssql_query($status);
$row3=mssql_fetch_row($sql_status_check);
if($row3[0] == 0){ $row3[0] ='<img src=images/Offline.gif> <img src=images/Offline1.gif>';
}
if($row3[0] == 1){ $row3[0] ='<img src=images/Online.gif> <img src=images/Online11.gif>';
}
if($row2[3]==0){$cl='Dark Wizard';}
elseif($row2[3]==1){$cl='Soul Master';}
elseif($row2[3]==2){$cl='Grand Master';}
elseif($row2[3]==16){$cl='Dark Knight';}
elseif($row2[3]==17){$cl='Blade Knight';}
elseif($row2[3]==18){$cl='Blade Master';}
elseif($row2[3]==19){$cl='Blade Master';}
elseif($row2[3]==32){$cl='Elf';}
elseif($row2[3]==33){$cl='Muse Elf';}
elseif($row2[3]==34){$cl='High Elf';}
elseif($row2[3]==48){$cl='Magic Gladiator';}
elseif($row2[3]==49){$cl='Duel Master';}
elseif($row2[3]==64){$cl='Dark Lord';}
elseif($row2[3]==65){$cl='Lord Emperor';}
elseif($row2[3]==66){$cl='Lord Emperor';}
elseif($row2[3]==80){$cl='Summoner';}
elseif($row2[3]==81){$cl='Bloody Summoner';}
elseif($row2[3]==82){$cl='Dimension Master';}
elseif($row2[3]==83){$cl='Dimension Master';}
else{$cl=$row2[3];}
echo "
<tr><td align='center' >$rank</td><td align='center' ><a href='?id=char&option=$row1[0]'>$row1[0]</a></td><td align='center' >$row2[0]/$row2[1]/$row2[2]</td><td align='center' >$cl</td><td align='center' >$row3[0]</td></tr>
";
}
$i1++;
}
echo "</table>";
}
?>
</center>
</table>
след това за да може да се избере името в ranking влизате в modules/ranking.php и там намирате следния ред (намира се към края)
PHP:
						<b><font color=white>$row[0]</font></b></td><td class='news-rest' align='center'>
и този ред го замествате с
PHP:
						<b><center><a href='?id=char&option=$row[0]'>$row[0]</a></center></font></b></td><td class='news-rest' align='center'>
след това влизате в modules/guilds.php намирате
PHP:
						<font color=white>$row[0]</font></td><td class='news-rest' align='center'>
и го замествате с
PHP:
						<a href='/?id=guilds1&option=$row[0]'>$row[0]</a></td><td class='news-rest' align='center'>
след което запазвате разбира се :D и смятам че вече е наред :) за тест влизате в сайта ranking и изберете на някои герой името ако ви се отвори друга страница с героя е добре :)
;} :D:
лек коментар снимката на Character е наистина голяма но така ми хареса разположението на информацията

и да спомена,както винаги нз дали работи на MAX добре тествал съм го в сървър си и бачка но неказвам че е изпипано докрай и затова ако някои има идеи или какво и да е било съвсем спокойно може да си каже мнението но ще помоля когато някои иска да каже за нещо да се промени примерно нека да ми обясни защо ако е възможно понеже все още се уча на PHP и ми е интересно да знам :)

if ($youwant==2){
Reset with GrandReset - в Modules for DarksWeb 0.3 бях сложил Resets и GR но не бяха синхронизирани и като направиш gr след това res и пак си се едно само 1 рес тоест не се запазваха точките затова реших от там да изтрия GR и да го кача тук :)
така като за начало трябва да направите една колона в Character с име BonusPoints от тип bigint.

a ето и двата модула
Resets - с Bonus Points различни точки за различни раси и увеличаване на zena на рес
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include("./config.php");
include("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if($md5 == 1)
    {
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
    }
else
    {
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
    }
function level_reset() {
{

$char = secure($_POST['chars']);
$char = str_replace("'" , "", $char);
$char = str_replace(";" , "", $char);
$xa = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$res = mssql_fetch_array($xa);
$zenres='1';                  //ako iskate da se oveli4ava s seki res '1' ako neiskate '0'
$zen='100000000';                  //ResetMoney
$reslevel = '350';				//ResetLevel
$maxres   = '50';				//MaxResets
if ($yesno=1){
$resmoney = $zen*($res['Resets']+1);  }  
if ($yesno=0){
$resmoney = $zen;  } 	
//Begin ResetsPoints
if($res['Class']==0){$respoints = '500';}     //Dark Wizard
elseif($res['Class']==1){$respoints = '500';}     //Soul Master
elseif($res['Class']==16){$respoints = '400';}    //Dark Knigh
elseif($res['Class']==17){$respoints = '400';}    //Blade Knight
elseif($res['Class']==32){$respoints = '450';}    //Elf
elseif($res['Class']==33){$respoints = '450';}    //Muse Elf
elseif($res['Class']==48){$respoints = '520';}    //Magic Gladiator  
 //End ResetsPoints
 //Begin GrandResetsPoints
if($res['Class']==0){$grpoints = '1000';}     //Dark Wizard            
elseif($res['Class']==1){$grpoints = '1000';}     //Soul Master
elseif($res['Class']==16){$grpoints = '900';}    //Dark Knigh
elseif($res['Class']==17){$grpoints = '900';}    //Blade Knight
elseif($res['Class']==32){$grpoints = '950';}    //Elf
elseif($res['Class']==33){$grpoints = '950';}    //Muse Elf
elseif($res['Class']==48){$grpoints = '1050';}    //Magic Gladiator 
 //End GrandResetsPoints
$respoints1 = ($res['cLevel'] - $reslevel)+$res['BonusPoints'] ;
global $web;
$username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'"); 
$username_checked = mssql_num_rows($username_check);  
$online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
$online_checked = mssql_fetch_array($online_check);
$hero = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$row = mssql_fetch_array($hero);
if (empty($char)) { echo "<td><br><font size=2>Please select Character!</font><br><br></td>"; $error=1; }
elseif ($online_checked['ConnectStat'] != 0){ echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>"; $error=1; }
elseif ($row['Money'] < $resmoney) { echo "<td><br><font size=2><b>$char</b> need [<b>$resmoney</b>] zen to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['cLevel'] < $reslevel){ echo "<td><br><font size=2><b>$char</b> need level [<b>$reslevel</b>] to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['Resets'] >= $maxres) { echo "<td><br><font size=2>You have reach maximum resets! Cannot reset this hero!</font><br><br></td>"; $error=1; }
if($error !=1) {
$respoints2 = $res['cLevel'] - $reslevel+$row['BonusPoints'];
$resetup = $row['Resets'] + (1);
$newstats = (($row['Resets']+1) * $respoints) + $respoints1 + ($grpoints*$res['GrandResets']);
$resetup = $row['Resets'] + (1);
$money = $row['Money'] - $resmoney;
$reset_points = "UPDATE character SET [BonusPoints]='$respoints2',[LevelUpPoint]='$newstats',[Money]='$money',cLevel='1',[Strength]='25',[Dexterity]='25',[Vitality]='25',[Energy]='25',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup',[inventory]=CONVERT(varbinary(1080), null) WHERE Name='$char'";
 $reset_results = mssql_query($reset_points);
echo "<td><br><font size=2><b>$char</b> have [<b>$newstats</b>] level up points!</font><br><br></td>";
} 
 }
  }
?>

GrandResets
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include("./config.php");
include("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if($md5 == 1)
    {
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
    }
else
    {
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
    }
function level_reset() {
{

$char = secure($_POST['chars']);
$char = str_replace("'" , "", $char);
$char = str_replace(";" , "", $char);
$xa = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$res = mssql_fetch_array($xa);
$grandresmoney = '20000000'*($res['GrandResets']+1);   //GR Money
$grandresresets = '50';          //Resets to GR
$grandreslevel = '350';          //Level to GR
$maxgrandres   = '10';          //MAXGR
//Begin GrandResetsPoints
if($res['Class']==0){$grandrespoints = '1000';}     //Dark Wizard
elseif($res['Class']==1){$grandrespoints = '1000';}     //Soul Master
elseif($res['Class']==16){$grandrespoints = '900';}    //Dark Knigh
elseif($res['Class']==17){$grandrespoints = '900';}    //Blade Knight
elseif($res['Class']==32){$grandrespoints = '950';}    //Elf
elseif($res['Class']==33){$grandrespoints = '950';}    //Muse Elf
elseif($res['Class']==48){$grandrespoints = '1050';}    //Magic Gladiator  
//End GrandResetsPoints
global $web;
$username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'"); 
$username_checked = mssql_num_rows($username_check);  
$online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
$online_checked = mssql_fetch_array($online_check);
$hero = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$row = mssql_fetch_array($hero);
if (empty($char)) { echo "<td><br><font size=2>Please select Character!</font><br><br></td>"; $error=1; }
elseif ($online_checked['ConnectStat'] != 0){ echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>"; $error=1; }
elseif ($row['GrandResets'] >= $maxgrandres) { echo "<td><br><font size=2>You have reach maximum GrandResets! Cannot reset this hero!</font><br><br></td>"; $error=1; }
elseif ($row['Money'] < $grandresmoney) { echo "<td><br><font size=2><b>$char</b> need [<b>$grandresmoney</b>] zen to GrandReset!</font><br><br></td>"; $error=1; }
elseif ($row['cLevel'] < $grandreslevel){ echo "<td><br><font size=2><b>$char</b> need level [<b>$grandreslevel</b>] to GrandReset!</font><br><br></td>"; $error=1; }
elseif ($row['Resets'] < $grandresresets) { echo "<td><br><font size=2><b>$char</b> need resets [<b>$grandresresets</b>] to GrandReset!</font><br><br></td>"; $error=1; }
if($error !=1) {
$newstats = ($row['GrandResets']*$grandrespoints) + $grandrespoints;
$resetup = $row['GrandResets'] + (1);
$money = $row['Money'] - $grandresmoney;
$reset_points = "UPDATE character SET [LevelUpPoint]='$newstats',[Money]='$money',cLevel='1',[Strength]='25',[Dexterity]='25',[Vitality]='25',[Energy]='25',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[GrandResets]='$resetup',[Resets]='0',[inventory]=CONVERT(varbinary(1080), null),[magiclist]= CONVERT(varbinary(180), null) WHERE Name='$char'";
 $reset_results = mssql_query($reset_points);
echo "<td><br><font size=2><b>$char</b> have [<b>$newstats</b>] level up points!</font><br><br></td>";
} 
 }
  }
?>
а това е за Grand Reset html-a
PHP:
<tr>
<td colspan='6'><center><b>Y</b>our <b>C</b>haracter's <b>I</b>nformation</font></b></center></td>
</tr>
<table class='news-head' align='center' border='0' cellpadding='0' cellspacing='0' >
<tr align='center'>
</tr> 
<?php
ob_start();
session_start();
include("config.php");
$account_id = stripslashes($_SESSION['member_username']);
$account_id = clean_var($account_id);
$character = mssql_query("SELECT * FROM accountcharacter WHERE ID='$account_id'");
$char = mssql_fetch_array($character);
	$rank_query = mssql_query("Select Name,LevelUpPoint,Strength,Dexterity,Vitality,Energy,Leadership,Class,cLevel,Resets,PkCount,PkLevel,MaxLife,MaxMana,Class,Money FROM Character WHERE AccountID='$account_id'");
	for($i=0;$i < mssql_num_rows($rank_query);++$i)
		{
		$v=$i+1;
		$row = mssql_fetch_row($rank_query);
		$status = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
		$status = mssql_fetch_array($status);
		$status = $status['ConnectStat'];
		if($status == "1")
			{
			$status = "<img src=images/Online.gif> <img src=images/Online11.gif>";
			}
			else
			{
			$status = "<img src=images/Offline.gif> <img src=images/Offline1.gif>";
			}

//Class
if ($row['7'] == 0) { $row[7] = "Dark Wizard"; }
if ($row['7'] == 1) { $row[7] = "Soul Master"; }
if ($row['7'] == 2) { $row[7] = "Grand Master"; }
if ($row['7'] == 16) { $row[7] = "Dark Knight"; }
if ($row['7'] == 17) { $row[7] = "Blade Knight"; }
if ($row['7'] == 18) { $row[7] = "Blade Master"; }
if ($row['7'] == 19) { $row[7] = "Blade Master"; }
if ($row['7'] == 32) { $row[7] = "Elf"; }
if ($row['7'] == 33) { $row[7] = "Muse Elf"; }
if ($row['7'] == 34) { $row[7] = "High Elf"; }
if ($row['7'] == 48) { $row[7] = "Magic Gladiator"; }
if ($row['7'] == 49) { $row[7] = "Duel Master"; }
if ($row['7'] == 64) { $row[7] = "Dark Lord"; }
if ($row['7'] == 65) { $row[7] = "Lord Emperor"; }
if ($row['7'] == 80) { $row[7] = "Summoner"; }
if ($row['7'] == 81) { $row[7] = "Bloody Summoner"; }
if ($row['7'] == 82) { $row[7] = "Dimension Master"; }
if ($row['7'] == 83) { $row[7] = "Dimension Master"; }

//PK Level
if($row[11] == 1){ $row[11] ='<font color=#605ca8>Hero';}
if($row[11] == 2){ $row[11] ='<font color=#abcef8>Commoner';}
if($row[11] == 3){ $row[11] ='Normal';}
if($row[11] == 4){ $row[11] ='<font color=#fbaf5d>Against Murderer';}
if($row[11] == 5){ $row[11] ='<font color=#a0410d>Murderer';}
if($row[11] == 6){ $row[11] ='<font color=#c81118>Phonomania';}

//Class Pic
if($row['14'] == 0){ $pic ="<img src=images/dw.jpg width=100 height=119>"; }
if($row['14'] == 1){ $pic ="<img src=images/dw.jpg width=100 height=119>"; }
if($row['14'] == 2){ $pic ="<img src=images/dw.jpg width=100 height=119>"; }
if($row['14'] == 16){ $pic ='<img src=images/dk.jpg width=100 height=119>'; }
if($row['14'] == 17){ $pic ='<img src=images/dk.jpg width=100 height=119>'; }
if($row['14'] == 18){ $pic ='<img src=images/dk.jpg width=100 height=119>'; }
if($row['14'] == 19){ $pic ='<img src=images/dk.jpg width=100 height=119>'; }
if($row['14'] == 32){ $pic ='<img src=images/elf.jpg width=100 height=119>'; }
if($row['14'] == 33){ $pic ='<img src=images/elf.jpg width=100 height=119>'; }
if($row['14'] == 34){ $pic ='<img src=images/elf.jpg width=100 height=119>'; }
if($row['14'] == 48){ $pic ='<img src=images/mg.jpg width=100 height=119>'; }
if($row['14'] == 49){ $pic ='<img src=images/mg.jpg width=100 height=119>'; }
if($row['14'] == 64){ $pic ='<img src=images/dl.jpg width=100 height=119>'; }
if($row['14'] == 65){ $pic ='<img src=images/dl.jpg width=100 height=119>'; }
if($row['14'] == 80){ $pic ='<img src=images/sum.jpg width=100 height=119>'; }
if($row['14'] == 81){ $pic ='<img src=images/sum.jpg width=100 height=119>'; }
if($row['14'] == 82){ $pic ='<img src=images/sum.jpg width=100 height=119>'; }
if($row['14'] == 83){ $pic ='<img src=images/sum.jpg width=100 height=119>'; }

				echo "
<td class='news-rest' align='center'>
<a class='helpLink' onmouseover=\"overlib('<table class=sort-table width=400 border=0 cellspacing=0 cellpadding=0 align=left><tbody><br><tr><td rowspan=19 align=center>$pic<br><b>$row[0]</b><br><font size=1>$row[9] reset(s)/$row[8] Level</font><br><font size=1>($row[7])</font></td></tr><tr><td colspan=2><span class=rankings_text>Level Up Point:</span></td><td><span class=rankings_text>$row[1]</span></td></tr><tr><td colspan=2><span class=rankings_text>Strenght:</span></td><td><span class=rankings_text>$row[2]</span></td></tr><tr class=even><td colspan=2><span class=rankings_text>Agility:</span></td><td><span class=rankings_text>$row[3]</span></td></tr><tr><td colspan=2><span class=rankings_text>Vitality:</span></td><td><span class=rankings_text>$row[4]</span></td></tr><tr class=even><td colspan=2><span class=rankings_text>Energy:</span></td><td><span class=rankings_text>$row[5]</span></td></tr><tr><td colspan=2><span class=rankings_text>Command:</span></td><td><span class=rankings_text>$row[6]</span></td></tr><tr class=even><td colspan=2><span class=rankings_text>Money:</span></td><td><span class=rankings_text>$row[15]</span></td></tr><tr class=even><td colspan=2><span class=rankings_text>Total Kills:</span></td><td><span class=rankings_text>$row[10]</span></td></tr><tr><td colspan=2><span class=rankings_text>Pk Level:</span></td><td><span class=rankings_text>$row[11]</span></td></tr><tr class=even><td colspan=2><span class=rankings_text>Status:</span></td><td>$status</td></tr></tbody></table>' ,false); return false\" onmouseout=\"return nd();\"><center><font color='#DDA943'>$pic<a/></a><br><center>$row[0]</center>


";

		}
?>
</div><tr>
<table class='news-rest' align='center' border='0' cellpadding='0' cellspacing='0' >
<?php
ob_start();
session_start();
include("config.php");
include("GrandReset_do.php");
$account_id = secure($_SESSION['member_username']);
$account_id = clean_var($account_id);
$character = mssql_query("SELECT * FROM accountcharacter WHERE ID='$account_id'");
$char = mssql_fetch_array($character);

if (isset($_POST["level_reset"])) {level_reset();}
?>
<form action="" method="post">
<tr>
<td><center>Choose hero: 
<? 
echo("<select name='chars' id='chars' class='buttons'>
<option class='formae' value='$char[GameID1]'>$char[GameID1]</option>
<option class='formae' value='$char[GameID2]'>$char[GameID2]</option>
<option class='formae' value='$char[GameID3]'>$char[GameID3]</option>
<option class='formae' value='$char[GameID4]'>$char[GameID4]</option>
<option class='formae' value='$char[GameID5]'>$char[GameID5]</option></select>"); ?><td><input type="submit" value="Reset Char" class="buttons" name="level_reset" id="level_reset"></td>
</form>
</tr></table><br><br>

;}

if ($youwant==3){
Ref - така в този модул се слага в acc-то и всеки който е направил 10 реса и все още не е гласувал може да си избере човек които го е викнал :) и така тези неща се записват в Sql-a и разбира се ако искате можете на определен брой хора повикани от даден човек да му давате награда примерно но това си е лично ваше решение :)
така за модула ви трябва в Query Analyzer да въведете следния код :)
PHP:
use MuOnline
CREATE TABLE refcheck
(
IP varchar(50),
Name varchar(50),
)  
ALTER TABLE Character ADD Ref BIGINT
а ето го и самия модул
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include("./config.php");
include("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if($md5 == 1)
    {
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
    }
else
    {
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
    }
echo "<center><font color='red' size=3><b>You can reference only one time and only one Character!</b></font>";
echo '<table><form method="POST" action=""> 
<tr><td><b>Referencer Character Name:</b></td><td><input type="text" name="name" size="25"/></td></tr> 
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>'; 
$charname = stripslashes($_POST['name']); 
$mychar=mssql_query("Select Name,Resets,GrandResets From Character Where Name='$username'");
for($i=0;$i <= mssql_num_rows($mychar);++$i)
{
$char=mssql_fetch_row($mychar);
if (($char[1]>9) or ($char[2]>0)){
$err1=1;
}
}
$ip = $_SERVER['REMOTE_ADDR'];
$ip1 = mssql_query("Select IP From refcheck where IP='$ip'"); 
$ipcheck=mssql_fetch_row($ip1);

$name = mssql_query("Select Name From refcheck where Name='$username'"); 
$usercheck=mssql_fetch_row($name);

$name1 = mssql_query("Select Name From Character where Name='$charname'"); 
$usercheck1=mssql_fetch_row($name1);
if (empty($charname)){$error=1;}
elseif ($err1==0){echo 'You must have character with 10 resets'; $error=1;}
elseif ($ipcheck[0]==$ip){echo 'You can vote only one time';$error=1;}
elseif ($usercheck[0]==$username){echo 'You can vote only one time';$error=1;}
elseif ($usercheck1[0]<>$charname){echo 'Wrong Chracter Name';$error=1;}
if ($error<>1){
$RefCheckUpdate = "INSERT INTO refcheck (Name,IP) VALUES ('$username','$ip')";
$RefCheckUpdate1 = mssql_query($RefCheckUpdate);
$CharRefUpdate = "Update Character SET [Ref]=Ref+'1' WHERE Name='$charname'";
$CharRefUpdate1 = mssql_query($CharRefUpdate);
echo "you succesfuly give ref to your Referencer";
}
?>
</table>
;}
Всичките кодове са писани върху DarksWeb 0.3 на Backo с модификацията на killar4eto
 
Last edited:
ДОбре е ! :)
Но имам малък проблем, сякъш синхонизацията ми се губи, когато избера даден герой, няма едно вярно нещо което да пише, освен името и гилда. Всичко с1м направил както е описано. Малко хелп, как да го оправя ? Също и гилдиите не им показва логото ...




фиксанх го това с гилдиите, но char.php не работи коректно ;)
 
Last edited:
Уважавам те, че си аднал credits ;] имаш едно +1 от мене :)
 
ДОбре е ! :)
Но имам малък проблем, сякъш синхонизацията ми се губи, когато избера даден герой, няма едно вярно нещо което да пише, освен името и гилда. Всичко с1м направил както е описано. Малко хелп, как да го оправя ? Също и гилдиите не им показва логото ...




фиксанх го това с гилдиите, но char.php не работи коректно ;)

нямам си на представа какъв е проблема при теб при мен всички данни са си наред аз съм на версия 97d+99i ако си на друга версия и ако има някакво разминаване в таблиците може от това да е :) моля ако някои друг има проблем да каже :) аз е сега ще го прегледам при мен но мисля че всичко си е наред :)