[Release] DarksWeb 0.3 [09.12.2016]

Status
Not open for further replies.
Дано този път да стане :).... тествай го и ми кажи!

Code:
<?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);
$resmoney = '100000000';
$reslevel = '400';
$maxres = '200';
$respoints = '0';
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; }
$vij = mssql_query("SELECT memb___id,ConnectStat FROM MEMB_STAT WHERE memb___id=$username");
$row3 = mssql_fetch_row($vij);
if($row3[0] == "1") 
{
echo "<font color='red'>You are login in game please, logout!</font>";
}
else{
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) {
$resetup = $row['Resets'] + (1);
$money = $row['Money'] - $resmoney;
$reset_points = "UPDATE character SET [LevelUpPoint]='0',[Money]='$money',cLevel='1',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
$reset_results = mssql_query($reset_points);
echo "<td><br><font size=2><b>$char</b> has been reset!</font><br><br></td>";
} 
}
}
}
?>

Дано стане не съм го тествал :)
 
Parse error: syntax error, unexpected T_ELSEIF in C:\htdocs\modules\clear_reset_do.php on line 47

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; }

замести го
 
  • Like
Reactions: MapTuH4y
Um, web is great, but only 1 visual thing is bad in my opinion :) - Rankings page, it's too massive, those pictures are no needed thing.. I more prefer simple rankings: nick, level, resets, stats. :)
Hope you understood me, coz my english kinda s*cks :)

Open rankings.php and change this:

Code:
$query = mssql_query("SELECT TOP 20 Name,Class,cLevel,resets,Money,PKcount,PkLevel,MapNumber,MapPosX,MapPosY,Class,AccountID from Character order by Resets desc");
with this:

Code:
$query = mssql_query("SELECT TOP 20 Name,Class,cLevel,resets,Money,PKcount,PkLevel,MapNumber,MapPosX,MapPosY,Class,AccountID from Character order by Resets desc, cLevel desc");
Open index.php and change this:

Code:
$query = mssql_query("SELECT TOP 25 Name,Class,Resets,cLevel from Character order by Resets desc");
with this:

Code:
$query = mssql_query("SELECT TOP 25 Name,Class,Resets,cLevel from Character order by Resets desc, cLevel desc");
good luck and have nice work with my site ;)
 
Last edited:
като си ресна героя точките се запазват. защо така? -_-
Code:
$reset_points = "UPDATE [MuOnline].[dbo].[Character] SET [cLevel]='1',[LevelUpPoint]='$newstats',[Money]='$money',[Strength]='30',[Dexterity]='30',[Vitality]='30',[Energy]='30',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";

надявам се натам да можеш сам да се ориентираш
 
Wich file do i have to work on to make the vote page.

Delete:
Code:
$web['vote'] = 'http://bgtop.net/in.php/1253288687'; // Vote link
from config.php

add in index.php:
Code:
					case "vote":
						include("modules/vote.php");
						break;

Delete vote.php from modules, then make your own vote.php
 
  • Like
Reactions: Deleted member 3583
моля ви помогнете спешно ми трябва ;(

Това би трябвало да фиксне статс на по - старите версии!

Code:
$query = mssql_query("select Vitality,Strength,Energy,Dexterity,LevelUpPoint from Character WHERE Name='$name'");
$row = mssql_fetch_row($query);
$new_vit = $row[0] + $vitality;
$new_str = $row[1] + $strength;
$new_eng = $row[2] + $energy;
$new_agi = $row[3] + $dexterity;
$new_com = $row[5] + $command;
$LevelUp = $row[4] + $vitality - $strength - $energy - $dexterity - $command;
if ((eregi("[^a-zA-Z0-9_-]", $name)) || 
(eregi("[^a-zA-Z0-9_-]", $login)) ||
(eregi("[^a-zA-Z0-9_-]", $oldpwd)) ||
(eregi("[^0-9_-]", $vitality)) ||
(eregi("[^0-9_-]", $strength)) ||
(eregi("[^0-9_-]", $energy)) ||
(eregi("[^0-9_-]", $dexterity)) ||
(eregi("[^0-9_-]", $command)))
{
echo "<font color=red ><b>Use only numbers !</font><br>";

}
elseif (empty($login) || empty($oldpwd) || empty($name)) {
echo "<font color=red ><b>Please select a character.</font><br>";}
elseif ($username_check <= 0){ 
echo "<font color=red ><b>Account does not exist in the database.</font><br>"; }
elseif ($name_check <= 0){ 
echo "<font color=red ><b>Character does not exist in the database.</font><br>"; }
elseif ($vitality<0 OR $strength<0 OR $energy<0 OR $dexterity<0 OR $command<0){
echo "<font color=red ><b>Here don't work bugs !</font><br>"; }
elseif ($new_vit>32767 OR $new_str>32767 OR $new_eng>32767 OR $new_agi>32767 OR $new_com>32767){
echo "<font color=red ><b>You can't add more than 32767 points !</font><br>"; }
elseif ($dl == 0 and $command > 0){ 
echo "<font color=red ><b>Only Lords can add command!</font><br>"; }
elseif ($row[4] < 0){ 
echo "<font color=red ><b>You don't have enough points ($row[4])!</font><br>"; }
elseif ($pw_check <= 0){ 
echo "<font color=red ><b>Password is incorrect.</font><br>"; }
else 
{ 
$msconnect=mssql_connect("$dbhost","$dbuser","$dbpassword");
$msdb=mssql_select_db("MuOnline",$msconnect);
$msquery = mssql_query("UPDATE dbo.Character SET $row[0] = '$new_vit',$row[1] = '$new_str',$row[2] = '$new_ene',$row[3] = '$new_dex',$row[4]= '$LevelUp' WHERE Name = '$name'");
{
echo "$name has add some points";
}
 
I have a problem with the reset feature, its saying i dont have enough zen,but on my char i have 2 bilions. Anyone can give the script to fix this thing?

Try with this ;):
 

Attachments

  • clear_reset_do.rar
    1 KB · Views: 141
okey... open your php.ini in c:/windows and change this options:

;extension=php_db.dll ( delete this simbol -> ; <- )
;extension=php_dbase.dll ( delete this simbol -> ; <- )
;extension=php_mssql.dll ( delete this simbol -> ; <- )
;extension=php_sockets.dll ( delete this simbol -> ; <- )

save and restart web server. ;)
 
  • Like
Reactions: stalkeriz
DarksWeb 0.3 Header without the buttons (menu)

darksweblogo.png

Fix clear_reset_do.php

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);
$resmoney = '100000000';
$reslevel = '350';
$maxres   = '2000';
$respoints = '500';
$ConnectStatt = '1';

global $web;
$hero = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$row = mssql_fetch_array($hero);
$acccc = $row['AccountID'];
$online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$acccc'");
$onlinecheck = mssql_fetch_array($online_check);
if (empty($char)) { echo "<td><br><font size=2>Please select Character!</font><br><br></td>"; $error=1; }
elseif ($onlinecheck['ConnectStat'] == $ConnectStatt){ 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) {
$resetup = $row['Resets'] + (1);
$money = $row['Money'] - $resmoney;
$reset_points = "UPDATE character SET [LevelUpPoint]='$respoints',[Money]='$money',cLevel='1',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
$reset_results = mssql_query($reset_points);
echo "<td><br><font size=2><b>$char</b> has been reset!</font><br><br></td>";
} 
 }
  }
?>
 
Last edited:
Online Module...
creat link in web...
 

Attachments

  • online.rar
    958 bytes · Views: 133
Кавто точно трябва да едитна за след рес да се чистят точки, магиите, инвентара ...

PHP:
$reset_points = "UPDATE character SET [LevelUpPoint]='$respoints',[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),[magiclist]= CONVERT(varbinary(180), null) WHERE Name='$char'";
 
  • Like
Reactions: MapTuH4y
i want Web Reset Clear Stats Point . Can you edit for me ?

PHP:
$reset_points = "UPDATE character SET [LevelUpPoint]='$respoints',[Money]='$money',cLevel='1',[Strength]='25',[Dexterity]='25',[Vitality]='25',[Energy]='25',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
 
Status
Not open for further replies.