Register for your free account! | Forgot your password?

You last visited: Today at 05:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Sro item IDs.

Discussion on Sro item IDs. within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
BigStyle's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 67
Received Thanks: 8
Unhappy Sro item IDs.

So hello, im pretty familiar with php but this problem just owned me and i don't have idea what to do. When i saw it i was like what the fuck?
So there is my simple script to convert textdata/itemdata_xxxx.txt to MySql database.
Code:
<?php
include('../config.php');
mysql_connect($cfg['MySqlHost'], $cfg['MySqlUsername'], $cfg['MySqlPassword']);
mysql_select_db('item');
function explodeRows($data) {
  $rowsArr = explode("\n", $data);
  return $rowsArr;
}
function explodeTabs($singleLine) {
  $tabsArr = explode("\t", $singleLine);
  return $tabsArr;
}

$iconpath = "../icon/";

$filename = "itemdata_5000.txt";
$handle   = fopen($filename, 'r');
$data     = fread($handle, filesize($filename));
$rowsArr  = explodeRows($data);

for($i=0;$i<count($rowsArr);$i++) {
  $lineDetails = explodeTabs($rowsArr[$i]);
    echo "<br>item_id : " . $lineDetails[1];
    echo "<br>item_name : " . $lineDetails[2];
	$pattern = array('/\\\/');
	$replacement = array('/');
	$iconpath2 = preg_replace($pattern, $replacement, $lineDetails[54]);
	$array = explode('.', $iconpath2);
	$i1 = $array[0];
	$item_icon_path_full = $i1.".PNG";
	
	echo "<br>item_icon : " .$item_icon_path_full;
    echo "<br><br>";
	$sql = "INSERT INTO itemdata_5000 (item_id, item_name, item_icon) VALUES ('".$lineDetails[1]."', '".$lineDetails[2]."', '".$item_icon_path_full."')";
	mysql_query($sql)or die(mysql_error());
}
?>
Everything was looking like ok. But then i tried to get this data out and...

Between every single character there is "WTF character" which blocks me every function i want to make with this data. I coulda use preg_replace() to remove this stuff, but idk what is that character and if i copy and paste this into it shows only "?" not the real character. Im really confused, and need help. I have never ever met shit like this stuff. Please help me

@edit
I would be satisfied if someone would send me some other itemsdatabase in txt or mysql or everything other. Converting this joymax stuff is hard as hell :/
BigStyle is offline  
Reply


Similar Threads Similar Threads
[Suche] Komplette item.eix/epk, icon.eix/epk, item proto und item list
12/25/2010 - Metin2 Private Server - 6 Replies
Hey =) Wie die Überschrift schon sagt, suche ich eine komplette item.eix/epk, icon.eix/epk, item proto und item list am liebsten noch von den Waffen von .darki und den ganzen neuen Rüstungen/Schilden/Helmen, da ich überhaupt nicht weiß wie man dass zB mit der item proto macht und wenn ich sie einfach nur ersetze, wie zB durch die "Waffen" item proto von .darki sind die ganzen neuen Rüstungen weg .... Ich hoffe irgendjemand könnte das machen, weil es bestimmt nicht nur für mich hilfreich ist...
[Request]How to Change Item Colour or selected item when use lootalarm
05/14/2010 - 12Sky2 - 0 Replies
ex1. item is rare colour i want to change to elite colour. ex2. item is rare but i don't want it then no alarm.
ProMt2.eu free P Server with all item over 80 e withot item shop it's the best
01/21/2010 - Metin2 Private Server - 6 Replies
***** new private server on 24/24 armour lil 66+9 free all item over 80 for free in the npgs. hourse level 21 when you start the pg is level 78. yang unlimited with a bug... in this server you can have all. alse armour gm liv 50. all rate are 1000% register and play for free. There isn't the item shop all is for free here.



All times are GMT +2. The time now is 05:20.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.