What's new

acc maker

Status
Not open for further replies.

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
jak zmienic dane ktore zapisuje w pliku characters ?
zapisuje mi tak:
Code:
<?xml version="1.0"?>
<player name="imie" account="333333" sex="1" lookdir="1" exp="0" voc="10" level="0" access="0" cap="100" maglevel="0" lastlogin="0">
<spawn x="736" y="1341" z="7"/>
<temple x="736" y="1341" z="7"/>
<health now="100" max="100" food="0"/>
<mana now="0" max="0" spent="0"/>
<look type="153" head="20" body="30" legs="40" feet="50"/>
<skills>
<skill skillid="0" level="10" tries="0"/>
<skill skillid="1" level="10" tries="0"/>
<skill skillid="2" level="10" tries="0"/>
<skill skillid="3" level="10" tries="0"/>
<skill skillid="4" level="10" tries="0"/>
<skill skillid="5" level="10" tries="0"/>
<skill skillid="6" level="10" tries="0"/>
</skills>
<inventory><slot slotid="3"><item id="1988"><inside><item id="2160" count="3"></inside></item></slot>
</inventory>
<depots><depot depotid="1"><item id="2590"><inside><item id="2594"/></inside></item></depot></depots>
<storage/>
</player>
i kiedy chce sie zalogowac to character nie dziala musi byc tak:
Code:
<?xml version="1.0"?>
<player name="imie" account="333333" sex="1" lookdir="0" exp="0" voc="10" level="0" access="0" cap="100" maglevel="0" lastlogin="0" lastlogout="0" promoted="0" banned="0"><spawn x="736" y="1341" z="7"/><temple x="736" y="1341" z="7"/><skull type="0" kills="0" ticks="0" absolve="0"/><health now="100" max="100" food="0"/><bless now="0" bless1="0" bless2="0" bless3="0" bless4="0" bless5="0"/><mana now="0" max="0" spent="0"/><ban banned="0" banstart="0" banend="0" comment="" reason="" action="" deleted="0" finalwarning="0" banrealtime=""/><look type="0" niesmiertelnosc="0" timeroom="0" head="0" body="0" legs="0" feet="0"/><skills><skill skillid="0" level="10" tries="0"/><skill skillid="1" level="10" tries="0"/><skill skillid="2" level="10" tries="0"/><skill skillid="3" level="10" tries="0"/><skill skillid="4" level="10" tries="0"/><skill skillid="5" level="10" tries="0"/><skill skillid="6" level="10" tries="0"/></skills><spells/><deaths/><inventory/><depots/><storage/></player>
 

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

A m?g?by? napisa? co? wi?cej jaki masz acc maker i jakie pliki u?ywasz do tworzenia postaci... :p
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

a wiec tak mam Acc Maker By AccSite Team - Dark V.02 XML-7.6
do tworzenia postaci uzywam:
acc.php
Code:
<td valign="top">
	<table class="tb2" align="center">
	<tr><td class="menun"><p>New<font color="#FF3A36"> Account</font></p></td></tr>

	<form method="post" action="index.php?accsite=newacc">
<table cellspacing="0" width="100%">
<tr><td width="20%"><font color='#ffffff' face='verdana' size='1'>Account number:</font></td>
<td><input type="text" name="account" maxlength="20" /> <span class="copy"><font color='#ffffff' face='verdana' size='1'>6 numbers</font></b></span></td>
</tr> <tr>
</tr> 

 <tr>
  <td width="20%"><font color='#ffffff' face='verdana' size='1'>Nick:</font></td>
  <td><input type="text" name="nick" maxlength="20" /> <span class="copy"><font color='#ffffff' face='verdana' size='1'>3-20 characters</font></span></td>
 </tr> <tr>
  <td width="20%"><font color='#ffffff' face='verdana' size='1'>Password: </font></td>
  <td><input type="password" name="pass" maxlength="10"> <span><font color='#ffffff' face='verdana' size='1'>3-10 characters</font></span></td>
 <tr>

 <tr>
  <td width="20%"><font color='#ffffff' face='verdana' size='1'>Sex:</font></td>
  <td></br>
   <input type="radio" name="sex" value="0" checked> <font color='#ffffff' face='verdana' size='1'>FEMALE</font></br>
   <input type="radio" name="sex" value="1" checked> <font color='#ffffff' face='verdana' size='1'>MALE</font</br></br>
  </td>
 </tr>

<tr>
<td width="20%"><font color='#ffffff' face='verdana' size='1'>Vocation:</font></td>
<td>
<input type="radio" name="vocation" value="5" checked> <font color='#ffffff' face='verdana' size='1'>GOKU</font></br>
   <input type="radio" name="vocation" value="6"> <font color='#ffffff' face='verdana' size='1'>VEGETA</font></br>
   <input type="radio" name="vocation" value="7"> <font color='#ffffff' face='verdana' size='1'>BROLLY</font></br>
   <input type="radio" name="vocation" value="8"> <font color='#ffffff' face='verdana' size='1'>FUTURE TRUNKS</font></br>
   <input type="radio" name="vocation" value="9"> <font color='#ffffff' face='verdana' size='1'>GOHAN</font></br>
   <input type="radio" name="vocation" value="10"> <font color='#ffffff' face='verdana' size='1'>GOTEN</font></br>
   <input type="radio" name="vocation" value="10"> <font color='#ffffff' face='verdana' size='1'>CHIBI TRUNKS</font></br>
   <input type="radio" name="vocation" value="12"> <font color='#ffffff' face='verdana' size='1'>KURIN</font></br>
   <input type="radio" name="vocation" value="12"> <font color='#ffffff' face='verdana' size='1'>TENSHIN</font></br>
   <input type="radio" name="vocation" value="12"> <font color='#ffffff' face='verdana' size='1'>YAMCHA</font></br>
   <input type="radio" name="vocation" value="11"> <font color='#ffffff' face='verdana' size='1'>BULMA</font></br>
   <input type="radio" name="vocation" value="11"> <font color='#ffffff' face='verdana' size='1'>CHI CHI</font></br>
   <input type="radio" name="vocation" value="11"> <font color='#ffffff' face='verdana' size='1'>VIDEL</font></br>
   <input type="radio" name="vocation" value="15"> <font color='#ffffff' face='verdana' size='1'>NAMEK</font></br>
   <input type="radio" name="vocation" value="16"> <font color='#ffffff' face='verdana' size='1'>MAJIN</font></br>
   <input type="radio" name="vocation" value="17"> <font color='#ffffff' face='verdana' size='1'>CHELENING</font></br>
   <input type="radio" name="vocation" value="18"> <font color='#ffffff' face='verdana' size='1'>TSUFUL</font></br>
   <input type="radio" name="vocation" value="19"> <font color='#ffffff' face='verdana' size='1'>BIOANDROID</font>
</td>
</tr>

<tr>
<td colspan="2">
<input type="submit" value="Create">
<input type="reset" value="Clear">
</td>
</tr>
config.php
Code:
<?
$data_folder = "E:\Downloads\HODB\HoDB server\data"; // sciezka do katalogu data


$servpath = 'E:\\Downloads\\HODB\\HoDB server\\'; // sciezka do folderu z otsem
$dirmonster = $servpath.'\\data\\monster/';  // nierusz
$players_folder = $servpath.'\\data\\players/';   // nierusz
$acc_folder = $servpath.'\\data\\accounts/';  // nierusz
$dirplayer = $servpath.'\\data\\players/';  // nierusz
$dirdata = $servpath.'\\data/';    // nierusz
//** Konfiguracja edytora postaci **//

$enablePass = '1'; // Zmienianie hase?; 1=w?±czone, 0=wy?±czone
$enableChar = '1'; // Zak?adanie nowych postaci na tym samym koncie; 1=w?±czone, 0=wy?±czone
$enableDelete = '1'; // Kasowanie postaci; 1=w?±czone, 0=wy?±czone

$maxChars = '6'; // Maksymalna ilo�? postaci na jednym koncie, 0 = bez limitu

$sizeacc = "6"; // D?ugo�? account number (zalecane 6!)

$ip = '82.160.167.2'; //tu wpisz ip twego ots
$port = '7171'; //domyslny 7171
$nazwaa = 'Ustaw w config.php'; //nazwa twego ots
$sitee = 'Dragon Ball Qwert'; //title

$hidden_chars = array("GM"); //wpisuj tutaj postacie ktore niemaja byc wyslwietlane w statach (po przecinkach)
$stats_limit = "30"; // limit wyswietlanych statystyk

$dont_show = array('Bisbal', 'Deathslicer', 'Noobing', 'monsters', 'Egipctothrower', 'Magicthrower', 'Plaguethrower', 'exp', 'Demon2', 'Flamethrower'); //potwory kt?re maja si? niewyswietlac na liscie
$monsterimg = "images/monsterimg/"; //sciezka do folderu z obrazkami potworow





//** NIE RUSZAJ PONI?SZYCH ZMIENNYCH **//

$folder = "$folder\\";
$diraccount = $data_folder."\\accounts"; // Nie ruszaj!!
$dirplayer =  $data_folder."\\players"; // Nie ruszaj!!
$dirvip =     $data_folder."\\vip"; // Nie ruszaj!!
$charlink = 'yes'; // Nie ruszaj!!
$linkchar = '../index.php?body=search&char='; // Nie ruszaj!!
$stylesheet = './style/style.css'; // Nie ruszaj!
$folderdata = "$data_folder\\"; // Nie ruszaj!
$folderacc = "$diraccount\\"; // Nie ruszaj!
$folderplayer = "$dirplayer\\"; // Nie ruszaj!
$site = "Account Maker"; // Nie ruszaj!
$csx = count($sx); // Nie ruszaj!
$csy = count($sy); // Nie ruszaj!
$csz = count($sz); // Nie ruszaj!
$ctx = count($tx); // Nie ruszaj!
$cty = count($ty); // Nie ruszaj!
$ctz = count($tz); // Nie ruszaj!
$title = "Akademicki.eu"; 
$ccn = count($city_name);
if (!defined('MALE')) define('MALE', 1);
if (!defined('FEMALE')) define('FEMALE', 0);
if (!defined('GOKU')) define('GOKU', 5);
if (!defined('VEGETA')) define('VEGETA', 6);
if (!defined('BROLLY')) define('BROLLY', 7);
if (!defined('FUTURE_TRUNKS')) define('FUTURE_TRUNKS', 8);
if (!defined('GOHAN')) define('GOHAN', 9);
if (!defined('GOTEN')) define('GOTEN', 10);
if (!defined('CHIBI_TRUNKS')) define('CHIBI_TRUNKS', 10);
if (!defined('KURIN')) define('KURIN', 12);
if (!defined('TENSHIN')) define('TENSHIN', 12);
if (!defined('YAMCHA')) define('YAMCHA', 12);
if (!defined('BULMA')) define('BULMA', 11);
if (!defined('CHI_CHI')) define('CHI_CHI', 11);
if (!defined('VIDEL')) define('VIDEL', 11);
if (!defined('NNAMEK')) define('NAMEK', 15);
if (!defined('MAJIN')) define('MAJIN', 16);
if (!defined('CHELENING')) define('CHELENING', 17);
if (!defined('TSUFUL')) define('TSUFUL', 18);
if (!defined('BIOANDROID')) define('BBIOANDROID', 19);
$wersja = "v 2.6.1";
?><?
# 
# data utworzenia: 1-03-2007
# utworzono przez: Admin - robak111@amorki.pl
$tsp[admin]="Admin";
$tsp[admin_mail]="accsite@interia.pl";
$tsp[admin_gg]="9646166";
$tsp[admin_sms]="---";
$tsp[wersja]="1.0";
$tsp[data_inst]="1-03-2007";
$tsp[ext]=".tsp";
$tsp[news_max]="10";
$tsp[art_max]="20";
$tsp[tytul]="AccSite Team";
$tsp[k1]="#006699";
$tsp[i1]="<img src=gfx/s.gif>";
$tsp[adres]="http://www.accsite.y0.pl/";
$tsp[czas_gen]="tak";
$tsp[wstep]="tak";
$tsp[skora]="kess";
?>
configacc.php
Code:
<? 



$data_ = "E:\Downloads\HODB\HoDB server\data";



$lvl = '0';
$exp = '0';
$cap = '100';
// spawn
$spawnx = '736';
$spawny = '1341';
$spawnz = '7';
// temple
$templex = '736';
$templey = '1341';
$templez = '7';


if (!defined('MALE')) define('MALE', 1);
if (!defined('FEMALE')) define('FEMALE', 0);
if (!defined('GOKU')) define('GOKU', 5);
if (!defined('VEGETA')) define('VEGETA', 6);
if (!defined('BROLLY')) define('BROLLY', 7);
if (!defined('FUTURE_TRUNKS')) define('FUTURE_TRUNKS', 8);
if (!defined('GOHAN')) define('GOHAN', 9);
if (!defined('GOTEN')) define('GOTEN', 10);
if (!defined('CHIBI_TRUNKS')) define('CHIBI_TRUNKS', 10);
if (!defined('KURIN')) define('KURIN', 12);
if (!defined('TENSHIN')) define('TENSHIN', 12);
if (!defined('YAMCHA')) define('YAMCHA', 12);
if (!defined('BULMA')) define('BULMA', 11);
if (!defined('CHI_CHI')) define('CHI_CHI', 11);
if (!defined('VIDEL')) define('VIDEL', 11);
if (!defined('NAMEK')) define('NAMEK', 15);
if (!defined('MAJIN')) define('MAJIN', 16);
if (!defined('CHELENING')) define('CHELENING', 17);
if (!defined('TSUFUL')) define('TSUFUL', 18);
if (!defined('BIOANDROID')) define('BIOANDROID', 19);
$diraccount = $data_."\\accounts";
$dirplayer =  $data_."\\players";
$dirvip =     $data_."\\vip";


$look[GOKU][MALE] = '5';

$look[GOKU][FEMALE] = '5';


$health[GOKU] = '100';

$mana[GOKU] = '0';

$mlvl[GOKU] = '0';

$skill[GOKU] = array(10, 10, 10, 10, 10, 10, 10);

$equip[GOKU] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[GOKU] = '<item id="2160" count="3">';




$look[VEGETA][MALE] = '69';

$look[VEGETA][FEMALE] = '69';

$health[VEGETA] = '100';

$mana[VEGETA] = '0';

$mlvl[VEGETA] = '0';

$skill[VEGETA] = array(10, 10, 10, 10, 10, 10, 10);

$equip[VEGETA] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[VEGETA] = '<item id="2160" count="3">';




$look[BROLLY][MALE] = '121';

$look[BROLLY][FEMALE] = '121';

$health[BROLLY] = '100';

$mana[BROLLY] = '0';

$mlvl[BROLLY] = '0';

$skill[BROLLY] = array(10, 10, 10, 10, 10, 10, 10);

$equip[BROLLY] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[BROLLY] = '<item id="2160" count="3">';




$look[FUTURE_TRUNKS][MALE] = '110';

$look[FUTURE_TRUNKS][FEMALE] = '110';

$health[FUTURE_TRUNKS] = '100';

$mana[FUTURE_TRUNKS] = '0';

$mlvl[FUTURE_TRUNKS] = '0';

$skill[FUTURE_TRUNKS] = array(10, 10, 10, 10, 10, 10, 10);

$equip[FUTURE_TRUNKS] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[FUTURE_TRUNKS] = '<item id="2160" count="3">';




$look[GOHAN][MALE] = '185';

$look[GOHAN][FEMALE] = '185';

$health[GOHAN] = '100';

$mana[GOHAN] = '0';

$mlvl[GOHAN] = '0';

$skill[GOHAN] = array(10, 10, 10, 10, 10, 10, 10);

$equip[GOHAN] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[GOHAN] = '<item id="2160" count="3">';




$look[GOTEN][MALE] = '188';

$look[GOTEN][FEMALE] = '188';

$health[GOTEN] = '100';

$mana[GOTEN] = '0';

$mlvl[GOTEN] = '0';

$skill[GOTEN] = array(10, 10, 10, 10, 10, 10, 10);

$equip[GOTEN] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[GOTEN] = '<item id="2160" count="3">';




$look[CHIBI_TRUNKS][MALE] = '153';

$look[CHIBI_TRUNKS][FEMALE] = '153';

$health[CHIBI_TRUNKS] = '100';

$mana[CHIBI_TRUNKS] = '0';

$mlvl[CHIBI_TRUNKS] = '0';

$skill[CHIBI_TRUNKS] = array(10, 10, 10, 10, 10, 10, 10);

$equip[CHIBI_TRUNKS] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[CHIBI_TRUNKS] = '<item id="2160" count="3">';




$look[KURIN][MALE] = '143';

$look[KURIN][FEMALE] = '143';


$health[KURIN] = '100';

$mana[KURIN] = '0';

$mlvl[KURIN] = '0';

$skill[KURIN] = array(10, 10, 10, 10, 10, 10, 10);

$equip[KURIN] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[KURIN] = '<item id="2160" count="3">';




$look[TENSHIN][MALE] = '90';

$look[TENSHIN][FEMALE] = '90';

$health[TENSHIN] = '100';

$mana[TENSHIN] = '0';

$mlvl[TENSHIN] = '0';

$skill[TENSHIN] = array(10, 10, 10, 10, 10, 10, 10);

$equip[TENSHIN] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[TENSHIN] = '<item id="2160" count="3">';




$look[YAMCHA][MALE] = '32';

$look[YAMCHA][FEMALE] = '32';


$health[YAMCHA] = '100';

$mana[YAMCHA] = '0';

$mlvl[YAMCHA] = '0';

$skill[YAMCHA] = array(10, 10, 10, 10, 10, 10, 10);

$equip[YAMCHA] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);


$bp[YAMCHA] = '<item id="2160" count="3">';




$look[BULMA][MALE] = '31';

$look[BULMA][FEMALE] = '31';


$health[BULMA] = '100';

$mana[BULMA] = '0';

$mlvl[BULMA] = '0';

$skill[BULMA] = array(10, 10, 10, 10, 10, 10, 10);

$equip[BULMA] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);


$bp[BULMA] = '<item id="2160" count="3">';

$look[CHI_CHI][MALE] = '201';

$look[CHI_CHI][FEMALE] = '201';


$health[CHI_CHI] = '100';

$mana[CHI_CHI] = '0';

$mlvl[CHI_CHI] = '0';

$skill[CHI_CHI] = array(10, 10, 10, 10, 10, 10, 10);

$equip[CHI_CHI] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);


$bp[CHI_CHI] = '<item id="2160" count="3">';

$look[VIDEL][MALE] = '48';

$look[VIDEL][FEMALE] = '48';


$health[VIDEL] = '100';

$mana[VIDEL] = '0';

$mlvl[VIDEL] = '0';

$skill[VIDEL] = array(10, 10, 10, 10, 10, 10, 10);

$equip[VIDEL] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[VIDEL] = '<item id="2160" count="3">';




$look[NAMEK][MALE] = '75';

$look[NAMEK][FEMALE] = '75';

$health[NAMEK] = '100';

$mana[NAMEK] = '0';

$mlvl[NAMEK] = '0';

$skill[NAMEK] = array(10, 10, 10, 10, 10, 10, 10);

$equip[NAMEK] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);


$bp[NAMEK] = '<item id="2160" count="3">';




$look[MAJIN][MALE] = '121';

$look[MAJIN][FEMALE] = '121';


$health[MAJIN] = '100';

$mana[MAJIN] = '0';

$mlvl[MAJIN] = '0';


$skill[MAJIN] = array(10, 10, 10, 10, 10, 10, 10);

$equip[MAJIN] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[MAJIN] = '<item id="2160" count="3">';




$look[CHELENING][MALE] = '250';

$look[CHELENING][FEMALE] = '250';

$health[CHELENING] = '100';

$mana[CHELENING] = '0';

$mlvl[CHELENING] = '0';

$skill[CHELENING] = array(10, 10, 10, 10, 10, 10, 10);

$equip[CHELENING] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[CHELENING] = '<item id="2160" count="3">';




$look[TSUFUL][MALE] = '155';

$look[TSUFUL][FEMALE] = '155';

$health[TSUFUL] = '100';

$mana[TSUFUL] = '0';

$mlvl[TSUFUL] = '0';

$skill[TSUFUL] = array(10, 10, 10, 10, 10, 10, 10);

$equip[TSUFUL] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[TSUFUL] = '<item id="2160" count="3">';




$look[BIOANDROID][MALE] = '103';

$look[BIOANDROID][FEMALE] = '103';

$health[BIOANDROID] = '100';

$mana[BIOANDROID] = '0';

$mlvl[BIOANDROID] = '0';

$skill[BIOANDROID] = array(10, 10, 10, 10, 10, 10, 10);

$equip[BIOANDROID] = array(0, 0, 1988, 0, 0, 0, 0, 0, 0, 0);

$bp[BIOANDROID] = '<item id="2160" count="3">';



?>
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

ciag dalszy nie zmiescilo sie xd

addchar.php
Code:
<td valign="top">
	<table class="tb2" align="center">
	<tr><td class="menun"><p>New Character <font color="#FF3A36"> <?=$nick?></font></p></td></tr>

	<tr><td class="news"><?php
error_reporting(E_ALL);
include 'checkunique.php';
require 'config.php';

$delay = "0";
$url = "index.php?accsite=default";

include 'redir.php';

$_SESSION['page'] = 'index.php?accsite=addchar';
function skills($vocation)
{
	require 'configacc.php';
	$str = "";

	for ($id = 0; $id <= 6; $id++)
		$str .= ('<skill skillid="' . $id . '" level="' . $skill[$vocation][$id] . '" tries="0"/>' . "\n");

	return $str;
}

function equip($vocation)
{
	require'configacc.php';
	$str = "";

	for ($id = 1; $id <= 10; $id++)
	{
		if ($equip[$vocation][$id-1] != 0)
		{
			$str .= ('<slot slotid="' . $id . '"><item id="' . $equip[$vocation][$id-1] . '"');
			if ($id == 3)	// backpack
				$str .= ('><inside>' . $bp[$vocation] . '</inside></item>');
			else
				$str .= ('/>');
			$str .= ('</slot>' . "\n");
		}
	}

	return $str;
}

function newacc()
{
	require('config.php'); // This is the config with paths
	$nick = $_POST['nick'];
	$charname = $nick;
	$sex = $_POST['sex'];
	$vocation = $_POST['vocation'];
	$account = $_SESSION['user'];


	($sex == 0 || $sex == 1) or die ('Invalid sex!');
	($vocation >= 1 && $vocation <= 19) or die ('Invalid vocation!');

	if($sizeacc == "7"){
		($account >= 1000000 && $account <= 9999999) or die ('Invalid account number!'); // Six numbers
	}
	else if($sizeacc == "6"){
		($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); // Five numbers
	}
	else{
		($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); // If not found then Five numbers.
	}
	// ($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); // This is the old shit

	preg_match("/^[a-zA-Z][a-zA-Z ]*$/", $nick) or die ('Invalid name format!');
	!preg_match("/^gm/i", $nick) or die ('You are not GM!');
	!preg_match("/^god/i", $nick) or die ('you are not GOD!');

	$diraccount = $folderacc;
	$dirplayer = $folderplayer;

	$account_file = "$diraccount/$account.xml";
	$player_file = "$dirplayer/$nick.xml";


$myfile = ''.$folderacc.''.$account.'.xml';

//account file
$fh = fopen($myfile, 'r');
$data = fread($fh, filesize($myfile));
$data = trim($data);
fclose($fh);
$tmpsrch = strpos($data, '</characters>');
$data = trim($data);
$leftbit = substr($data, 0, $tmpsrch);
$rightbit = substr($data, $tmpsrch);

$charfile = ''.$folderplayer.'' . $nick . '.xml';
if (file_exists($charfile)){
	$_SESSION['msg'] = 'Character with this name allredy exits!.';
	echo $_SESSION['msg'];
exit();
}
else
{ require'configacc.php';
//$accno, $charname, $voc, $sex
$filedata = $leftbit . '<character name="' . $charname . '" />
'  .  $rightbit;
$accno = $_SESSION['user'];
$fg = fopen($myfile, 'w');
fwrite($fg, $filedata);
fclose($fg);

	$file = fopen($player_file, 'w');
	fwrite($file,
'<?xml version="1.0"?>
<player name="' . $nick . '" account="' . $account . '" sex="' . $sex . '" lookdir="0" exp="' . $exp . '" voc="' . $vocation . '" level="' . $lvl . '" access="0" cap="' . $cap . '" maglevel="' . $mlvl[$vocation] . '" lastlogin="0" lastlogout="0" promoted="0" banned="0">
<spawn x="' . $spawnx . '" y="' . $spawny . '" z="' . $spawnz . '"/>
<temple x="' . $templex . '" y="' . $templey . '" z="' . $templez . '"/>
<skull type="0" kills="0" ticks="0" absolve="0"/>
<health now="' . $health[$vocation] . '" max="' . $health[$vocation] . '" food="0"/>
<bless now="0" bless1="0" bless2="0" bless3="0" bless4="0" bless5="0"/>
<mana now="' . $mana[$vocation] . '" max="' . $mana[$vocation] . '" spent="0"/>
<ban banned="0" banstart="0" banend="0" comment="" reason="" action="" deleted="0" finalwarning="0" banrealtime=""/>
<look type="' . $look[$vocation][$sex] . '" head="20" body="30" legs="40" feet="50"/>
<skills>' . "\n" . skills($vocation) . '</skills>
<inventory>' . equip($vocation) . '</inventory>
<depots><depot depotid="1"><item id="2590"><inside><item id="2594"/></inside></item></depot></depots>
<storage/>
</player>');
    fclose($file);
	print "<b>Character $nick created succesfully!</b>";
	include 'success.php';
}
}

newacc();
?>
</center>
newacc.php
Code:
<td valign="top">
	<table class="tb2" align="center">
	<tr><td class="menun"><p>New<font color="#FF3A36"> Account</font></p></td></tr>

	<tr><td class="news">
<?
function skills($vocation)
{
	require('configacc.php');
	$str = "";

	for ($id = 0; $id <= 6; $id++)
		$str .= ('<skill skillid="' . $id . '" level="' . $skill[$vocation][$id] . '" tries="0"/>' . "\n");

	return $str;
}

function equip($vocation)
{
	require('configacc.php');
	$str = "";

	for ($id = 1; $id <= 10; $id++)
	{
		if ($equip[$vocation][$id-1] != 0)
		{
			$str .= ('<slot slotid="' . $id . '"><item id="' . $equip[$vocation][$id-1] . '"');
			if ($id == 3)	// backpack
				$str .= ('><inside>' . $bp[$vocation] . '</inside></item>');
			else
				$str .= ('/>');
			$str .= ('</slot>' . "\n");
		}
	}

	return $str;
}

function newacc()
{
	require('configacc.php');
	$nick = $_POST['nick'];
	$sex = $_POST['sex'];
	$vocation = $_POST['vocation'];
	$account = $_POST['account'];
	$pass = $_POST['pass'];

	($pass != $account) or die ('Password is same as account number!');
	($pass != $nick) or die ('Password is same as character name!');
	($pass != 'tibia' && $pass != 'lol') or die ('Password is too simple!');

	($sex == 0 || $sex == 1) or die ('Invalid sex!');
	($vocation >= 1 && $vocation <= 19) or die ('Invalid vocation!');
	($account >= 100000 && $account <= 999999) or die ('Invalid account number!');
	preg_match("/^[a-zA-Z][a-zA-Z ]*$/", $nick) or die ('Name contains illegal characters!');
	preg_match("/^[a-zA-Z0-9]+$/", $pass) or die ('Password contains illegal characters!');
	!preg_match("/^gm/i", $nick) or die ('GM is only one!');

	$account_file = "$diraccount/$account.xml";
	$player_file = "$dirplayer/$nick.xml";
	$vip_file = "$dirvip/$account.xml";

	!file_exists($account_file) or die ('There is already an account with this number!');
	!file_exists($player_file) or die ("There is already a player $nick!");

	$file = fopen($account_file, 'w');
	fwrite($file,
'<?xml version="1.0"?>
<account pass="' . $pass . '" type="0" premDays="7">
<characters>
	<character name="' . $nick . '"/>
</characters>
</account>');
	fclose($file);

	$file = fopen($player_file, 'w');
	fwrite($file,
'<?xml version="1.0"?>
<player name="' . $nick . '" account="' . $account . '" sex="' . $sex . '" lookdir="0" exp="' . $exp . '" voc="' . $vocation . '" level="' . $lvl . '" access="0" cap="' . $cap . '" maglevel="' . $mlvl[$vocation] . '" lastlogin="0" lastlogout="0" promoted="0" banned="0">
<spawn x="' . $spawnx . '" y="' . $spawny . '" z="' . $spawnz . '"/>
<temple x="' . $templex . '" y="' . $templey . '" z="' . $templez . '"/>
<skull type="0" kills="0" ticks="0" absolve="0"/>
<health now="' . $health[$vocation] . '" max="' . $health[$vocation] . '" food="0"/>
<bless now="0" bless1="0" bless2="0" bless3="0" bless4="0" bless5="0"/>
<mana now="' . $mana[$vocation] . '" max="' . $mana[$vocation] . '" spent="0"/>
<ban banned="0" banstart="0" banend="0" comment="" reason="" action="" deleted="0" finalwarning="0" banrealtime=""/>
<look type="' . $look[$vocation][$sex] . '" head="20" body="30" legs="40" feet="50"/>
<skills>' . "\n" . skills($vocation) . '</skills>
<inventory>' . equip($vocation) . '</inventory>
<depots><depot depotid="1"><item id="2590"><inside><item id="2594"/></inside></item></depot></depots>
<storage/>
</player>');
    fclose($file);

	$file = fopen($vip_file, 'w');
	fwrite($file,
'<?xml version="1.0"?>
<vips/>');
	fclose($file);

	print "Your character named<b> $nick</b> has been created, you can now log in at No.<b> $account</b> and password <b>$pass</b> For now, enjoy playing !";
}

newacc();
?>
</center>
addchar.php gdy chcemy na koncie dodac nowa postac
a newacc.php gdy zakladamy konto z postacia
 

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

Wed?ug mnie wszystko wygl?da w porz?dku, napisz co jest ?le, bo nie rozumiem troch? :p
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

tworzy postac i w pliku tej postaci jest zapisane tak jak napisalem na poczatku i powinna byc zapisana tak jak napisalem tez napoczatku
co mam zmienic zeby zapisywalo tak jak ma byc
 

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

Aha dobra kapuje, zamie? sw?j addchar.php na:
<td valign="top">
<table class="tb2" align="center">
<tr><td class="menun"><p>New Character <font color="#FF3A36"> <?=$nick?></font></p></td></tr>
<tr><td class="news"><?php
error_reporting(E_ALL);
include 'checkunique.php';
require 'config.php';
$delay = "0";
$url = "index.php?accsite=default";
include 'redir.php';
$_SESSION['page'] = 'index.php?accsite=addchar';
function skills($vocation)
{
require 'configacc.php';
$str = "";
for ($id = 0; $id <= 6; $id++)
$str .= ('<skill skillid="' . $id . '" level="' . $skill[$vocation][$id] . '" tries="0"/>' . "\n");
return $str;
}
function equip($vocation)
{
require'configacc.php';
$str = "";
for ($id = 1; $id <= 10; $id++)
{
if ($equip[$vocation][$id-1] != 0)
{
$str .= ('<slot slotid="' . $id . '"><item id="' . $equip[$vocation][$id-1] . '"');
if ($id == 3) // backpack
$str .= ('><inside>' . $bp[$vocation] . '</inside></item>');
else
$str .= ('/>');
$str .= ('</slot>' . "\n");
}
}
return $str;
}
function newacc()
{
require('config.php'); // This is the config with paths
$nick = $_POST['nick'];
$charname = $nick;
$sex = $_POST['sex'];
$vocation = $_POST['vocation'];
$account = $_SESSION['user'];
($sex == 0 || $sex == 1) or die ('Invalid sex!');
($vocation >= 1 && $vocation <= 19) or die ('Invalid vocation!');
if($sizeacc == "7"){
($account >= 1000000 && $account <= 9999999) or die ('Invalid account number!'); // Six numbers
}
else if($sizeacc == "6"){
($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); // Five numbers
}
else{
($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); // If not found then Five numbers.
}
// ($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); // This is the old shit
preg_match("/^[a-zA-Z][a-zA-Z ]*$/", $nick) or die ('Invalid name format!');
!preg_match("/^gm/i", $nick) or die ('You are not GM!');
!preg_match("/^god/i", $nick) or die ('you are not GOD!');
$diraccount = $folderacc;
$dirplayer = $folderplayer;
$account_file = "$diraccount/$account.xml";
$player_file = "$dirplayer/$nick.xml";
$myfile = ''.$folderacc.''.$account.'.xml';
//account file
$fh = fopen($myfile, 'r');
$data = fread($fh, filesize($myfile));
$data = trim($data);
fclose($fh);
$tmpsrch = strpos($data, '</characters>');
$data = trim($data);
$leftbit = substr($data, 0, $tmpsrch);
$rightbit = substr($data, $tmpsrch);
$charfile = ''.$folderplayer.'' . $nick . '.xml';
if (file_exists($charfile)){
$_SESSION['msg'] = 'Character with this name allredy exits!.';
echo $_SESSION['msg'];
exit();
}
else
{ require'configacc.php';
//$accno, $charname, $voc, $sex
$filedata = $leftbit . '<character name="' . $charname . '" />
' . $rightbit;
$accno = $_SESSION['user'];
$fg = fopen($myfile, 'w');
fwrite($fg, $filedata);
fclose($fg);
$file = fopen($player_file, 'w');
fwrite($file,
'<?xml version="1.0"?><player name="' . $nick . '" account="' . $account . '" sex="' . $sex . '" lookdir="0" exp="' . $exp . '" voc="' . $vocation . '" level="' . $lvl . '" access="0" cap="' . $cap . '" maglevel="' . $mlvl[$vocation] . '" lastlogin="0" lastlogout="0" promoted="0" banned="0"><spawn x="' . $spawnx . '" y="' . $spawny . '" z="' . $spawnz . '"/><temple x="' . $templex . '" y="' . $templey . '" z="' . $templez . '"/><skull type="0" kills="0" ticks="0" absolve="0"/><health now="' . $health[$vocation] . '" max="' . $health[$vocation] . '" food="0"/><bless now="0" bless1="0" bless2="0" bless3="0" bless4="0" bless5="0"/><mana now="' . $mana[$vocation] . '" max="' . $mana[$vocation] . '" spent="0"/><ban banned="0" banstart="0" banend="0" comment="" reason="" action="" deleted="0" finalwarning="0" banrealtime=""/><look type="' . $look[$vocation][$sex] . '" head="20" body="30" legs="40" feet="50"/><skills>' . "\n" . skills($vocation) . '</skills><inventory>' . equip($vocation) . '</inventory><depots><depot depotid="1"><item id="2590"><inside><item id="2594"/></inside></item></depot></depots><storage/></player>');
fclose($file);
print "<b>Character $nick created succesfully!</b>";
include 'success.php';
}
}
newacc();
?>
</center>

Powinno zadzia?a?, jak stworzysz posta? przez ten skrypt spr?buj si? zalogowa? na ni?, jak nie napisz mi jak wygl?da ta stworzona posta? przez ten m?j skrypt :p
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

po zalozeniu tak:
Code:
<?xml version="1.0"?><player name="Boczus" account="123456" sex="1" lookdir="0" exp="0" voc="5" level="0" access="0" cap="100" maglevel="0" lastlogin="0" lastlogout="0" promoted="0" banned="0"><spawn x="736" y="1341" z="7"/><temple x="736" y="1341" z="7"/><skull type="0" kills="0" ticks="0" absolve="0"/><health now="100" max="100" food="0"/><bless now="0" bless1="0" bless2="0" bless3="0" bless4="0" bless5="0"/><mana now="0" max="0" spent="0"/><ban banned="0" banstart="0" banend="0" comment="" reason="" action="" deleted="0" finalwarning="0" banrealtime=""/><look type="5" head="20" body="30" legs="40" feet="50"/><skills>
<skill skillid="0" level="10" tries="0"/>
<skill skillid="1" level="10" tries="0"/>
<skill skillid="2" level="10" tries="0"/>
<skill skillid="3" level="10" tries="0"/>
<skill skillid="4" level="10" tries="0"/>
<skill skillid="5" level="10" tries="0"/>
<skill skillid="6" level="10" tries="0"/>
</skills><inventory><slot slotid="3"><item id="1988"><inside><item id="2160" count="3"></inside></item></slot>
</inventory><depots><depot depotid="1"><item id="2590"><inside><item id="2594"/></inside></item></depot></depots><storage/></player>
po probie zalogowania tak:
Code:
<?xml version="1.0"?>
<player name="Boczus" account="0" sex="0" lookdir="0" exp="180" voc="0" level="1" access="1" cap="300" maglevel="20" lastlogin="0" lastlogout="0" promoted="0" banned="0"><spawn x="31" y="31" z="7"/><temple x="31" y="31" z="7"/><skull type="0" kills="0" ticks="0" absolve="0"/><health now="1000" max="1000" food="0"/><bless now="0" bless1="0" bless2="0" bless3="0" bless4="0" bless5="0"/><mana now="0" max="0" spent="0"/><ban banned="0" banstart="0" banend="0" comment="" reason="" action="" deleted="1" finalwarning="1" banrealtime=""/><look type="0" niesmiertelnosc="0" timeroom="0" head="0" body="0" legs="0" feet="0"/><skills><skill skillid="0" level="1" tries="0"/><skill skillid="1" level="1" tries="0"/><skill skillid="2" level="1" tries="0"/><skill skillid="3" level="1" tries="0"/><skill skillid="4" level="1" tries="0"/><skill skillid="5" level="1" tries="0"/><skill skillid="6" level="1" tries="0"/></skills><spells/><deaths/><inventory/><depots/><storage/></player>
 

Poufny

Senior User
Joined
Jul 31, 2009
Messages
662
Reaction score
46
Age
31
Odp: acc maker

polecam pobrac innego acc mkaera.
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

w kazdym tak bedzie bo acc makery sa zrobione pod postacie tibii a moje postacie maja wiecej informacji w pliku xd

chyba ze polecasz jakis acc maker ?
 

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

A jaki masz silnik mo?e Ci jaki? polec? :p
 

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

Spr?buj tego
lub
lub
albo taki najprostszy

Mam nadziej?, ?e kt?ry? zadzia?a :p
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

ale w ka?dym b?d? musia? edytowa? profesje :(( nie chce mi si? tego za? robi? a i mo?e jakie? screeny xd bo tak na ?lepo jaki? brzydki b?dzie xdxd
 

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

Tu teraz nie chodzi o wygl?d tylko o skrypt na tworzenie postaci :p sprawd? tylko, kt?ry acc maker tworzy Ci j? dobrze :p a ?adny jest ten otfans i swelia :p tamtych nie wiem xd
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

w otfans jest tak samo mialem kiedys wersje dark sprobuje swelie
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

A wiec zrobilem swelia acc z nadzieja ze bedzie dzialac xd
ale nie dziala
ich skrypt na profesje wyglada tak:
Code:
<?
$output = "<?xml version=\"1.0\"?>
<player name=\"$namein\" account=\"$acc\" sex=\"$sexin\" lookdir=\"0\" exp=\"4200\" voc=\"$vocin\" level=\"8\" access=\"0\" cap=\"470\" maglevel=\"0\">
<spawn x=\"201\" y=\"260\" z=\"7\"/>
<temple x=\"201\" y=\"260\" z=\"7\"/>
<health now=\"185\" max=\"185\" food=\"0\"/>
<mana now=\"35\" max=\"35\" spent=\"0\"/>
<look type=\"134\" head=\"19\" body=\"21\" legs=\"76\" feet=\"114\"/>
<skills>
<skill skillid=\"0\" level=\"10\" tries=\"10\"/>
<skill skillid=\"1\" level=\"10\" tries=\"10\"/>
<skill skillid=\"2\" level=\"10\" tries=\"10\"/>
<skill skillid=\"3\" level=\"10\" tries=\"10\"/>
<skill skillid=\"4\" level=\"10\" tries=\"10\"/>
<skill skillid=\"5\" level=\"10\" tries=\"10\"/>
<skill skillid=\"6\" level=\"10\" tries=\"10\"/>
</skills>
<inventory>
<slot slotid=\"1\"><item id=\"2461\"/></slot>
<slot slotid=\"2\"><item id=\"2170\"/></slot>
<slot slotid=\"3\"><item id=\"1988\"/></slot>
<slot slotid=\"4\"><item id=\"2467\"/></slot>
<slot slotid=\"5\"><item id=\"2512\"/></slot>
<slot slotid=\"6\"><item id=\"2398\"/></slot>
<slot slotid=\"7\"><item id=\"2649\"/></slot>
<slot slotid=\"8\"><item id=\"2643\"/></slot>
<slot slotid=\"10\"><item id=\"2120\"/></slot>
</inventory>
<depots><depot depotid=\"1\"><item id=\"2590\"><inside><item id=\"2594\"/><item id=\"2667\" count=\"100\"/><item id=\"2667\" count=\"100\"/></inside></item></depot></depots><storage/>
</player>";


?>
a moj tak:
Code:
<?
$output = "<?xml version="1.0"?>
<player name=\"$namein\" account=\"$acc\" sex=\"1\" lookdir=\"0\" exp=\"0\" voc=\"5\" level=\"0\" access=\"0\" cap=\"100\" maglevel=\"0\" lastlogin=\"0\" lastlogout=\"0\" promoted=\"0\" banned=\"0\"><spawn x=\"736\" y=\"1341\" z=\"7\"/><temple x=\"736\" y=\"1341\" z=\"7\"/><skull type=\"0\" kills=\"0\" ticks=\"0\" absolve=\"0\"/><health now=\"100\" max=\"100\" food=\"0\"/><bless now=\"0\" bless1=\"0\" bless2=\"0\" bless3=\"0\" bless4=\"0\" bless5=\"0\"/><mana now=\"0\" max=\"0\" spent=\"0\"/><ban banned=\"0\" banstart=\"0\" banend=\"0\" comment=\"\" reason=\"\" action=\"\" deleted=\"0\" finalwarning=\"0\" banrealtime=\"\"/><look type=\"5\" niesmiertelnosc=\"0\" timeroom=\"210\" head=\"1\" body=\"70\" legs=\"-1\" feet=\"1\"/><skills><skill skillid=\"0\" level=\"10\" tries=\"0\"/><skill skillid=\"1\" level=\"0\" tries=\"0\"/><skill skillid=\"2\" level=\"10\" tries=\"0\"/><skill skillid=\"3\" level=\"10\" tries=\"0\"/><skill skillid=\"4\" level=\"10\" tries=\"0\"/><skill skillid=\"5\" level=\"10\" tries=\"0\"/><skill skillid=\"6\" level=\"0\" tries=\"0\"/></skills><spells/><deaths/><inventory/><depots><depot depotid=\"1\"><item id=\"2590\"><inside><item id=\"2594\"/></inside></item></depot></depots><storage><data key=\"2\" value=\"2\"/><data key=\"5\" value=\"5\"/><data key=\"1031\" value=\"1\"/><data key=\"2675\" value=\"0\"/><data key=\"28095\" value=\"1\"/></storage></player>";


?>

co mam zrobic zeby dzialalo wogole nie zaklada pliku postaci.. :(

moze cos powinienem tez zmienic tutaj
w pliku savenewchar.php
Code:
<?

session_start();

include("config.php");

$errors = 0;

$acc = "";
$pass = "";
$acc = $_SESSION['account'];
$pass = $_SESSION['password'];

if ($acc != "" && $acc != null && $pass != "" && $pass != null) {

$namein = "";
$vocin = "";
$sexin = "";

$namein = $_POST['name'];
$vocin = $_POST['voc'];
$sexin = $_POST['sex'];

if ($namein != "" && $vocin != "" && $sexin != "" && !file_exists($dirplayer . $namein . ".xml")) {

$temp = strspn("$namein", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM -");

if ($temp != strlen($namein)) {
	header("Location: create_character.php?result=char_failed&error=malformed_name");
	$errors++;
}
if (strlen($namein) < 2 || strlen($namein) > 20) {
	header("Location: create_character.php?result=char_failed&error=wrong_length");
	$errors++;
}

if ($errors == 0) {

	if (!file_exists($dirplayer."players.xml")){
		$file_handle = fopen($dirplayer."players.xml", "w");
		fwrite ($file_handle, "<players>\r\n");

		$uid = 0;

		$dir_handle = opendir($dirplayer);
		while ( $file = readdir($dir_handle) ){
			if (eregi('\.xml$',$file) ){
				$uid++;
				$pieces = explode (".",$file);
				fwrite ($file_handle, '<player guid="'.$uid.'" name="'.htmlspecialchars($pieces[0]).'"/>'."\r\n");
			}
		}
	}
	
	$lines = file_get_contents($dirplayer."players.xml");
	$guid = 1;
	
	while (!(strpos($lines,'"'.$guid.'"') === false)){
		$guid = mt_rand(1,10000000); //probably the fastest way
	}

	$lines = str_ireplace('<players/>','<players></players>',$lines);
	$lines = str_ireplace("</players>","<player guid=\"$guid\" name=\"$namein\"/>\r\n</players>",$lines);
	file_put_contents($dirplayer."players.xml",$lines);

	$file = $diraccount . $acc . ".xml";

if (file_exists($file)) {    
$replace = file_get_contents($file);
$replace = str_replace("><", ">
<", $replace);
$accreplace = fopen($file, "w");
fwrite($accreplace, $replace);
fclose($accreplace);
    $contents = file("$file");
    $shallbreak = false;
    $row;
    for($i = 0; $contents[$i];$i++) {
        $endchar = strstr($contents[$i], "</characters>");
        if($endchar) {
            $row = $i;
        }
    }
    
    if(isset($row) && $row != "" && $row != null) {
    $f = fopen("$file","w");
    for($i = 0; ($contents[$i] || $contents[$i-1]);$i++) {
        if ($i<$row)
           fwrite($f, "$contents[$i]");
        if ($i==$row)
           fwrite($f, "<character name=\"$namein\" />
");
        if ($i>$row)
           fwrite($f, $contents[$i-1]); 
		
	}
	fclose($f);
	include("makeplayerxml/" . $vocin . ".php");
	$playerfile = $dirplayer . $namein . ".xml";
	$f2 = fopen("$playerfile","w");
	fwrite($f2, $output);
	
	} else {
		header("Location: account_home.php");
		$errors++;
	}

} else {
header("Location: account_home.php");
$errors++;
}
}

}
} else {
header("Location: create_character.php?result=char_failed&error=exists");
$errors++;
}
if($errors == 0) {
header("Location: account_home.php");
}
?>
???
 
Last edited:

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

A nie lepiej zamieni? ten skrypt :
Code:
<?
$output = "<?xml version=\"1.0\"?>
<player name=\"$namein\" account=\"$acc\" sex=\"$sexin\" lookdir=\"0\" exp=\"4200\" voc=\"$vocin\" level=\"8\" access=\"0\" cap=\"470\" maglevel=\"0\">
<spawn x=\"201\" y=\"260\" z=\"7\"/>
<temple x=\"201\" y=\"260\" z=\"7\"/>
<health now=\"185\" max=\"185\" food=\"0\"/>
<mana now=\"35\" max=\"35\" spent=\"0\"/>
<look type=\"134\" head=\"19\" body=\"21\" legs=\"76\" feet=\"114\"/>
<skills>
<skill skillid=\"0\" level=\"10\" tries=\"10\"/>
<skill skillid=\"1\" level=\"10\" tries=\"10\"/>
<skill skillid=\"2\" level=\"10\" tries=\"10\"/>
<skill skillid=\"3\" level=\"10\" tries=\"10\"/>
<skill skillid=\"4\" level=\"10\" tries=\"10\"/>
<skill skillid=\"5\" level=\"10\" tries=\"10\"/>
<skill skillid=\"6\" level=\"10\" tries=\"10\"/>
</skills>
<inventory>
<slot slotid=\"1\"><item id=\"2461\"/></slot>
<slot slotid=\"2\"><item id=\"2170\"/></slot>
<slot slotid=\"3\"><item id=\"1988\"/></slot>
<slot slotid=\"4\"><item id=\"2467\"/></slot>
<slot slotid=\"5\"><item id=\"2512\"/></slot>
<slot slotid=\"6\"><item id=\"2398\"/></slot>
<slot slotid=\"7\"><item id=\"2649\"/></slot>
<slot slotid=\"8\"><item id=\"2643\"/></slot>
<slot slotid=\"10\"><item id=\"2120\"/></slot>
</inventory>
<depots><depot depotid=\"1\"><item id=\"2590\"><inside><item id=\"2594\"/><item id=\"2667\" count=\"100\"/><item id=\"2667\" count=\"100\"/></inside></item></depot></depots><storage/>
</player>";
?>

Na ten tw?j:
Code:
<?
$output = "<?xml version="1.0"?>
<player name=\"$namein\" account=\"$acc\" sex=\"1\" lookdir=\"0\" exp=\"0\" voc=\"5\" level=\"0\" access=\"0\" cap=\"100\" maglevel=\"0\" lastlogin=\"0\" lastlogout=\"0\" promoted=\"0\" banned=\"0\"><spawn x=\"736\" y=\"1341\" z=\"7\"/><temple x=\"736\" y=\"1341\" z=\"7\"/><skull type=\"0\" kills=\"0\" ticks=\"0\" absolve=\"0\"/><health now=\"100\" max=\"100\" food=\"0\"/><bless now=\"0\" bless1=\"0\" bless2=\"0\" bless3=\"0\" bless4=\"0\" bless5=\"0\"/><mana now=\"0\" max=\"0\" spent=\"0\"/><ban banned=\"0\" banstart=\"0\" banend=\"0\" comment=\"\" reason=\"\" action=\"\" deleted=\"0\" finalwarning=\"0\" banrealtime=\"\"/><look type=\"5\" niesmiertelnosc=\"0\" timeroom=\"210\" head=\"1\" body=\"70\" legs=\"-1\" feet=\"1\"/><skills><skill skillid=\"0\" level=\"10\" tries=\"0\"/><skill skillid=\"1\" level=\"0\" tries=\"0\"/><skill skillid=\"2\" level=\"10\" tries=\"0\"/><skill skillid=\"3\" level=\"10\" tries=\"0\"/><skill skillid=\"4\" level=\"10\" tries=\"0\"/><skill skillid=\"5\" level=\"10\" tries=\"0\"/><skill skillid=\"6\" level=\"0\" tries=\"0\"/></skills><spells/><deaths/><inventory/><depots><depot depotid=\"1\"><item id=\"2590\"><inside><item id=\"2594\"/></inside></item></depot></depots><storage><data key=\"2\" value=\"2\"/><data key=\"5\" value=\"5\"/><data key=\"1031\" value=\"1\"/><data key=\"2675\" value=\"0\"/><data key=\"28095\" value=\"1\"/></storage></player>";
?>

I powinno dzia?a? :p
 

Venn

Advanced User
Joined
May 10, 2009
Messages
174
Reaction score
5
Odp: acc maker

ten skrypt jest zmieniony
ja poda?em jak wygl?da oryginalny skrypt a jak mon ju? zmieniony .. i nie dzia?a
 

Hadol

Senior User
Joined
May 8, 2008
Messages
998
Reaction score
99
Age
30
Odp: acc maker

A jaki ty masz w og?le silnik ??:p
 
Status
Not open for further replies.
Top