- Joined
- Feb 3, 2010
- Messages
- 429
- Reaction score
- 81
здравейте аз съм така малко непознат за вас от скоро започнах да се занимавам с php и mysql, но ми беше интересно и понеже пуснах сървър който сега е в ремонт, започнах да се занимавам а бе общо взето искам да кажа ,че най-вероятно модулите ще са много зле от кум код, но при мен работят разбира се приемам критики и ако някой може и иска да ги преработва даго прави ще се радвам да се подобрят Всичките кодове са писани върху DarksWeb 0.3 на Backo с модификацията на killar4eto и за да ги напиша съм копирал функции от clear_reset_do.php в сайта
ето ги и тях:
Get Zen с Stones - слага Zen-а в Банката която можете да намерите по долу
Change Race с Stones
тези два модула Get Zen и Change Race работят с Stone & Rena Deposit and Rankings PHP code
Reset Character само съм добавил няколко неща - за да работи трябва да направите нова колона в Character с име BonusPoints от тип bigint.
who is Online това не помня дали го има в DarksWeb 0.3, но и да го е имало аз съм го бил изтрил и ето друг този не е тестван :S надявам се че работи да знаете не вади админите .
Link Ranking за да ви тръгне ви трябва да добавите broizenref в Character като колоната е от тип int след това трябва ако ползвате Даване за зен (по име) просто добавете следните редове в vote.php
а ето го и самия ranking
не съм сигурен че и Admins го нямаше в сайта, но аз съм си го направил. Показва всички Admini и GameMasters за да го ползвате трябва първо да направите в Character една колона Skype която да е от тип varchar 50 е абсолютно достатъчно защото не ми се вярва да има Skype с повече от 50 символа
ето го и модула
не съм го тествал но се надявам че работи
TotalOnline Time - с дни часове и минути показва TotalOnlineTime на героя а не на акаунта работи с Total Online Time Fixed
Update с специалното съдействие на ivowe3
Bank - банката има 2 файла GetZen и PutZen. За да нямате проблеми с банката ви трябва
което се слага в SQL Query Analyzer
GetZen - взима zen-a от банката и ви го дава в сандъка.
PutZen-слага zen-а от сандъка в банката.
LostPassword - по желание на tarikatchi
Zen Рулетка - не е тествана за много хора както я написах я сложих тук сега ще я сложа и в GrizisMu така че ако някой намери някое изпуснато условие да казва
ChangeName с Stones - за 97d+99i на DarkMaster Beta 25 е тествано за над 97d+99i мисля че няма да работи. Ако имате идеи за Update казвайте
GetPoints с Stones- мисля че бачка както трябва ако има нещо моля да кажете
От кога е сървъра ви - в секунди минути часове и дни вади и + и -
ако искате да показва само дни сменете
с
MaxOnlinePlayers - за да не става още по дълга тази тема реших да ви препращам към това
ако има въпроси или грешки ми пишете спокойно и когато мога ще погледна и ако мога да помогна ще го направа надявам се да съм помогнал(все на някой : )
Всичките кодове са писани върху DarksWeb 0.3 на Backo с модификацията на killar4eto и за да ги напиша съм копирал функции от clear_reset_do.php в сайта
ето ги и тях:
Get Zen с Stones - слага Zen-а в Банката която можете да намерите по долу
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'");
}
$error=3;
$xa = mssql_query("SELECT Stone FROM StoneRena WHERE acc='$username'");
$hi = mssql_fetch_array($xa);
$online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
$online_checked = mssql_fetch_array($online_check);
$yourstones = $hi['Stone'];
echo "YourStones : $yourstones <br>";
echo "if stones< 50 -> 1Stone=3 mil zen<br>
if stones> 50 and stones <150 -> 1Stone=5 mil zen<br>
if stones> 150 -> 1Stone=10 mil zen";
echo '<table><form method="POST" action="">
<tr><td><b>Number of Stones for trade</b></td><td><input type="numbers" name="stoneta" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>';
$stones = stripslashes($_POST['stoneta']);
$xa1 = mssql_query("SELECT Zen FROM Bank WHERE Name='$username'");
$hi1 = mssql_fetch_array($xa1);
if ($stones<50){
$money = ($hi1['Zen']*1000000+('3000000' * $stones))/1000000; }
if (($stones>49) and ($stones<150)) {
$money = ($hi1['Zen']*1000000+('5000000' * $stones))/1000000; }
if ($stones>=150){
$money = ($hi1['Zen']*1000000+('10000000' * $stones))/1000000; }
if (empty($stones)) { echo ""; $error=1; }
elseif ($yourstones<$stones) {echo "You don't have enough stones.YourStones are $yourstones"; $error=1;}
elseif ($online_checked['ConnectStat'] != 0){ echo "Account is online, must be logged off"; $error=1;}
elseif ($money>=99999999){ echo "Your BankZen is more then 99999999000000 "; $error=1;}
elseif ($stones<0){ echo "You Must Use Only Numbers"; $error=1;}
elseif (! is_nan(acos($stones))){ echo "You Must Use Only Numbers"; $error=1;}
if($error ==3)
{
$stones1 = $yourstones-$stones;
$stones11 = "UPDATE StoneRena SET [Stone]='$stones1' WHERE acc='$username'";
$reset_results = mssql_query($stones11);
$off = mssql_query("SELECT Name,Zen from Bank WHERE Name='$username'");
$row112 = mssql_fetch_row($off);
if (empty($row112[0])){
$money11 = "INSERT INTO Bank (Name , zen) VALUES('$username' , '$money')";
$reset_results = mssql_query($money11);
}
else{
$money11 = "UPDATE Bank SET [Zen]='$money' WHERE Name='$username'";
$reset_results = mssql_query($money11);
}
$xaxa[2]=$money;
echo "You have $xaxa[2]000000 on your WebBank";}
?>
</table>
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'");
}
$xa = mssql_query("SELECT Stone FROM StoneRena WHERE acc='$username'");
$hi = mssql_fetch_array($xa);
$online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
$online_checked = mssql_fetch_array($online_check);
$yourstones = $hi['Stone'];
$stones = 1000;
echo "YourStones : $yourstones <br>";
if ($yourstones<$stones) {
$need=$stones-$yourstones;
echo "You need of $need to Change you race<br>";}
if ($yourstones>=$stones) {
$need=$yourstones-$stones;
echo "You can Change Your Race and yourstones will be $need<br>";}
echo "<center>Races:<br>
SoulMaster<br>
BladeKnight<br>
MuseElf<br>
MagicGladiator</center>";
echo '<table><form method="POST" action="">
<tr><td><b>You Charachert Name</b></td><td><input type="name" name="name" size="25"/></td></tr>
<tr><td><b>Race</b></td><td><input type="name" name="race" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>';
$race = stripslashes($_POST['race']);
$char = stripslashes($_POST['name']);
if (empty($race)) { echo ""; $error=1; }
elseif (($race<>SoulMaster) and ($race<>'BladeKnight') and ($race<>'MuseElf') and ($race<>MagicGladiator) ) { echo "<font size=2>íàïèñàëè ñòå ãðåøíî èìåòî íà ðàñàòà</font>"; $error=1; }
elseif ($yourstones<$stones) { echo "<font size=2>You don't have enough stones.You need of $need to Change you race</font>"; $error=1; }
elseif ($online_checked['ConnectStat'] != 0){ echo "<font size=2>Account is online, must be logged off!</font>"; $error=1; }
if($error !=1)
{
if ($race=='SoulMaster') { $cl=1;}
elseif ($race=='BladeKnight') { $cl=17;}
elseif ($race=='MuseElf'){ $cl=33 ;}
elseif ($race=='MagicGladiator') { $cl=48 ;}
$xa2 = mssql_query("SELECT AccountID FROM Character WHERE Name='$char'");
$hi2 = mssql_fetch_array($xa2);
$username = $hi2['AccountID'];
$stones1 = $yourstones-$stones;
$stones11 = "UPDATE StoneRena SET [Stone]='$stones1' WHERE acc='$username'";
$reset_results = mssql_query($stones11);
$xa1 = mssql_query("SELECT class FROM Character WHERE Name='$char'");
$hi1 = mssql_fetch_array($xa1);
$race1 = "UPDATE Character SET [class]='$cl' WHERE Name='$char'";
$reset_results = mssql_query($race1);
echo "âàøàòà ðàñà áåøå ñìåíåíà íà $race";}
?>
</table>
Reset Character само съм добавил няколко неща - за да работи трябва да направите нова колона в Character с име BonusPoints от тип 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'");
}
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);
$resmoney = '10000000'*($res['Resets']+1); // ako neiskate zena da e zena po broq resets iztriite prosto "*($res['Resets']+1)" i ste gotovi :)
$reslevel = '350';
$maxres = '50';
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
$respoints1 = ($respoints + ($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'];
$newstats = ($row['Resets'] * $respoints) + $respoints1;
$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),[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>";
}
}
}
?>
PHP:
<center>
<?
include_once('config.php');
include('rankingmenu.php');
error_reporting (E_ALL ^ E_NOTICE);
$acc1 = mssql_query("SELECT memb___id from MEMB_STAT where ConnectStat='1' order by ConnectTM desc ");
$i1=0;
for($i=0;$i < mssql_num_rows($acc1);++$i)
{
$acc = mssql_fetch_row($acc1);
$char1 = mssql_query("Select GameIDC from AccountCharacter where Id='$acc[0]'");
$char = mssql_fetch_row($char1);
$query = mssql_query("SELECT Name,Class,cLevel,resets,Money,PKcount,PkLevel,MapNumber,MapPosX,MapPosY,Class,AccountID,CtlCode from Character where Name='$char[0]'");
$row = mssql_fetch_row($query);
$status="select ConnectStat from MEMB_STAT where memb___id='$row[11]'";
$sql_status_check=mssql_query($status);
$row1=mssql_fetch_row($sql_status_check);
if (($row[12]<>8) and ($row1[0] == 1))
{
$i1 = $i1+1;
$rank = $i1;
if($row1[0] == 0){ $row1[0] ='<img src=images/Offline.gif> <img src=images/Offline1.gif>';
}
if($row1[0] == 1){ $row1[0] ='<img src=images/Online.gif> <img src=images/Online11.gif>';
}
if($row[1]==0){$cl='Dark Wizard';}
elseif($row[1]==1){$cl='Soul Master';}
elseif($row[1]==2){$cl='Grand Master';}
elseif($row[1]==16){$cl='Dark Knight';}
elseif($row[1]==17){$cl='Blade Knight';}
elseif($row[1]==18){$cl='Blade Master';}
elseif($row[1]==19){$cl='Blade Master';}
elseif($row[1]==32){$cl='Elf';}
elseif($row[1]==33){$cl='Muse Elf';}
elseif($row[1]==34){$cl='High Elf';}
elseif($row[1]==48){$cl='Magic Gladiator';}
elseif($row[1]==49){$cl='Duel Master';}
elseif($row[1]==64){$cl='Dark Lord';}
elseif($row[1]==65){$cl='Lord Emperor';}
elseif($row[1]==66){$cl='Lord Emperor';}
elseif($row[1]==80){$cl='Summoner';}
elseif($row[1]==81){$cl='Bloody Summoner';}
elseif($row[1]==82){$cl='Dimension Master';}
elseif($row[1]==83){$cl='Dimension Master';}
else{$cl=$row[1];}
if($row[10]==0){$pic='<img src=images/small_dw.png>';}
elseif($row[10]==1){$pic='<img src=images/small_dw.png>';}
elseif($row[10]==2){$pic='<img src=images/small_dw.png>';}
elseif($row[10]==16){$pic='<img src=images/small_dk.png>';}
elseif($row[10]==17){$pic='<img src=images/small_dk.png>';}
elseif($row[10]==18){$pic='<img src=images/small_dk.png>';}
elseif($row[10]==19){$pic='<img src=images/small_dk.png>';}
elseif($row[10]==32){$pic='<img src=images/small_elf.png>';}
elseif($row[10]==33){$pic='<img src=images/small_elf.png>';}
elseif($row[10]==34){$pic='<img src=images/small_elf.png>';}
elseif($row[10]==48){$pic='<img src=images/small_mg.png>';}
elseif($row[10]==49){$pic='<img src=images/small_mg.png>';}
elseif($row[10]==64){$pic='<img src=images/small_dl.png>';}
elseif($row[10]==65){$pic='<img src=images/small_dl.png>';}
elseif($row[10]==66){$pic='<img src=images/small_dl.png>';}
elseif($row[10]==80){$pic='<img src=images/small_sum.png>';}
elseif($row[10]==81){$pic='<img src=images/small_sum.png>';}
elseif($row[10]==82){$pic='<img src=images/small_sum.png>';}
elseif($row[10]==83){$pic='<img src=images/small_sum.png>';}
else{$pic=$row[10];}
if($row[7]==0){$map='Lorencia';}
elseif($row[7]==1){$map='Dungeon';}
elseif($row[7]==2){$map='Devias';}
elseif($row[7]==3){$map='Noria';}
elseif($row[7]==4){$map='LostTower';}
elseif($row[7]==5){$map='Excile';}
elseif($row[7]==6){$map='Stadium';}
elseif($row[7]==7){$map='Atlans';}
elseif($row[7]==8){$map='Tarkan';}
elseif($row[7]==9){$map='Devil Square';}
elseif($row[7]==32){$map='Devil Square';}
elseif($row[7]==10){$map='Icarus';}
elseif($row[7]==11){$map='Blood Castle 1';}
elseif($row[7]==12){$map='Blood Castle 2';}
elseif($row[7]==13){$map='Blood Castle 3';}
elseif($row[7]==14){$map='Blood Castle 4';}
elseif($row[7]==15){$map='Blood Castle 5';}
elseif($row[7]==16){$map='Blood Castle 6';}
elseif($row[7]==17){$map='Blood Castle 7';}
elseif($row[7]==18){$map='Chaos Castle 1';}
elseif($row[7]==19){$map='Chaos Castle 2';}
elseif($row[7]==20){$map='Chaos Castle 3';}
elseif($row[7]==21){$map='Chaos Castle 4';}
elseif($row[7]==22){$map='Chaos Castle 5';}
elseif($row[7]==23){$map='Chaos Castle 6';}
elseif($row[7]==24){$map='Kalima 1';}
elseif($row[7]==25){$map='Kalima 2';}
elseif($row[7]==26){$map='Kalima 3';}
elseif($row[7]==27){$map='Kalima 4';}
elseif($row[7]==28){$map='Kalima 5';}
elseif($row[7]==29){$map='Kalima 6';}
elseif($row[7]==36){$map='Kalima 7';}
elseif($row[7]==30){$map='Valley Of Loren';}
elseif($row[7]==31){$map='Lands Of Trials';}
elseif($row[7]==33){$map='Aida';}
elseif($row[7]==34){$map='CryWolf';}
elseif($row[7]==35){$map='Silent Map';}
elseif($row[7]==37){$map='Kanturu Ruin';}
elseif($row[7]==38){$map='Kanturu Remain';}
elseif($row[7]==39){$map='Kanturu Tower';}
else{$map=$row[7];}
if($row[6]==1){$pklvl='<font color=#605ca8>Hero</font>';}
elseif($row[6]==2){$pklvl='<font color=#abcef8>Commoner</font>';}
elseif($row[6]==3){$pklvl='Normal';}
elseif($row[6]==4){$pklvl='<font color=#fbaf5d>Against Murderer</font>';}
elseif($row[6]==5){$pklvl='<font color=#a0410d>Murderer</font>';}
elseif($row[6]==6){$pklvl='<font color=#c81118>Phonomania</font>';}
else{$pklvl=$row[6];}
echo "
<tr><td class='news-head' rowspan='4' width='50'>$pic</td><td class='news-head' align='center'>
Name</td><td class='news-head' align='center'>
Level /<font color=red>Resets</font></td><td class='news-head' align='center'>
Class</td><td class='news-head' align='center'>
Status</td><td class='news-head' align='center'>
#</td></tr><tr><td class='news-rest' align='center'>
<b><font color=white>$row[0]</font></b></td><td class='news-rest' align='center'>
<b>$row[2] / <font color='red'>$row[3]</font></b></td><td class='news-rest' align='center'>
$cl</td>
<td class='news-rest' align='center'>
<center>$row1[0]</center></td><td class='news-rest' align='center'>
$rank</td></tr>
<td>
</tr><td>
</td>
";
}
}
?>
</table>
PHP:
$xa = mssql_query("SELECT broizenref FROM Character WHERE AccountID='$id'");
$hi = mssql_fetch_array($xa);
$puti = '1'+$hi['broizenref'];
$broi = "UPDATE character SET [broizenref]='$puti' WHERE AccountID='$id'";
$reset_results = mssql_query($broi);
PHP:
<?
include_once('config.php');
include('rankingmenu.php');
error_reporting (E_ALL ^ E_NOTICE);
$query = mssql_query("SELECT TOP 25 Name,broizenref,CtlCode from Character order by broizenref desc");
echo '
<table width="160" border=0 align="center" bgcolor="#36261b">
<tr>
<td valign=top align=left width=0 height=0 class="rank"><b>[#]</b></td>
<td valign=top align=left width=0 class="rank"><center><b>Character</center></b></td>
<td valign=top align=right width=60 class="rank"><b><center>Clicks</center></b></td>
';
$i1=0;
for($i=0;$i < mssql_num_rows($query);++$i)
{
$row = mssql_fetch_row($query);
if ($row[2]<>8)
{
$i1 = $i1+1;
$rank = $i1;
if($i1%2) { $colors = "#483422";} else { $colors="#7b6c40"; }
echo "
<tr bgcolor='$colors' class='rank'><td>$rank.</td>
<td>$row[0]</td>
<td class='rank' width=60><center>$row[1]</center></td>
</tr>
</font>
";
}
}
?>
</table></table>
ето го и модула
PHP:
<?
include_once('config.php');
error_reporting (E_ALL ^ E_NOTICE);
$query = mssql_query("SELECT Name,CtlCode,Skype from Character order by Name desc");
echo '
<table width="350" border=0 align="center" ">
<tr>
<td valign=top align=center width=0 height=0 class="rank"><b>[#]</b></td>
<td valign=top align=center width=0 class="rank"><center><b>Character</center></b></td>
<td valign=top align=center width=0 class="rank"><center><b>Skype</center></b></td>
';
$i1=0;
for($i=0;$i < mssql_num_rows($query);++$i)
{
$row = mssql_fetch_row($query);
if ($row[1]==8)
{
$i1 = $i1+1;
$rank = $i1;
echo "
<tr bgcolor='$colors' class='rank'><td><center>$rank.</center></td>
<td><center>$row[0]</center></td>
<td><center>$row[2]</center></td>
</tr>
</font>
";
}
}
?>
</table></table>
TotalOnline Time - с дни часове и минути показва TotalOnlineTime на героя а не на акаунта работи с Total Online Time Fixed
Update с специалното съдействие на ivowe3
PHP:
<?
include_once('config.php');
error_reporting (E_ALL ^ E_NOTICE);
$query = mssql_query("SELECT TOP 10 Name,CtlCode,TotalTime from Character order by TotalTime desc");
echo '
<table width="250" border=0 align="center" bgcolor="#36261b">
<tr>
<td valign=top align=left width=0 height=0 class="rank"><b>[+]</b></td>
<td valign=top align=left width=0 class="rank"><center><b>Character</center></b></td>
<td valign=top align=right width=60 class="rank"><b><center>TotalOnlineTime</center></b></td>
';
$rank=0;
for($i=0;$i < mssql_num_rows($query);++$i)
{
$row = mssql_fetch_row($query);
if ($row[1]<>8){
$rank = $rank+1;
if($i%2) { $colors = "#483422";} else { $colors="#7b6c40"; }
$min = $row[2];
$chas = floor($min/60);
$days = floor($chas/24);
$chas = $chas % 24;
$min = $row[2] % 60;
echo "
<tr bgcolor='$colors' class='rank'><td>$rank.</td>
<td class='rank'>$row[0]</a></td>
<td class='rank' width=200><center>$days days:$chas hours:$min minutes</center></td>
</tr>
</font>
";
}
}
?>
</table></table>
Bank - банката има 2 файла GetZen и PutZen. За да нямате проблеми с банката ви трябва
PHP:
use MuOnline
CREATE TABLE Bank1
(
Name varchar(10),
Zen bigint,
)
GetZen - взима zen-a от банката и ви го дава в сандъка.
PHP:
<?
ob_start();
session_start();
include_once('config.php');
$username = $_SESSION['member_username'];
secure($_POST['username']);
error_reporting (E_ALL ^ E_NOTICE);
$query = mssql_query("SELECT Name,Zen from Bank WHERE Name = '$username'");
$row = mssql_fetch_row($query);
$query1 = mssql_query("SELECT AccountID,Money from warehouse WHERE AccountID = '$row[0]'");
$row1 = mssql_fetch_row($query1);
$row[1]=$row[1];
echo "You have $row[1]000000 Zen";
echo '<table><form method="POST" action="">
<tr><td><b>Get</b></td><td><input type="numbers" name="getzen" size="5"/></td><td>Milions Zen</td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>';
$getzen = stripslashes($_POST['getzen']);
$maxzen = '999999999'; //тук сложете колко е max-а на вашия съндък
$row1[1]= $row1[1];
$maxzen1 = $row1[1]+$getzen*1000000;
if (empty($getzen)) { echo ""; $error=1; }
elseif ($getzen>$row[1]) {echo "You don't have enough zen.Your Zen is $row[0]"; $error=1;}
elseif ($online_checked['ConnectStat'] != 0){ echo "Account is online, must be logged off"; $error=1;}
elseif ($maxzen1>$maxzen){ echo "Max warehouse zen is $maxzen"; $error=1;}
elseif ($getzen<0){ echo "You Must Use Only Numbers"; $error=1;}
elseif (! is_nan(acos($getzen))){ echo "You Must Use Only Numbers"; $error=1;}
if($error !=1)
{
$bankzen1 = $row[1] - $getzen;
$yourzen = $getzen*1000000 + $row1[1];
$zenbank = "UPDATE Bank SET [Zen]='$bankzen1' WHERE Name='$username'";
$reset_results = mssql_query($zenbank);
$money = "UPDATE warehouse SET [Money]='$yourzen' WHERE AccountID = '$row[0]'";
$reset_results = mssql_query($money);
}
?>
</table>
PHP:
<?
ob_start();
session_start();
include_once('config.php');
$username = $_SESSION['member_username'];
secure($_POST['username']);
error_reporting (E_ALL ^ E_NOTICE);
$query = mssql_query("SELECT Money,AccountID from warehouse WHERE AccountID = '$username'");
$row = mssql_fetch_row($query);
echo "You have $row[0] Zen";
echo '<table><form method="POST" action="">
<tr><td><b>Get</b></td><td><input type="numbers" name="bankzen" size="5"/></td><td>Milions Zen</td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>';
$bankzen = stripslashes($_POST['bankzen'])*1000000;
$bankzencheck = mssql_query("SELECT Zen from Bank WHERE Name = '$username'");
$checkzen = mssql_fetch_row($bankzencheck);
$checkzen1=($checkzen[1]+$bankzen)/1000000;
if (empty($bankzen)) { echo ""; $error=1; }
elseif ($bankzen>$row[0]) {echo "You don't have enough zen.Your Zen is $row[0]"; $error=1;}
elseif ($bankzen<0){ echo "You Must Use Only Numbers"; $error=1;}
elseif ($checkzen1>99999999){ echo "Your BankZen is more then 99999999000000"; $error=1;}
elseif ($online_checked['ConnectStat'] != 0){ echo "Account is online, must be logged off"; $error=1;}
elseif (! is_nan(acos($bankzen))){ echo "You Must Use Only Numbers"; $error=1;}
if($error !=1)
{
$YourZen = $row[0] - $bankzen;
$query1 = mssql_query("SELECT Name,Zen from Bank WHERE Name = '$username'");
$row1 = mssql_fetch_row($query1);
$bankzen1 = $bankzen/1000000 + $row1[1];
if (empty($row1[0])){
$a = mssql_query("INSERT INTO Bank (Name , zen) VALUES('$row[1]' , '$bankzen1')");}
else{
$zenbank = "UPDATE Bank SET [Zen]='$bankzen1' WHERE Name='$username'";
$reset_results = mssql_query($zenbank);}
$money = "UPDATE warehouse SET [Money]='$YourZen' WHERE AccountID = '$username'";
$reset_results = mssql_query($money);}
?>
</table>
LostPassword - по желание на tarikatchi
PHP:
<?php
ob_start();
session_start();
include("../inc/sqlcfg.php");
include("../config.php");
echo '<table align="center" width="400" id="main">
<form method="POST" action="">
<tr><td><b>Account:</b></td><td><input type="text" name="acc" size="25"/></td></tr>
<tr><td><b>e-mail:</b></td><td><input type="text" name="e-mail" size="25"/></td></tr>
<tr><td><b>Sec. Question:</b></td><td><input type="text" name="question" size="25"/></td></tr>
<tr><td><b>Sec. Answer:</b></td><td><input type="text" name="answer" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr><br>
</form>
</table>';
$account = stripslashes($_POST['acc']);
$email = stripslashes($_POST['e-mail']);
$question = stripslashes($_POST['question']);
$answer = stripslashes($_POST['answer']);
$membinfo = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$account'");
$xa = mssql_fetch_array($membinfo);
if ((empty($account)) and (empty($email)) and (empty($question)) and (empty($answer))) { echo "<td><br><font size=2></font><br><br></td>"; $error=1; }
elseif (empty($account)){ echo "<tr><br><font size=2>Account empty!</font><br><br></tr>"; $error=1; }
elseif (empty($email)) { echo "<tr><br><font size=2>E-mail empty!</font><br><br></tr>"; $error=1; }
elseif (empty($question)){ echo "<tr><br><font size=2>Sec. Question empty!</font><br><br></tr>"; $error=1; }
elseif (empty($answer)) { echo "<tr><br><font size=2>Sec. Answer empty!</font><br><br></tr>"; $error=1; }
elseif (empty($xa['mail_addr'])) { echo "<tr><br><font size=2>Wrong Account!</font><br><br></tr>"; $error=1; }
elseif ($email<>$xa['mail_addr']) { echo "<tr><br><font size=2>Wrong E-mail!</font><br><br></tr>"; $error=1; }
elseif ($question<>$xa['fpas_ques']) { echo "<tr><br><font size=2>Wrong Sec. Question!</font><br><br></tr>"; $error=1; }
elseif ($answer<>$xa['fpas_answ']) { echo "<tr><br><font size=2>Wrong Sec. Answer!</font><br><br></tr>"; $error=1; }
if($error !=1) {
$password = $xa['memb__pwd'];
echo '<font size=2>Your password is</font> ';
echo "<font size=2 color='red'><b>$password</b></font>";
}
?>
</table>
PHP:
<?
ob_start();
session_start();
include_once('config.php');
$username = $_SESSION['member_username'];
secure($_POST['username']);
error_reporting (E_ALL ^ E_NOTICE);
$query = mssql_query("SELECT Name,Zen from Bank WHERE Name = '$username'");
$row = mssql_fetch_row($query);
echo '<table><form method="POST" action="">
<tr><td><b>Zen</b></td><td><input type="numbers" name="zen" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>';
$zen = stripslashes($_POST['zen']);
$maxzen = '999999999999'; //тук сложете колко е max-а на вашaта банка
$minzen = '50000000'; //тук сложете колко е min-а за игра в рулетката
$x = rand(1,5);
if ($x =='1'){$win='0'; $zen1 = $row[1] - $zen; }
elseif ($x=='2'){$win='1'; $zen1 = ($row[1]-$zen)+($zen * '2'); }
elseif ($x=='3'){$win='0'; $zen1 = $row[1]-$zen;}
elseif ($x=='4'){$win='1'; $zen1 = ($row[1]-$zen)+($zen * '2'); }
elseif ($x=='5'){$win='0'; $zen1 = $row[1]-$zen;}
if (empty($zen)) { echo ""; $error=1; }
elseif ($zen>$row[1]) {echo "You don't have enough zen.Your Zen is $row[1]"; $error=1;}
elseif ($zen1>=$maxzen){ echo "Max WebBank Zen is $maxzen"; $error=1;}
elseif ($zen<$minzen){echo "Min Zen to play is $minzen"; $error=1;}
elseif (! is_nan(acos($zen))){ echo "You Must Use Only Numbers"; $error=1;}
if($error !=1)
{
$bankzen1 = $zen1;
$zenbank = "UPDATE Bank SET [Zen]='$bankzen1' WHERE Name='$username'";
$reset_results = mssql_query($zenbank);
if ($win=='0') {echo "You Lose $zen . Your zen now is $bankzen1";}
else {echo "You Won. Your zen now is $bankzen1";}
}
?>
</table>
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'");
}
$error=10;
$xa = mssql_query("SELECT Stone FROM StoneRena WHERE acc='$username'");
$hi = mssql_fetch_array($xa);
$online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
$online_checked = mssql_fetch_array($online_check);
$yourstones = $hi['Stone'];
echo "YourStones : $yourstones <br>";
echo "ChangeNameConst: 1000 Stones";
$cost=1000; // kolko da struva smqnata na ime :)
echo '<table><form method="POST" action="">
<tr><td><b>CharacterName </b></td><td><input type="text" name="name" size="25"/></td></tr>
<tr><td><b>NewCharacterName </b></td><td><input type="text" name="newname" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>';
$name = stripslashes($_POST['name']);
$newname = stripslashes($_POST['newname']);
$xa51 = mssql_query("SELECT Name,AccountID FROM Character WHERE Name='$name'");
$hi51 = mssql_fetch_array($xa51);
$name1 = $hi51['Name'];
$acc = $hi51['AccountID'];
if ((empty($name)) and (empty($newname))) {$error=1; }
elseif (empty($newname)) {echo "NewCharacterName is empty ";$error=1; }
elseif (empty($name)) {echo "CharacterName is empty";$error=1; }
elseif ($name<>$name1) {echo "Wrong CharacterName";$error=1; }
elseif ($yourstones<$cost) {echo "You don't have enough stones.YourStones are $yourstones"; $error=1;}
elseif ($acc<>$username){ echo "This isn't your hero !"; $error=1;}
elseif ($online_checked['ConnectStat'] != 0){ echo "Account is online, must be logged off"; $error=1;}
if($error ==10)
{
$stones1=$yourstones-$cost;
$stones11 = "UPDATE StoneRena SET [Stone]='$stones1' WHERE acc='$username'";
$reset_results = mssql_query($stones11);
$Name1 = "UPDATE Character SET [Name]='$newname' WHERE Name='$name'";
$reset_results = mssql_query($Name1);
$Account = mssql_query("SELECT GameId1,GameId2,GameId3,GameId4,GameId5 FROM AccountCharacter WHERE id='$username'");
$accto = mssql_fetch_array($Account);
if ($accto['GameId1']==$name){$where='GameId1';}
elseif ($accto['GameId2']==$name){$where='GameId2';}
elseif ($accto['GameId3']==$name){$where='GameId3';}
elseif ($accto['GameId4']==$name){$where='GameId4';}
elseif ($accto['GameId5']==$name){$where='GameId5';}
$Name2 = "UPDATE AccountCharacter SET [$where]='$newname' WHERE Id='$username'";
$reset_results = mssql_query($Name2);
$Name3 = "UPDATE EVENT_INFO SET [CharacterName]='$newname' WHERE CharacterName='$name'";
$reset_results = mssql_query($Name3);
$Name4 = "UPDATE EVENT_INFO_BC SET [CharacterName]='$newname' WHERE CharacterName='$name'";
$reset_results = mssql_query($Name4);
$Name5 = "UPDATE Guild SET [G_Master]='$newname' WHERE G_Master='$name'";
$reset_results = mssql_query($Name5);
$Name6 = "UPDATE GuildMember SET [Name]='$newname' WHERE Name='$name'";
$reset_results = mssql_query($Name6);
$Name7 = "UPDATE OptionData SET [Name]='$newname' WHERE Name='$name'";
$reset_results = mssql_query($Name7);
echo "Your Name is $newname";}
?>
</table>
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'");
}
$error=0;
$xa = mssql_query("SELECT Stone FROM StoneRena WHERE acc='$username'");
$hi = mssql_fetch_array($xa);
$online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
$online_checked = mssql_fetch_array($online_check);
$maxpoints = '10000'; // tuk kazvate kolko da e max to4ki koito da mogat da zemat s stonove
$yourstones = $hi['Stone'];
echo "YourStones : $yourstones <br>";
echo "1 Stone=1 Point <br> Max GetPoints:10 000";
echo '<table><form method="POST" action="">
<tr><td><b>CharacterName </b></td><td><input type="text" name="name" size="25"/></td></tr>
<tr><td><b>Number of Stones for trade</b></td><td><input type="numbers" name="stoneta" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit" /></td></tr></form></table>';
$stones = stripslashes($_POST['stoneta']);
$char = stripslashes($_POST['name']);
$xa51 = mssql_query("SELECT Name,GetBonusPoints FROM Character WHERE Name='$char'");
$hi51 = mssql_fetch_array($xa51);
$name = $hi51['Name'];
$realpoints = $hi51['GetBonusPoints '];
if ((empty($stones)) and (empty($char))) {$error=1; }
elseif (empty($stones)) {echo "Number of Stones for trade is empty ";$error=1; }
elseif (empty($char)) {echo "CharacterName is empty";$error=1; }
elseif ($char<>$name) {echo "Wrong CharacterName";$error=1; }
elseif ($yourstones<$stones) {echo "You don't have enough stones.YourStones are $yourstones"; $error=1;}
elseif ($online_checked['ConnectStat'] != 0){ echo "Account is online, must be logged off"; $error=1;}
elseif ($realpoints>$maxpoints){ echo "max Get Points are $maxpoints"; $error=1;}
elseif ($stones==1){}
elseif (! is_nan(acos($stones))){ echo "You Must Use Only Numbers"; $error=1;}
if($error ==0)
{
$xa1 = mssql_query("SELECT LevelUpPoint,GetBonusPoints FROM Character WHERE Name='$char'");
$hi1 = mssql_fetch_array($xa1);
$stones1 = $yourstones-$stones;
$points = $stones*1;
$points0 = $points+$hi1['GetBonusPoints'];
$mypoints = $points+$hi1['LevelUpPoint'];
$stones11 = "UPDATE StoneRena SET [Stone]='$stones1' WHERE acc='$username'";
$reset_results = mssql_query($stones11);
$points11 = "UPDATE Character SET [GetBonusPoints]='$points0',[LevelUpPoint]='$mypoints' WHERE Name='$char'";
$reset_results = mssql_query($points11);
echo "You have $mypoints LevelUpPoints and $points0 GetBonusPoints";}
?>
</table>
PHP:
<?
$sec = floor((time() - mktime(20,0,0,9,03,2012)) );
if ($sec<=60){
while ($sec<=60){
$sec=$sec+60;
$min=$min-1;
if ($min>=60){
$hours=$hours-1;
$min=$min+60;
if ($hours>=24){
$days=$days-1;
$hours=$hours+24;
}}}}
if ($sec>=60){
while ($sec>=60){
$sec=$sec-60;
$min=$min+1;
if ($min>=60){
$hours=$hours+1;
$min=$min-60;
if ($hours>=24){
$days=$days+1;
$hours=$hours-24;
}}}}
echo "<i><b><u><font color='#ff6600' size=2> The server is on $days Days $hours Hours $min Minutes $sec Seconds </font></i></b></u>";
?>
PHP:
echo "<i><b><u><font color='#ff6600' size=2> The server is on $days Days $hours Hours $min Minutes $sec Seconds </font></i></b></u>
PHP:
echo "<i><b><u><font color='whitegreen' size=2> The server is on $days Deys!</font></i></b></u>";
ако има въпроси или грешки ми пишете спокойно и когато мога ще погледна и ако мога да помогна ще го направа надявам се да съм помогнал(все на някой : )
Всичките кодове са писани върху DarksWeb 0.3 на Backo с модификацията на killar4eto и за да ги напиша съм копирал функции от clear_reset_do.php в сайта
Last edited: