Oturum Zaman aşımına uğradı hatası genellikle xSkip kullanıcıları
tarafından alınır. Sebebi ise, Pus linkinin exe den direk verili
olmaması.
Exe'den xSkip sunucusuna bağlanılır ve xSkip sunucusunda ekli olan Pus
linki devreye girer. Bu sebepten dolayıda Oyuncunun Client IP sinde
uyuşmazlık meydana gelir.
Soacs kullanıcıları hata alıyorsa ?
Evet bunuda fixledim.
Soacs Kullanıcıları Bu Kodu common.php de aratıp, minute=30 u, minute=0 yaparsanız sorununuz düzelir. Ya da
tarafından alınır. Sebebi ise, Pus linkinin exe den direk verili
olmaması.
Exe'den xSkip sunucusuna bağlanılır ve xSkip sunucusunda ekli olan Pus
linki devreye girer. Bu sebepten dolayıda Oyuncunun Client IP sinde
uyuşmazlık meydana gelir.
Soacs kullanıcıları hata alıyorsa ?
Evet bunuda fixledim.
Soacs Kullanıcıları Bu Kodu common.php de aratıp, minute=30 u, minute=0 yaparsanız sorununuz düzelir. Ya da
- Kod:
function set_cookie($value, $minute=30)
- Kod:
<?php
/*#############################################################################
# Bu script AVCI tarafindan yazilmistir. #
# Arkaplandaki "Written by AVCI" yazisinin resimden kazinmamasi dilegimle... #
#############################################################################*/
include("db/odbc.php");
session_start();
define("AVCI",true);
define("CACHE_FOLDER","cache/");
define("CACHEKULLAN",FALSE); // Sayfalarin her defasinda derlenmelerini engelleyip performans artisi saglamak için TRUE yapiniz
if (isset($_POST['mgid']) and isset($_POST['param']))
{
CheckUser(post('mgid'));
$Cerez[0] = $user;
$bos = explode(",",$_POST["param"]);
$_SESSION['bos'] = $bos[2];
$Cerez[1] = $charid;
$CerezValue = implode("/%/",$Cerez);
if ($_SESSION['bos'] == 0) Hata("Inventory nizde bos yer yok!");
set_cookie($CerezValue);
} else if ( isset($_COOKIE['PUS_AVCI']) )
{
$Cerez = explode("/%/",$_COOKIE['PUS_AVCI']);
CheckUser($Cerez[0]);
set_cookie($_COOKIE['PUS_AVCI']);
}
function CheckCache($file)
{
$dk = 60;
$cachetime = $dk * 30;
if (CACHEKULLAN)
{
if ( !file_exists($file) ) return False; else
if ( filemtime($file) < (time() - $cachetime) ) return False; else return True;
} else return False;
}
function CheckUser ($usr)
{
global $user,$charid,$cashpoint,$bk,$pusadmin,$_COOKIE;
$charids = doquery("SELECT straccountid, strcharid FROM CURRENTUSER WHERE straccountid='".$usr."'",true);
$userip = $_SERVER['REMOTE_ADDR'];
if (!$charids != $straccountid) Hata("Lütfen Oyundan Giris Yapin!");
$charid = $charids['strcharid'];
$user = $charids['straccountid'];
$cashpoint = doquery("SELECT cashpoint,pusadmin FROM TB_USER WHERE Straccountid='".$user."'",true);
$bk = $cashpoint['cashpoint'];
$pusadmin = $cashpoint['pusadmin'];
}
//if ($_SESSION['bos'] == "") hata("asd");
function temizle($deger)
{
$karakterler = array(chr(39),chr(92),chr(34),"-","/",";");
$deger = str_replace($karakterler,"",$deger);
return $deger;
}
function get($deger)
{
global $_GET;
$deger = $_GET[$deger];
$karakterler = array(chr(39),chr(92),chr(34),"-","/",";");
$deger = str_replace($karakterler,"",$deger);
return $deger;
}
function post($deger)
{
global $_POST;
$deger = $_POST[$deger];
$karakterler = array(chr(39),chr(92),chr(34),"-","/",";");
$deger = str_replace($karakterler,"",$deger);
return $deger;
}
function pretty_number($n, $floor = true) {
if ($floor) {
$n = floor($n);
}
return number_format($n, 0, ",", ".");
}
function ReadFromFile($filename) {
$content = @file_get_contents ($filename);
return $content;
}
function SaveToFile ($filename, $content) {
$content = @file_put_contents ($filename, $content);
}
function parsetemplate ($template, $array) {
return preg_replace('#\{([a-z0-9\-_]*?)\}#Ssie', '( ( isset($array['\1']) ) ? $array['\1'] : '' );', $template);
}
function gettemplate ($templatename) {
$filename = 'templates/' . $templatename . ".tpl";
return ReadFromFile($filename);
}
function Hata($mesaj)
{
$hata['hata'] = $mesaj;
die (parsetemplate(gettemplate('hata'),$hata));
exit();
}
function output($text,$gzip=true,$level = 3)
{
if ($gzip) $ret = fetch_gzipped_text($text,$level); else $ret = $text;
die( $ret );
exit();
}
function fetch_gzipped_text($text, $level = 1)
{
$returntext = $text;
if (function_exists('crc32') AND function_exists('gzcompress'))
{
if (strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false)
{
$encoding = 'x-gzip';
}
if (strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)
{
$encoding = 'gzip';
}
if ($encoding)
{
header('Content-Encoding: ' . $encoding);
if (false AND function_exists('gzencode'))
{
$returntext = gzencode($text, $level);
}
else
{
$size = strlen($text);
$crc = crc32($text);
$returntext = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff";
$returntext .= substr(gzcompress($text, $level), 2, -4);
$returntext .= pack('V', $crc);
$returntext .= pack('V', $size);
}
}
}
return $returntext;
}
function set_cookie($value, $minute=0)
{
if ($minute != 0)
$exp = time() + intval($minute)*60;
else
$exp = 0;
setcookie("PUS_AVCI" , $value, $exp, '/', "" ,0);
}
function CheckCookie()
{ global $_COOKIE, $Cerez;
if (!isset($_COOKIE["PUS_AVCI"]) && !isset($Cerez[0]) && !isset($Cerez[1]) )
{
die ( '<script>parent.location.href = "hata.php?mesaj=Oturum Zaman Asimina Ugradi!";</script>');
exit();
}
}
function CheckCookiePus()
{ global $_COOKIE, $Cerez;
if (!isset($_COOKIE["PUS_AVCI"]) && !isset($Cerez[0]) && !isset($Cerez[1]) )
Hata("Oturum Zaman Asimina Ugradi!");
}
function ItemAl($user,$charid,$itemid,$adet,$price)
{
global $msconnect,$pusitem;
if ($pusitem['itemkodu'] == "" or $itemid == "" or $price == "" or $charid == "" or $user == "") { return false; } else
{
$itemname = doquery("SELECT strname FROM ITEM WHERE num = " . $pusitem['itemkodu'],true);
$name = str_replace("'",'',$itemname['strname']);
doquery("insert into WEB_ITEMMALL
(strAccountID,strCharID,ServerNo,ItemId,ItemCount,price,stritemname,buytime)
values
('$user','$charid',1,'$itemid','$adet','$price','$name',getdate())");
doquery("insert into WEB_ITEMMALL_LOG
(strAccountID,strCharID,ServerNo,ItemId,ItemCount,price,stritemname,buytime)
values
('$user','$charid',1,'$itemid','$adet','$price','$name',getdate())");
doquery("UPDATE TB_USER SET cashpoint=cashpoint-".$pusitem['ucret']." WHERE straccountid='$user'");
doquery("UPDATE PUS_ITEMLERI SET alindi=alindi+1 WHERE id=$itemid");
return true;
}
}
function PaketItem($user,$charid,$itemid,$adet,$price)
{
global $msconnect,$pusitem;
$itemname = doquery("SELECT strname FROM ITEM WHERE num = " . $itemid,true);
$name = "(Paket) ".str_replace("'",'',$itemname['strname']);
doquery("insert into WEB_ITEMMALL
(strAccountID,strCharID,ServerNo,ItemId,ItemCount,price,stritemname,buytime)
values
('$user','$charid',1,'$itemid','$adet','$price','$name',getdate())");
doquery("insert into WEB_ITEMMALL_LOG
(strAccountID,strCharID,ServerNo,ItemId,ItemCount,price,stritemname,buytime)
values
('$user','$charid',1,'$itemid','$adet','$price','$name',getdate())");
//doquery("UPDATE TB_USER SET cashpoint=cashpoint-".$pusitem['ucret']." WHERE straccountid='$user'");
doquery("UPDATE PUS_ITEMLERI SET alindi=alindi+1 WHERE id=$itemid");
return true;
}
function resimadi($itemkodu, $uzanti)
{
$resim = "Item/itemicon_" . substr($itemkodu,0,1) . "_" .
substr($itemkodu,1,4) . "_" . substr($itemkodu,5,1) . "0_0.".$uzanti;
return $resim;
}
function itemozellikleri ($item)
{
global $parse;
$tip = $item['ItemType'];
switch($tip)
{
case 0:{$type = "Non Upgrade Item";$renk = "white";} break;
case 1:{$type = "Magic Item";$renk = "blue";}break;
case 2:{$type = "Rare Item";$renk = "yellow";}break;
case 3:{$type = "Craft Item";$renk = "lime";}break;
case 4:{$type = "Unique Item";$renk = "#DFC68C";}break;
case 5:{$type = "Upgrade Item";$renk = "purple";}break;
case 6:{$type = "Event Item";$renk = "#18ffff";}
}
$cins = $item['Kind'];
switch($cins)
{
case 11:{$kind = "Dagger";} break;
case 21:{$kind = "One-handed Sword";}break;
case 22:{$kind = "Two-handed Sword";}break;
case 31:{$kind = "Axe";}break;
case 32 :{$kind = "Two-handed Axe";}break;
case 41 :{$kind = "Club";}break;
case 42 :{$kind = "Two-handed Club";}break;
case 51 :{$kind = "Spear";}break;
case 52 :{$kind = "Long Spear";}break;
case 60 :{$kind = "Shield";}break;
case 70 :{$kind = "Bow";}break;
case 71 :{$kind = "Crossbow";}break;
case 91 :{$kind = "Earring";}break;
case 92 :{$kind = "Necklace";}break;
case 93 :{$kind = "Ring";}break;
case 94 :{$kind = "Belt";}break;
case 95 :{$kind = "Lune Item";}break;
case 110:{$kind = "Staff";}break;
case 210:{$kind = "Warrior Armor";}break;
case 220:{$kind = "Rogue Armor";}break;
case 230:{$kind = "Magician Armor";}break;
case 240:{$kind = "Priest Armor";}
}
$aciklama = $item['aciklama'];
$item['strName'] = str_replace("(+0)","",$item['strName']);
$parse['name'] = $item['strName'];
$parse['type'] = $type;
$parse['renk'] = $renk;
$parse['kind'] = $kind;
$parse['ozellik1'] = "";
$parse['ozellik2'] = "";
$parse['ozellik3'] = "";
if ($item['Damage']!=0) $parse['ozellik1'] .="Attack Power : " . $item['Damage'] . "<br>";
$speed = $item['Delay'];
switch($speed)
{
case ($speed >0 and $speed <90):{$delay = "Very Fast";} break;
case ($speed >89 and $speed <111):{$delay = "Fast";}break;
case ($speed >110 and $speed <131):{$delay = "Normal";}break;
case ($speed >130 and $speed <151):{$delay = "Slow";}break;
case ($speed >150 and $speed <201):{$delay = "Very Slow";}
}
if ($speed!=0) $parse['ozellik1'] .="Attack Speed : " . $delay . "<br>";
if ($item['Range']>9) $range=($item['Range']/10) . ".00"; else $range=($item['Range']/10) . "0";
if ($item['Range']!=0) $parse['ozellik1'] .="Effective Range : " . $range . "<br>";
if ($item['Hitrate']!=0) $parse['ozellik1'] .="Increase Attack Power by : " . $item['Hitrate'] . "%<br>";
if ($item['Evasionrate']!=0) $parse['ozellik1'] .="Increase Dodging Power by : " . $item['Evasionrate'] . "%<br>";
if ($item['Weight']>9) $weight=($item['Weight']/10) . ".00"; else $weight=($item['Weight']/10) . "0";
if ($item['Weight']!=0) $parse['ozellik1'] .="Weight : " . $weight . "<br>";
if ($item['Duration']>1) $parse['ozellik1'] .="Max Durability : " . $item['Duration'] . "<br>";
if ($item['Ac']!=0) $parse['ozellik1'] .="Defense Ability : " . $item['Ac'] . "<br>";
if ($item['DaggerAc']!=0) $parse['ozellik2'] .="Defense Ability (Dagger) : " . $item['DaggerAc'] . "<br>";
if ($item['SwordAc']!=0) $parse['ozellik2'] .="Defense Ability (Sword) : " . $item['SwordAc'] . "<br>";
if ($item['MaceAc']!=0) $parse['ozellik2'] .="Defense Ability (Club) : " . $item['MaceAc'] . "<br>";
if ($item['AxeAc']!=0) $parse['ozellik2'] .="Defense Ability (Axe) : " . $item['AxeAc'] . "<br>";
if ($item['SpearAc']!=0) $parse['ozellik2'] .="Defense Ability (Spear) : " . $item['SpearAc'] . "<br>";
if ($item['BowAc']!=0) $parse['ozellik2'] .="Defense Ability (Arrow) : " . $item['BowAc'] . "<br>";
if ($item['FireDamage']!=0) $parse['ozellik2'] .="Flame Damage : " . $item['FireDamage'] . "<br>";
if ($item['IceDamage']!=0) $parse['ozellik2'] .="Ice Damage : " . $item['IceDamage'] . "<br>";
if ($item['LightningDamage']!=0) $parse['ozellik2'] .="Lightning Damage : " . $item['LightningDamage'] . "<br>";
if ($item['PoisonDamage']!=0) $parse['ozellik2'] .="Poison Damage : " . $item['PoisonDamage'] . "<br>";
if ($item['HPDrain']!=0) $parse['ozellik2'] .="HP Recovery : " . $item['HPDrain'] . "<br>";
if ($item['MPDamage']!=0) $parse['ozellik2'] .="MP Damage : " . $item['MPDamage'] . "<br>";
if ($item['MPDrain']!=0) $parse['ozellik2'] .="MP Recovery : " . $item['MPDrain'] . "<br>";
if ($item['MirrorDamage']!=0) $parse['ozellik2'] .="Repel Physical Damage : " . $item['MirrorDamage'] . "<br>";
if ($item['StrB']!=0) $parse['ozellik2'] .="Strength Bonus : " . $item['StrB'] . "<br>";
if ($item['StaB']!=0) $parse['ozellik2'] .="Health Bonus : " . $item['StaB'] . "<br>";
if ($item['MaxHpB']!=0) $parse['ozellik2'] .="HP Bonus : " . $item['MaxHpB'] . "<br>";
if ($item['DexB']!=0) $parse['ozellik2'] .="Dexterity Bonus : " . $item['DexB'] . "<br>";
if ($item['IntelB']!=0) $parse['ozellik2'] .="Intelligence Bonus : " . $item['IntelB'] . "<br>";
if ($item['MaxMpB']!=0) $parse['ozellik2'] .="MP Bonus : " . $item['MaxMpB'] . "<br>";
if ($item['ChaB']!=0) $parse['ozellik2'] .="Magic Power Bonus : " . $item['ChaB'] . "<br>";
if ($item['FireR']!=0) $parse['ozellik2'] .="Resistance to Flame : " . $item['FireR'] . "<br>";
if ($item['ColdR']!=0) $parse['ozellik2'] .="Resistance to Glacier : " . $item['ColdR'] . "<br>";
if ($item['LightningR']!=0) $parse['ozellik2'] .="Resistance to Lightning : " . $item['LightningR'] . "<br>";
if ($item['MagicR']!=0) $parse['ozellik2'] .="Resistance to Magic : " . $item['MagicR'] . "<br>";
if ($item['PoisonR']!=0) $parse['ozellik2'] .="Resistance to Poison : " . $item['PoisonR'] . "<br>";
if ($item['CurseR']!=0) $parse['ozellik2'] .="Resistance to Curse : " . $item['CurseR'] . "<br>";
if ($item['ReqStr']!=0) $parse['ozellik3'] .="Required Strength : " . $item['ReqStr'] . "<br>";
if ($item['ReqSta']!=0) $parse['ozellik3'] .="Required Health : " . $item['ReqSta'] . "<br>";
if ($item['ReqDex']!=0) $parse['ozellik3'] .="Required Dexterity : " . $item['ReqDex'] . "<br>";
if ($item['ReqIntel']!=0) $parse['ozellik3'] .="Required Intelligence : " . $item['ReqIntel'] . "<br>";
if ($item['ReqCha']!=0) $parse['ozellik3'] .="Required Magic Power : " . $item['ReqCha'] . "<br>";
}
function MesajVer($msg)
{
global $parse;
$faceTpl = gettemplate("facebox");
$face['facemsg'] = $msg;
$sonuc = parsetemplate($faceTpl,$face);
$parse['onload'] = $sonuc;
}
require_once("Islemler.php");
?>