Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php ob_start();
- session_start();
- $dbname = "kn_online";
- $dbuser = "";
- $dbpass = "";
- $username= $_SESSION['SeveNUser'];
- $conn = odbc_connect("$dbname","$dbuser","$dbpass");
- $kilitbelirle1=$_POST['kilitbelirle1'];
- $kilitbelirle2=$_POST['kilitbelirle2'];
- $islem=$_GET['islem'];
- $sira=$_POST['sira'];
- $kilit=$_POST['kilit'];
- $char = odbc_result(odbc_exec($conn,"SELECT strcharid1 FROM account_char WHERE strAccountID ='$username'"), 1);
- $onlinemi = odbc_result(odbc_exec($conn,"select count(*) from CURRENTUSER where strCharID = '$char'"), 1);
- if ($onlinemi>0) die ('Bu islemi yapabilmek icin oncelikle oyundan cıkmaniz gerekmektedir.');
- function itemözellik ($item)
- {$dbname = "kn_online";
- $dbuser = "";
- $dbpass = "";
- $conn = odbc_connect("$dbname","$dbuser","$dbpass");
- $itemal=odbc_exec($conn,"select ItemType,Kind,strName,Damage,Delay,Range,Hitrate,E vasionrate,Weight,Duration,Ac,DaggerAc,SwordAc,Mac eAc,AxeAc,SpearAc,BowAc,FireDamage,IceDamage,Light ningDamage,PoisonDamage,HPDrain,MPDamage,MPDrain,M irrorDamage,StrB,StaB,MaxHpB,DexB,IntelB,MaxMpB,Ch aB,FireR,ColdR,LightningR,MagicR,PoisonR,CurseR,Re qStr,ReqSta,ReqDex,ReqIntel,ReqCha from item where num=$item");
- $ItemType=odbc_result($itemal,1);
- $Kind=odbc_result($itemal,2);
- $strName=odbc_result($itemal,3);
- $Damage=odbc_result($itemal,4);
- $Delay=odbc_result($itemal,5);
- $Range=odbc_result($itemal,6);
- $Hitrate=odbc_result($itemal,7);
- $Evasionrate=odbc_result($itemal,8);
- $Weight=odbc_result($itemal,9);
- $Duration=odbc_result($itemal,10);
- $Ac=odbc_result($itemal,11);
- $DaggerAc=odbc_result($itemal,12);
- $SwordAc=odbc_result($itemal,13);
- $MaceAc=odbc_result($itemal,14);
- $AxeAc=odbc_result($itemal,15);
- $SpearAc=odbc_result($itemal,16);
- $BowAc=odbc_result($itemal,17);
- $FireDamage=odbc_result($itemal,18);
- $IceDamage=odbc_result($itemal,19);
- $LightningDamage=odbc_result($itemal,20);
- $PoisonDamage=odbc_result($itemal,21);
- $HPDrain=odbc_result($itemal,22);
- $MPDamage=odbc_result($itemal,23);
- $MPDrain=odbc_result($itemal,24);
- $MirrorDamage=odbc_result($itemal,25);
- $StrB=odbc_result($itemal,26);
- $StaB=odbc_result($itemal,27);
- $MaxHpB=odbc_result($itemal,28);
- $DexB=odbc_result($itemal,29);
- $IntelB=odbc_result($itemal,30);
- $MaxMpB=odbc_result($itemal,31);
- $ChaB=odbc_result($itemal,32);
- $FireR=odbc_result($itemal,33);
- $ColdR=odbc_result($itemal,34);
- $LightningR=odbc_result($itemal,35);
- $MagicR=odbc_result($itemal,36);
- $PoisonR=odbc_result($itemal,37);
- $CurseR=odbc_result($itemal,38);
- $ReqStr=odbc_result($itemal,39);
- $ReqSta=odbc_result($itemal,40);
- $ReqDex=odbc_result($itemal,41);
- $ReqIntel=odbc_result($itemal,42);
- $ReqCha=odbc_result($itemal,43);
- $tip = $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 = $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 = '';
- $strName = str_replace("(+0)","",$strName);
- $parse['name'] = trim($strName);
- $parse['type'] = $type;
- $parse['renk'] = $renk;
- $parse['kind'] = $kind;
- $parse['ozellik1'] = "";
- $parse['ozellik2'] = "";
- $parse['ozellik3'] = "";
- if ($Damage!=0) $parse['ozellik1'] .="Attack Power : " . $Damage . "<br>";
- $speed = $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 ($Range>9) $range=($Range/10) ; else $range=($Range/10) . "0";
- if ($Range!=0) $parse['ozellik1'] .="Effective Range : " . $range . "<br>";
- if ($Hitrate!=0) $parse['ozellik1'] .="Increase Attack Power by : " . $Hitrate . "%<br>";
- if ($Evasionrate!=0) $parse['ozellik1'] .="Increase Dodging Power by : " . $Evasionrate . "%<br>";
- if ($Weight>9) $weight=($Weight/10) . ".00"; else $weight=($Weight/10) . "0";
- if ($Weight!=0) $parse['ozellik1'] .="Weight : " . $weight . "<br>";
- if ($Duration>1) $parse['ozellik1'] .="Max Durability : " . $Duration . "<br>";
- if ($Ac!=0) $parse['ozellik1'] .="Defense Ability : " . $Ac . "<br>";
- if ($DaggerAc!=0) $parse['ozellik2'] .="Defense Ability (Dagger) : " . $DaggerAc . "<br>";
- if ($SwordAc!=0) $parse['ozellik2'] .="Defense Ability (Sword) : " . $SwordAc . "<br>";
- if ($MaceAc!=0) $parse['ozellik2'] .="Defense Ability (Club) : " . $MaceAc . "<br>";
- if ($AxeAc!=0) $parse['ozellik2'] .="Defense Ability (Axe) : " . $AxeAc . "<br>";
- if ($SpearAc!=0) $parse['ozellik2'] .="Defense Ability (Spear) : " . $SpearAc . "<br>";
- if ($BowAc!=0) $parse['ozellik2'] .="Defense Ability (Arrow) : " . $BowAc . "<br>";
- if ($FireDamage!=0) $parse['ozellik2'] .="Flame Damage : " . $FireDamage . "<br>";
- if ($IceDamage!=0) $parse['ozellik2'] .="Ice Damage : " . $IceDamage . "<br>";
- if ($LightningDamage!=0) $parse['ozellik2'] .="Lightning Damage : " . $LightningDamage . "<br>";
- if ($PoisonDamage!=0) $parse['ozellik2'] .="Poison Damage : " . $PoisonDamage . "<br>";
- if ($HPDrain!=0) $parse['ozellik2'] .="HP Recovery : " . $HPDrain . "<br>";
- if ($MPDamage!=0) $parse['ozellik2'] .="MP Damage : " . $MPDamage . "<br>";
- if ($MPDrain!=0) $parse['ozellik2'] .="MP Recovery : " . $MPDrain . "<br>";
- if ($MirrorDamage!=0) $parse['ozellik2'] .="Repel Physical Damage : " . $MirrorDamage . "<br>";
- if ($StrB!=0) $parse['ozellik2'] .="Strength Bonus : " . $StrB . "<br>";
- if ($StaB!=0) $parse['ozellik2'] .="Health Bonus : " . $StaB . "<br>";
- if ($MaxHpB!=0) $parse['ozellik2'] .="HP Bonus : " . $MaxHpB . "<br>";
- if ($DexB!=0) $parse['ozellik2'] .="Dexterity Bonus : " . $DexB . "<br>";
- if ($IntelB!=0) $parse['ozellik2'] .="Intelligence Bonus : " . $IntelB . "<br>";
- if ($MaxMpB!=0) $parse['ozellik2'] .="MP Bonus : " . $MaxMpB . "<br>";
- if ($ChaB!=0) $parse['ozellik2'] .="Magic Power Bonus : " . $ChaB . "<br>";
- if ($FireR!=0) $parse['ozellik2'] .="Resistance to Flame : " . $FireR . "<br>";
- if ($ColdR>5) $parse['ozellik2'] .="Resistance to Glacier : " . $ColdR . "<br>";
- if ($LightningR>5) $parse['ozellik2'] .="Resistance to Lightning : " . $LightningR . "<br>";
- if ($MagicR!=0) $parse['ozellik2'] .="Resistance to Magic : " . $MagicR . "<br>";
- if ($PoisonR!=0) $parse['ozellik2'] .="Resistance to Poison : " . $PoisonR . "<br>";
- if ($CurseR!=0) $parse['ozellik2'] .="Resistance to Curse : " . $CurseR . "<br>";
- if ($ReqStr!=0) $parse['ozellik3'] .="Required Strength : " . $ReqStr . "<br>";
- if ($ReqSta!=0) $parse['ozellik3'] .="Required Health : " . $ReqSta . "<br>";
- if ($ReqDex!=0) $parse['ozellik3'] .="Required Dexterity : " . $ReqDex . "<br>";
- if ($ReqIntel!=0) $parse['ozellik3'] .="Required Intelligence : " . $ReqIntel . "<br>";
- if ($ReqCha!=0) $parse['ozellik3'] .="Required Magic Power : " . $ReqCha . "<br>";
- return '<center><font color='.$renk.'>'.$strName.'<br>('.$type.')</font><br>'.$kind.'<br></center><font color=lime>'.$parse[ozellik1].$parse[ozellik2].$parse[ozellik3].'</font>';
- }
- if ($_SESSION['itemkilitlemesifre']=='') {
- $itemkilitsifre = odbc_result(odbc_exec($conn,"SELECT itemkilitsifre FROM tb_user WHERE straccountid ='$username'"), 1);
- if ($itemkilitsifre=='') {
- echo 'HOSGELDINIZ '.$char.' ITEM KILIT SIFRENIZ BELIRLENMEMIS.LUTFEN ITEM KILIT SIFRENIZI BELIRLEYINIZ VE NOT ALINIZ.';
- echo '<BR><BR><BR>
- <form action="/itemkilit1.html" method="post">
- <table style="margin-top:10px; text-align:center; border:1px solid #413f22; background-color:#221f13" cellpadding="0" cellspacing="1" width="480">
- <tr><td align="left">ITEM Kilit SIFRE</td><td> :</td><td> <input type="password" name="kilitbelirle1" required></td><td>
- <tr><td align="left">ITEM Kilit SIFRE Tekrar </td><td> :</td><td> <input type="password" name="kilitbelirle2" required></td><td></table><input type="submit" value="OK"> </form>
- ';} else {echo 'HOSGELDINIZ '.$char.' ITEM KILIT SIFRENIZI GIRINIZ ';
- echo '<BR><BR><BR><form action="/itemkilit1.html" method="post">
- <table style="margin-top:10px; text-align:center; border:1px solid #413f22; background-color:#221f13" cellpadding="0" cellspacing="1" width="480">
- <tr><td align="left">ITEM Kilit SIFRE</td><td> :</td><td> <input type="password" name="kilit" required ></td><td>
- </table><input type="submit" value="OK"> </form>
- ';}}
- if ($kilitbelirle1!=''){
- if ($kilitbelirle1!=$kilitbelirle2) die ('Girdiginiz SIFREler uyusmuyor!!!!');
- if ($itemkilitsifre=='') {
- odbc_exec($conn,"update tb_user set itemkilitsifre='$kilitbelirle1' WHERE straccountid ='$username'");}
- echo'<meta [Only Registered Users Can See Links]"refresh" content="0;URL=itemkilit1.html">';}
- if ($kilit!=''){
- if ($itemkilitsifre==$kilit){
- $_SESSION['itemkilitlemesifre'] = $kilit;
- $_SESSION['charid1'] = $char ;
- } else echo 'SIFRE Yanlis!!!';}
- if ($_SESSION['itemkilitlemesifre']!='') {
- if ($sira>(-1)) {
- odbc_exec($conn,"exec itemkilitlepanel '".$char."',$sira ");
- }
- odbc_exec($conn,"exec FetchUserItems '$char'");
- $bankaitemleri=odbc_exec($conn,"select itempos,itemnum,itemsealed,itemserial from ListUserItems where struserid='$char' and itempos<42 order by itempos");
- $sutunno=1;
- $inventoryno=0;
- echo 'KILITLEMEK YADA KILIDINI ACMAK ISTEDIGINIZ ITEMIN UZERINE TIKLAYINIZ<br><br><br><table border="0">';
- while (odbc_fetch_row($bankaitemleri)) {
- $itemresimkodu1=odbc_result($bankaitemleri,2);
- $itemkodu=odbc_result($bankaitemleri,2);
- $itemsira=odbc_result($bankaitemleri,1);
- $kilitlimi=odbc_result($bankaitemleri,3);
- $iteminseriali=odbc_result($bankaitemleri,4);
- $serialyazisi='';
- $altyazi='';
- if ($kilitlimi=='1') {$serialyazisi='2/';
- $altyazi='<font color=yellow>Kilitli Item SteelKO';}
- $itemresimkodu2='itemicon_'.$itemresimkodu1[0].'_'.$itemresimkodu1[1].''.$itemresimkodu1[2].''.$itemresimkodu1[3].''.$itemresimkodu1[4].'_'.$itemresimkodu1[5].'0_0.jpg'.$adetyazisi;
- $ozeelikleriyaz=itemözellik("$itemkodu");
- if ($sutunno==1) echo '<tr>';
- echo '<td width="55">';
- if ($itemkodu>0 and $iteminseriali>0) echo '<div onmouseover="return overlib(\'<table border=0 cellspadding=10 cellspacing=10><tr><td align=left><font style=font-size:11px><font color=white>'.$ozeelikleriyaz.'<font style=font-size:9px>'.$altyazi.'</td></tr></table> \', LEFT, WIDTH, 200);" onMouseOut="return nd();" style="width:45px; height:45px;"><form action="/itemkilit1.html" method="post"><input type="hidden" name="sira" value="'.$itemsira.'"><button type="submit" value="submit" ><img src="[Only Registered Users Can See Links]'.$serialyazisi.''.$itemresimkodu2.'" border=0 width=45 height=45 alt="Submit"></button></form></div>';
- echo '</td>';
- $sutunno++;
- if ($inventoryno<13){
- if ($sutunno==4) { echo '</tr>';
- $sutunno=1;}} else if ($inventoryno==13) {echo '<tr></tr>';
- $sutunno=1;
- }
- else if ($sutunno==8) { echo '</tr>';
- $sutunno=1;}
- $inventoryno++;
- }
- echo '</table><br><br><br><br><br><br><br><br>';}?>
Advertisement
Add Comment
Please, Sign In to add comment