Progresina
New Member
- Joined
- Apr 15, 2014
- Messages
- 10
- Reaction score
- 0
Cześć mam problem z Outfitterem od GEsiora.
Chciałbym go zrobić pod XML na 7.6 w ACC by mi wyświetlał ale nie mam pojęcia jak.
Probowałem zrobić tak by wciągnąć same liczy z Feet ,body etc ale nie idzie .
Może wy macie jakiś pomysł ....
Próbowałem nawet tak by to wydobyć ale nie idzie , pokazuje mi brak obrazka....
Myślałem ze skoro Magic lvl tak idzie zrobić , to i reszte też da rade ale jednak lipa....
A tu linijka do Outfita:
Pomożecie ? ;d
A tu wrzucam swój cały Character.php
Chciałbym go zrobić pod XML na 7.6 w ACC by mi wyświetlał ale nie mam pojęcia jak.
Probowałem zrobić tak by wciągnąć same liczy z Feet ,body etc ale nie idzie .
Może wy macie jakiś pomysł ....
PHP:
// OUTFIITER Próba 1 //
if(substr($tag, 0, 6) == "look ")
{
if($temppos = stristr($tag, "type=\""))
{
$temp = explode("\"", $temppos);
$temptype = $temp[1];
}
if($temppos = stristr($tag, "head=\""))
{
$temp = explode("\"", $temppos);
$temphead = $temp[1];
}
if($temppos = stristr($tag, "body=\""))
{
$temp = explode("\"", $temppos);
$tempbody = $temp[1];
}
if($temppos = stristr($tag, "legs=\""))
{
$temp = explode("\"", $temppos);
$templegs = $temp[1];
}
if($temppos = stristr($tag, "feet=\""))
{
$temp = explode("\"", $temppos);
$tempfeet = $temp[1];
}
Próbowałem nawet tak by to wydobyć ale nie idzie , pokazuje mi brak obrazka....
Myślałem ze skoro Magic lvl tak idzie zrobić , to i reszte też da rade ale jednak lipa....
A tu linijka do Outfita:
PHP:
<image src='outfitter.php?id=$temptype&head=$temphead&body=$tempbody&legs=$templegs&feet=$tempfeet'/>
Pomożecie ? ;d
A tu wrzucam swój cały Character.php
PHP:
<table width='100%' cellspacing='0' cellpadding='10' border='0' style='margin: 10px 0px 10px 0px;' class='cellspadding'>
<tbody><tr class='tableheader'><td colspan='3'><strong><span lang='en'>General Information</span>
</strong>
<?php
$char = $_REQUEST['char'];
$format = '%d/%m/%Y %H:%M:%S';
$monster_folder = "$data_folder\\monsters\\";
$folderplayer = "$data_folder\\players\\";
$file= "$folderplayer$char.xml";
$f = @fopen($file, "r");
if(!$char)
{
}
else if(!$f)
{
echo "<center><b style='color:#6c0000'>Postać nieistnieje.</b></center><br>";
}
else
{
$contents = fread($f, filesize($file));
$tags = explode("<", $contents);
$name = "";
$exp = 0;
$level = 0;
$magic_level = 0;
$vipticks = 0;
$voc = 0;
$lastlogin = 0;
$temple = 0;
$redskull = 0;
$redskulltime = 0;
$skills = array(0, 1, 2, 3, 4, 5, 6);
$IMG = array(0, 1, 2, 3, 4, 5, 6);
foreach($tags as $tag)
{
if(substr($tag, 0, 6) == "player")
{
if($temppos = stristr($tag, "name=\""))
{
$temp = explode("\"", $temppos);
$name = $temp[1];
}
$housepath = $data_folder . '/houses/';
$housefolder = opendir($housepath);
$found_house = 0;
$owner_of_house = '';
while (($housename = readdir($housefolder)) && ($found_house !== 1))
{
if ($housename == "." || $housename == "..") continue;
$temp = explode(".", $housename);
if ($temp[1] == "xml")
{
$house_name = $temp[0];
$house_name2 = $housepath . $house_name . '.xml';
$open_file = fopen($house_name2, "r");
$house_contents = fread($open_file, filesize($house_name2));
$house_tags = explode("<", $house_contents);
foreach($house_tags as $house_tag)
{
if (substr($house_tag, 0, 5) == "owner")
{
if ($temppos = stristr($house_tag, "name=\""))
{
$temp = explode("\"", $temppos);
$owner_name = $temp[1];
if ($owner_name == ($_GET['char']))
{
$found_house = 1;
$owner_of_house = $house_name;
}
}
}
}
}
}
if ($owner_of_house == '')
{
$owner_of_house = 'Brak';
}
$guild_file = $data_folder . "/guilds.xml";
$g = fopen($guild_file, "r");
$guild_contents = fread($g, filesize($guild_file));
$guild_tags = explode("<", $guild_contents);
$found = 0;
foreach($guild_tags as $guild_tag)
{
if (substr($guild_tag, 0, 5) == "guild" && $found != 1)
{
if ($temppos = stristr($guild_tag, "name=\""))
{
$temp = explode("\"", $temppos);
$guild_name = $temp[1];
}
}
if (substr($guild_tag, 0, 6) == "member")
{
if ($temppos = stristr($guild_tag, "name=\"$char"))
{
$temp = explode("\"", $temppos);
$member_name = $temp[1];
$found = 1;
}
}
}
if ($found == 0)
{
$guild_name = 'Brak';
}
$guild_file = $data_folder . "/guilds.xml";
$g = fopen($guild_file, "r");
$guild_contents = fread($g, filesize($guild_file));
$guild_tags = explode("<", $guild_contents);
$found = 0;
foreach($guild_tags as $guild_tag)
{
if (substr($guild_tag, 0, 5) == "guild" && $found != 1)
{
if ($temppos = stristr($guild_tag, "name=\""))
{
$temp = explode("\"", $temppos);
$guild_name = "<a style='color:#6A402E;text-decoration:none'href='index.php?subtopic=guild&guild=$temp[1]'>$temp[1]</a>";
}
}
if (substr($guild_tag, 0, 6) == "member")
{
if ($temppos = stristr($guild_tag, "name=\"$char"))
{
$temp = explode("\"", $temppos);
$member_name = $temp[1];
$found = 1;
}
}
}
if ($found == 0)
{
$guild_name = 'Brak';
}
if($temppos = stristr($tag, "level=\""))
{
$temp = explode("\"", $temppos);
$level = $temp[1];
}
if($temppos = stristr($tag, "exp=\""))
{
$temp = explode("\"", $temppos);
$exp = $temp[1];
}
if($temppos = stristr($tag, "account=\""))
{
$temp = explode("\"", $temppos);
$acc = $temp[1];
}
if($temppos = stristr($tag, "access=\""))
{
$temp = explode("\"", $temppos);
$access = $temp[1];
}
if($temppos = stristr($tag, "sex=\""))
{
$temp = explode("\"", $temppos);
$sexx = $temp[1];
}
if($temppos = stristr($tag, "promoted=\""))
{
$temp = explode("\"", $temppos);
$pacc = $temp[1];
}
if($temppos = stristr($tag, "maglevel=\""))
{
$temp = explode("\"", $temppos);
$magic_level = $temp[1];
}
if($temppos = stristr($tag, "banned=\""))
{
$temp = explode("\"", $temppos);
$ban = $temp[1];
}
if($temppos = stristr($tag, "voc=\""))
{
$temp = explode("\"", $temppos);
$voc = $temp[1];
}
if($temppos = stristr($tag, "vipticks=\""))
{
$temp = explode("\"", $temppos);
$vipticks = $temp[1];
}
if($temppos = stristr($tag, "promoted=\""))
{
$temp = explode("\"", $temppos);
$promoted = $temp[1];
}
if($temppos = stristr($tag, "lastlogin=\""))
{
$temp = explode("\"", $temppos);
$lastlogin = $temp[1];
}
}
if(substr($tag, 0, 6) == "skull ")
{
if($temppos = stristr($tag, "redskull=\""))
{
$temp = explode("\"", $temppos);
$redskull = $temp[1];
}
if($temppos = stristr($tag, "redskulltime=\""))
{
$temp = explode("\"", $temppos);
$redskulltime = $temp[1];
}
}
if(substr($tag, 0, 6) == "skill ")
{
if($temppos = stristr($tag, "skillid=\""))
{
$temp = explode("\"", $temppos);
$tempid = $temp[1];
}
if($temppos = stristr($tag, "level=\""))
{
$temp = explode("\"", $temppos);
$templvl = $temp[1];
}
if($tempid && $templvl)
{
$skills[$tempid] = $templvl;
}
}
if(substr($tag, 0, 6) == "death ")
{
if($temppos = stristr($tag, "name=\""))
{
$temp = explode("\"", $temppos);
$tempname = $temp[1];
}
if($temppos = stristr($tag, "level=\""))
{
$temp = explode("\"", $temppos);
$templvl = $temp[1];
}
if($temppos = stristr($tag, "time=\""))
{
$temp = explode("\"", $temppos);
$temptime = $temp[1];
}
// OUTFIITER Próba 1 //
if(substr($tag, 0, 6) == "look ")
{
if($temppos = stristr($tag, "type=\""))
{
$temp = explode("\"", $temppos);
$temptype = $temp[1];
}
if($temppos = stristr($tag, "head=\""))
{
$temp = explode("\"", $temppos);
$temphead = $temp[1];
}
if($temppos = stristr($tag, "body=\""))
{
$temp = explode("\"", $temppos);
$tempbody = $temp[1];
}
if($temppos = stristr($tag, "legs=\""))
{
$temp = explode("\"", $temppos);
$templegs = $temp[1];
}
if($temppos = stristr($tag, "feet=\""))
{
$temp = explode("\"", $temppos);
$tempfeet = $temp[1];
}
}
$deadtime = strftime($format, $temptime);
if($tempname && $templvl && $deadtime)
{
if(file_exists("$monster_folder$tempname.xml"))
{
$deathtext[] = "
<tr class='tablerow'>
<td width='25%' align='left'> $deadtime </td>
<td><span lang='pl'> Zabity na levelu </span> <b>$templvl</b> przez a $tempname </td></tr>";
}
else if(file_exists("$folderplayer$tempname.xml"))
{
$deathtext[] = "<tr class='tablerow'>
<TD> $deadtime </td>
<TD> Zabity na levelu <b>$templvl</b> przez <b><a style='color:black;text-decoration:none' href=\"index.php?subtopic=character&char=$tempname\">$tempname</a></b> </td></tr>";
}
else
{
$deathtext[] = "<tr class='tablerow'>
<TD> $deadtime </td>
<TD> Zabity na levelu <b>$templvl</b> przez<b> $tempname</b></td></tr>";
}
}
}
}
if ($access > 0)
{
echo "<b style='color:#6c0000'>Nie możesz zobaczyć statystyk tej postaci.</b><br />";
}
else
{
$rstime = strftime($format, $redskulltime);
if ($redskulltime == '0')
{
$rstime = "Brak";
}
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/name.gif'></td><td width='30%'><b><span lang='pl'>Outfit</span>:</b></td><td><center><span lang='pl'><image src='outfitter.php?id=130&addons=3&head=$temphead&body=$tempbody&legs=$templegs&feet=$tempfeet'/></span></center></td></tr>";
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/name.gif'></td><td width='30%'><b><span lang='pl'>Nazwa</span>:</b></td><td><center><span lang='pl'>$name</span></center></td></tr>";
$sex = array("Dziewczyna","Chłopak","Nimfa","Dwarf");
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/sex.gif'></td><td width='30%'><b><span lang='pl'>Płeć</span>:</b></td><td><center><span lang='pl'>$sex[$sexx]</span></center></td></tr>";
if($promoted == 0)
{
$vocations = array("No Vocation", "Sorcerer", "Druid", "Paladin", "Knight");
}
else
{
$vocations = array("No Vocation", "Master Sorcerer", "Elder Druid", "Royal Paladin", "Elite Knight");
}
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/profesja.gif'></td><td width='30%'><b><span lang='pl'>Profesja</span>:</b></td><td><center><span lang='pl'>$vocations[$voc]</span></center></td></tr>";
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/level.gif'></td><td width='30%'><b><span lang='pl'>Level</span>:</b></td><td><center><span lang='pl'>$level</span></center></td></tr>";
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/guildmembership.gif'></td><td width='30%'><b><span lang='pl'>Członkostwo w gildii</span>:</b></td><td><center><span lang='pl'>$guild_name</span></center></td></tr>";
$login = strftime($format, $lastlogin);
if ($lastlogin == '0')
{
$login = "Nigdy";
}
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/lastlogin.gif'></td><td width='30%'><b><span lang='pl'>Ostatnie zalogowanie</span>:</b></td><td><center><span lang='pl'>$login</span></center></td></tr>";
$VIP = array("<font color='red'><b>NIE</b><font>", "<font color='green'><b>TAK</b><font>");
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/svipp.gif'></td><td width='30%'><b><span lang='pl'>VIP</span>:</b></td><td><center><span lang='pl'>$VIP[$vipticks]</span></center></td></tr>";
$accessname = array("Gracz", "<b>Tutor</b>", "Consuller", "Gamemaster");
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/groupp.gif'></td><td width='30%'><b><span lang='pl'>Grupa</span>:</b></td><td><center><span lang='pl'>$accessname[$access]</span></center></td></tr>";
$premium = array("<font color='red'><b>NIE</b><font>", "<font color='green'><b>TAK</b><font>");
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/createdd.gif'></td><td width='30%'><b><span lang='pl'>PACC</span>:</b></td><td><center><span lang='pl'>$premium[$pacc]</span></center></td></tr>";
echo "<tr class='tablerow'><td width='2%'><img src='http://www.rpgclassic.zapto.org.pl/housesss.gif'></td><td width='30%'><b><span lang='pl'>Domek</span>:</b></td><td><center><span lang='pl'>$owner_of_house</span></center></td></tr>";
echo '<table width="100%" cellspacing="0" cellpadding="10" border="0" style="margin: 10px 0px 10px 0px;" class="cellspadding">
<tbody><tr class="tableheader"><td colspan="3"><strong><span lang="pl">Statystyki</span>
</strong>';
$skillnames = array(
'1' => 'Fist',
'2' => 'Club',
'3' => 'Sword',
'4' => 'Dist',
'5' => 'Axe',
'6' => 'Shielding');
$IMG = array(
'1' => '<img src="http://rpgclassic.zapto.org/images/fist.gif">',
'2' => '<img src="http://rpgclassic.zapto.org/images/staff.gif">',
'3' => '<img src="http://rpgclassic.zapto.org/images/mls.gif">',
'4' => '<img src="http://rpgclassic.zapto.org/images/kusza.gif">',
'5' => '<img src="http://rpgclassic.zapto.org/images/axe.gif">',
'6' => '<img src="http://rpgclassic.zapto.org/images/shield.gif">');
foreach($skills as $k => $skill)
{
if(!$skill) continue;
echo "<tr class='tablerow'><td width='2%'>$IMG[$k]</td><td width='30%'><b><span lang='pl'>$skillnames[$k]</span>:</b></td><td><center><span lang='pl'>$skill</span></center></td></tr>";
}
if($deathtext)
{
echo "</div>";
echo '<table width="100%" cellspacing="0" cellpadding="10" border="0" style="margin: 10px 0px 10px 0px;" class="cellspadding">
<tbody><tr class="tableheader"><td colspan="3"><strong><span lang="pl">Śmierci</span>
</strong>';
foreach($deathtext as $temp)
{
echo "$temp";
}
}
echo "</table>";
echo '<br>
<table class="cellspadding" style="width: 100%">
<tbody>
<tr class="tableheader">
<td style="width: 10%;">Item</td>
<td>Quest</td>
<td style="width: 10%;">Status</td>
</tr>';
include("keys.php");
$xml = simplexml_load_file($file);
foreach ($keys as $qs)
{
$mess = "";
$key = array_keys($keys, $qs);
foreach ($xml->storage->data as $storage)
if($key[0] == $storage['key'])
$mess = "<tr class='tablerow'><td> $qs </td><TD><center><img src='http://www.rpgclassic.zapto.org.pl/true.gif'></center></td></tr>";
if($mess == "") $mess = "<tr class='tablerow'><td> $qs </td><TD><center><img src='http://www.rpgclassic.zapto.org.pl/public/images/false.gif'></center></td></tr>";
echo($mess);
}
echo "</table>";
}
}
?><br>
<fieldset style="border-color:#6f1713">
<legend><b style="color:#6c0000">Informacja</b></legend>
Tutaj znajdziesz szczegółowe informacje na temat każdego gracza na naszym serwerze.</fieldset><br><center>
<form method="POST">
<input type="hidden" name="a" value="search">
<input type="text" name="char">
<input type="submit" value="Szukaj">
</form>
</center>
<div class="content"><br><br></div>
</div>
</div>