☺MaxiGame☻
Banlanmış Üye
ShardManager açtığım anda kapanıyo neden olabilir ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Not: This feature may not be available in some browsers.
xp den daha iyi tabi ram 2- değilse
☺MaxiGame☻;1663147' Alıntı:ShardManager açtığım anda kapanıyo neden olabilir ?
bende shard veri tabanı filan istemiyorki sadece acc veri tabanıonı istiyor
hocam kurdum appserv localhost'ta açıyorum register.php açılıyor yerleri dolduruyorum kayıt ol'a basıyorum şöyle bir hata veriyor.
could not find driver
Fatal error: Call to a member function prepare() on a non-object in C:\AppServ\www\class.silkroad.php on line 79
private $odbc_driver = 'SQL Native Client';<?php
/*
@Silkroad Scripts
@Author : Llairenm Ilai - Brasil
@Version : 1.5
-- ---------------------------------------------------
You must have a version of PHP with support for PDO(PHP Data Objects)
and have the drive PDO odbc installed.
*/
class silkroad{
// ODBC SQL Driver
private $odbc_driver = 'SQL Native Client';
private $SQL_host = '.TURBONUN_KI\SQLEXPRESS'; // PC-NAME\SQLEXPRESS
private $SQL_user = 'sa'; // SQL User
private $SQL_pass = '1234'; // SQL Password
private $SQL_db_account = "SRO_VT_ACCOUNT"; // Name DB Account
private $SQL_db_shard = "SRO_VT_SHARD"; // Name DB Shard
public $conn;
function odbcConnect($database){
try{
$this->conn = new PDO("odbcriver={".$this->odbc_driver."};Server=".$this->SQL_host.";Database=".$database.";", $this->SQL_user, $this->SQL_pass);
}catch(PDOException $e){
echo $e->getMessage();
}
}
function checkStr($string){
if(preg_match("/[a-zA-Z0-9_-]/", $string)): return true;
else: return false; endif;
}
function msg($text, $script = ""){
$msg = '<script type="text/javascript">';
$msg.= 'alert("' . $text . '");' . $script;
$msg.= '</script>';
echo $msg;
}
function createAccount(){
if(isset($_POST['silkroad_register']) && !empty($_POST['silkroad_register'])):
$userid = trim($_POST['userid']);
$password = trim($_POST['password']);
$confpassw = trim($_POST['confpassw']);
$email = trim($_POST['email']);
$sex = trim($_POST['sex']);
switch($sex):
case 0: $sex2 = 'M'; break;
case 1: $sex2 = 'F'; break;
endswitch;
$msg = array();
if(strlen($userid) < 3): $msg[] = "Username too short!"; endif;
if(strlen($password) < 6): $msg[] = "Password must be between 6 and 32 characters."; endif;
if(strlen($confpassw) < 6): $msg[] = "Confirmation Password must be between 6 and 32 characters."; endif;
if($password != $confpassw): $msg[] = "Passwords are not the same!"; endif;
if(!preg_match("/^[a-z0-9_-]+(\.[a-z0-9_-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $email)): $msg[] = "Invalid email address."; endif;
if($this->checkStr($userid) === false): $msg[] = "Username contains forbidden symbols"; endif;
if($this->checkStr($password) === false): $msg[] = "Password contains forbidden symbols"; endif;
if($this->checkStr($confpassw) === false): $msg[] = "Confirmation Password contains forbidden symbols"; endif;
if(count($msg) > 0):
for($i = 0; $i < count($msg); $i++):
$error.= '- '. $msg[$i].'\n';
endfor;
$this->msg($error, 'history.back();');
else:
// Open Connection
$this->odbcConnect($this->SQL_db_account);
$accountExists = $this->conn->prepare("SELECT StrUserID FROM [dbo].[TB_User] WHERE StrUserID = :userid");
$accountExists->execute(array(":userid" => $userid));
if($accountExists->fetch(PDO::FETCH_NUM) > 0): $this->msg("Account with such username already exists!",'history.back();');
else:
$md5_password = md5($password);
$insert = $this->conn->prepare("INSERT INTO [dbo].[TB_User](StrUserID,
password,
Name,
Email,
sex,
regtime,
reg_ip,
sec_primary,
sec_content)
VALUESuserid,
assword,
:name,
:email,
:sex,
GETDATE(),
:ip,
'3',
'3')");
$insert->bindValue(":userid", $userid, PDO:ARAM_STR);
$insert->bindValue("assword", $md5_password, PDO:ARAM_STR);
$insert->bindValue(":name", 'No Name', PDO:ARAM_STR);
$insert->bindValue(":email", $email, PDO:ARAM_STR);
$insert->bindValue(":sex", $sex2, PDO:ARAM_STR);
$insert->bindValue(":ip", $_SERVER['REMOTE_ADDR'], PDO:ARAM_STR);
$insert->execute();
if($insert->rowCount() > 0):
$this->msg("Account successfully created!");
else:
$this->msg("Error creating account!",'history.back();');
endif;
endif;
endif;
endif;
}
function playerRank($top = 100){
$this->odbcConnect($this->SQL_db_shard);
$players = $this->conn->query("SELECT TOP ".$top." c.CharName16, c.NickName16, c.MaxLevel, g.Name
FROM [dbo].[_Char] as c
LEFT JOIN [dbo].[_Guild] as g
ON c.GuildID = g.ID
ORDER BY c.MaxLevel DESC, c.CurLevel DESC, InventorySize DESC");
$i = 1;
while($pRows = $players->fetch(PDO::FETCH_ASSOC)):
echo '<tr>
<td style="text-align:center;">'.$i.'º</td>
<td>'.$pRows['CharName16'].'</td>
<td>'.$pRows['NickName16'].'</td>
<td style="text-align:center;">'.$pRows['MaxLevel'].'</td>
<td>'.$pRows['Name'].'</td>
</tr>';
$i++;
endwhile;
}
function guildRank($top = 100){
$this->odbcConnect($this->SQL_db_shard);
$guilds = $this->conn->query("SELECT g.ID, g.Name, g.Lvl, g.GatheredSP
FROM [dbo].[_Guild] as g
LEFT JOIN [dbo].[_AlliedClans] as a
ON g.ID = a.ID");
while($gRows = $guilds->fetch(PDO::FETCH_ASSOC)):
$guildArr[] = array('Lvl' => $gRows['Lvl'],
'Members' => $this->countGuildMembers($gRows['ID']),
'GatheredSP' => $gRows['GatheredSP'],
'Name' => $gRows['Name'],
'Ally' => $this->guildAllies($gRows['ID'])
);
endwhile;
rsort($guildArr);
for($i = 0; $i <= ($top-1); $i++):
echo '<tr>
<td style="text-align:center;">'.($i+1).'º</td>
<td>'.$guildArr[$i]['Name'].'</td>
<td style="text-align:center;">'.$guildArr[$i]['Lvl'].'</td>
<td style="text-align:center;">'.$guildArr[$i]['Members'].'</td>
<td style="text-align:center;">'.$guildArr[$i]['Ally'].'</td>
</tr>';
endfor;
}
function countGuildMembers($guildID){
$this->odbcConnect($this->SQL_db_shard);
if(!is_null($guildID)):
$guilds = $this->conn->prepare("SELECT COUNT(*) FROM [dbo].[_GuildMember] WHERE GuildID = :guildid");
$guilds->bindValue(":guildid", $guildID, PDO:ARAM_INT);
$guilds->execute();
return $guilds->fetchColumn(0);
endif;
}
function guildAllies($guildID){
$this->odbcConnect($this->SQL_db_shard);
if(!is_null($guildID)):
try{
$allies = $this->conn->query("SELECT Ally1, Ally2, Ally3, Ally4, Ally5, Ally6, Ally7, Ally8
FROM [dbo].[_AlliedClans]
WHERE ID = " . $guildID);
$alliesRows = $allies->fetch(PDO::FETCH_NUM);
if(!is_bool($alliesRows)):
for($i = 0; $i <= (count($alliesRows)-1); $i++):
if(!is_null($alliesRows[$i])):
$guilds = $this->conn->query("SELECT Name FROM [dbo].[_Guild] WHERE ID = " . $alliesRows[$i]);
$guildsRows[] = $guilds->fetch(PDO::FETCH_NUM);
endif;
endfor;
foreach($guildsRows as $key => $val):
foreach($val as $value): $ally[] = $value; endforeach;
endforeach;
return '<a href="javascript:void(0)" onclick="alert(\'Allies »\n' . implode("\\n", $ally) . '\');">Allied Clans</a>';
endif;
}catch(PDOException $e){
echo $e->getMessage();
}
endif;
}
}
?>
su bölüme ne yazacagımı söylermisin çünkü driver not found bundan kaynaklanıyor burayı bitürlü çözemedim bunuda yapsam tamam simdiden çok saol.
Arkadaslar Global managerı acarken aldıgım hata.. Ip lerı yanlıs yazmıssın demeyın hepsı dogru.. Cert - server.cfg uyusmazlıgı demeyın aynı ayarlarla arkadasa kurdum ama kendı pcme kuramıyorum kafayı yemek uzereyım lutfen bi yardım.. :jil:
Resmi Orjinal Boyutunda Görüntülemek İçin Buraya Tıklayın 1024x400px.
bende shard veri tabanı filan istemiyorki sadece acc veri tabanıonı istiyor
bu npc item nasıl eklicez ?
1 önceki sf da nerden ekliyebileceginizi yazdım 242. sf ya bakınız rateler le ilgili düzenlemede orda...
Arkadaşlar 3 gündür uğraşıyorum item bugunu çözemedim teamdan yardımcı olacak arkadaş yokmu ya :S