Pomocy acc maker

Status
Zamknięty.

Rafeq

Active User
Zarejestrowany
Dołączył
Grudzień 21, 2008
Posty
114
Liczba reakcji
7
Jak zrobic w acc makerze zeby player?w nie zapisywa? w data\vip - tylko w data/players/players.xml???

Blagam Help :)
 
Odp: Pomocy acc maker

podaj mi ca?y acc maker... napisz w code

bo niewiem jak ty tam masz ... Bo ja np. ustawiam w players ale nic niepisze w vip.
 
Odp: Pomocy acc maker

K ;)

config.php
Kod:
<?
$data_folder = "C:\Adi-Team-Ots\data"; // sciezka do katalogu data

$todata = "C:\Adi-Team-Ots\data";
//** 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 = 'adi-ots.no-ip.biz'; //tu wpisz ip twego ots
$port = '7171'; //domyslny 7171
$nazwaa = 'Adi-Ots 8.1'; //nazwa twego ots
$sitee = 'Adi OTS'; //title

$hidden_chars = array("GM"); //wpisuj tutaj postacie ktore niemaja byc wyslwietlane w statach (po przecinkach)
$stats_limit = "10"; // limit wyswietlanych statystyk
//** Konfiguracja spawnu, temple i miast **//
# Pamietaj, ze liczba wszystkich wpolrzednych i liczba miast musi byc sobie rowna!
// ustawienia spawnu

// I II III miasto
$sx = array("391"); // wpolrzedne 'x' spawnu poszczegolnych miast, nowe dodawaj po przecinku

$sy = array("525"); // wpolrzedne 'y' spawnu poszczegolnych miast, nowe dodawaj po przecinku

$sz = array("7"); // wpolrzedne 'z' spawnu poszczegolnych miast, nowe dodawaj po przecinku

// ustawienia temple

// I II III miasto
$tx = array("391"); // wpolrzedne 'x' temple poszczegolnych miast, nowe dodawaj po przecinku

$ty = array("525"); // wpolrzedne 'y' temple poszczegolnych miast, nowe dodawaj po przecinku

$tz = array("7"); // wpolrzedne 'z' temple poszczegolnych miast, nowe dodawaj po przecinku

// ustawienia miast
$liczba_miast = '1'; // wpisz tu liczbe miast
$city_name = array("Bushowo"); // nazwy miast, nowe dodawaj po przecinku 
//** 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); // Nie ruszaj!
if (!defined('MALE')) define('MALE', 1); // tego nie ruszaj!
if (!defined('FEMALE')) define('FEMALE', 0); // tego nie ruszaj!
if (!defined('SORC')) define('SORC', 1); // tego nie ruszaj!
if (!defined('DRUID')) define('DRUID', 2); // tego nie ruszaj!
if (!defined('PALADIN')) define('PALADIN', 3); // tego nie ruszaj!
if (!defined('KNIGHT')) define('KNIGHT', 4); // tego nie ruszaj!
$wersja = "v 2.6.1"; // Nie ruszaj, gdyz wystapia bledy przy sprawdzaniu dostepnosci aktualizacji
?><?
# 
# data utworzenia: 1-03-2007
# utworzono przez: Admin - robak111@amorki.pl
$tsp[admin]="rafek1241";
$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]="Adi OTS 8.1";
$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
Kod:
<?

$data_ = "C:\adi-team-ots\data"; // sciezka do katalogu data


//----------------------------- All vocations ----------------------------------
$lvl = '10'; 	// level
$exp = '9300';	// exp
$cap = '9000';	// cap

// spawn
$spawnx = '438';
$spawny = '504';
$spawnz = '7';

// temple
$templex = '438';
$templey = '504';
$templez = '7';


if (!defined('MALE')) define('MALE', 1);
if (!defined('FEMALE')) define('FEMALE', 0);
if (!defined('SORC')) define('SORC', 1);
if (!defined('DRUID')) define('DRUID', 2);
if (!defined('PALADIN')) define('PALADIN', 3);
if (!defined('KNIGHT')) define('KNIGHT', 4);
$diraccount = $data_."\\accounts";
$dirplayer =  $data_."\\players";
$dirvip =     $data_."\\vip";

//-------------------------------- Sorcerer ------------------------------------
$look[SORC][MALE] = '130';
$look[SORC][FEMALE] = '138';

// HP, mana, mlevel
$health[SORC] = '195';
$mana[SORC] = '95';
$mlvl[SORC] = '30';

// Skills:          fist,club,sword,axe,dist,shld,fish
$skill[SORC] = array(10,  10,  10,  10,  10,  15,  10);

// Eq:               helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo
$equip[SORC] = array(2490, 2129, 1988, 2463, 2423, 2525, 2468, 2643, 2164, 0);

// Bp:
$bp[SORC] = '<item id="2152" count="2"/><item id="2311" count="10"/>';

//--------------------------------- Druid --------------------------------------
$look[DRUID][MALE] = '130';
$look[DRUID][FEMALE] = '138';

// HP, mana, mlevel
$health[DRUID] = '195';
$mana[DRUID] = '95';
$mlvl[DRUID] = '30';

// Skills:           fist,club,sword,axe,dist,shld,fish
$skill[DRUID] = array(10,  10,  10,  10,  10,  15,  10);

// Eq:                helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo
$equip[DRUID] = array(2490, 2129, 1988, 2463, 2423, 2525, 2468, 2643, 2164, 0);

// Bp:
$bp[DRUID] = '<item id="2152" count="2"/><item id="2311" count="10"/>';

//-------------------------------- Paladin -------------------------------------
$look[PALADIN][MALE] = '129';
$look[PALADIN][FEMALE] = '137';

// HP, mana, mlevel
$health[PALADIN] = '205';
$mana[PALADIN] = '65';
$mlvl[PALADIN] = '12';

// Skills:             fist,club,sword,axe,dist,shld,fish
$skill[PALADIN] = array(10,  10,  10,  10,  71,  41,  10);

// Eq:                  helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo
$equip[PALADIN] = array(2490, 2129, 1988, 2463, 2455,     0, 2468, 2643, 2164, 0);

// Bp:
$bp[PALADIN] = '<item id="2152" count="2"/><item id="2543" count="10"/>';

//--------------------------------- Knight -------------------------------------
$look[KNIGHT][MALE] = '131';
$look[KNIGHT][FEMALE] = '139';

// HP, mana, mlevel
$health[KNIGHT] = '215';
$mana[KNIGHT] = '45';
$mlvl[KNIGHT] = '4';

// Skills:            fist,club,sword,axe,dist,shld,fish
$skill[KNIGHT] = array(10,  71,  71,  71,  10,  71,  10);

// Eq:                 helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo
$equip[KNIGHT] = array(2490, 2129, 1988, 2463, 2423,  2525, 2468, 2643, 2164, 0);

// Bp:
$bp[KNIGHT] = '<item id="2152" count="2"/><item id="2311" count="3"/>';
?>

addchar.php
Kod:
<?php
error_reporting(E_ALL);
include 'checkunique.php';
require 'config.php';

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

include 'redir.php';

$_SESSION['page'] = 'index.php?page=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 <= 4) or die ('Invalid vocation!');

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

	preg_match("/^[a-zA-Z][a-zA-Z ]*$/", $nick) or die ('Nick zawiera niedozwolone znaki!');
	!preg_match("/^gm/i", $nick) or die ('Nie jeste¶ GM!');
	!preg_match("/^god/i", $nick) or die ('Nie jeste¶ 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'] = 'Posta? o takim nicku ju? istnieje.';
	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="1" exp="' . $exp . '" voc="' . $vocation . '" level="' . $lvl . '" access="0" cap="' . $cap . '" maglevel="' . $mlvl[$vocation] . '" lastlogin="0">
<spawn x="' . $spawnx . '" y="' . $spawny . '" z="' . $spawnz . '"/>
<temple x="' . $templex . '" y="' . $templey . '" z="' . $templez . '"/>
<health now="' . $health[$vocation] . '" max="' . $health[$vocation] . '" food="0"/>
<mana now="' . $mana[$vocation] . '" max="' . $mana[$vocation] . '" spent="0"/>
<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>Postac $nick za?o?ona pomy¶lnie!</b>";
	include 'success.php';
}
}

newacc();
?>
</center>

Prosze o szybk? pomoc
 
Odp: Pomocy acc maker

@refresh

fast!!! HELP!!!
 
Odp: Pomocy acc maker

Kod:
<?
$data_ = "C:\adi-team-ots\data"; // sciezka do katalogu data
//----------------------------- All vocations ----------------------------------
$lvl = '10'; 	// level
$exp = '9300';	// exp
$cap = '9000';	// cap
// spawn
$spawnx = '438';
$spawny = '504';
$spawnz = '7';
// temple
$templex = '438';
$templey = '504';
$templez = '7';
if (!defined('MALE')) define('MALE', 1);
if (!defined('FEMALE')) define('FEMALE', 0);
if (!defined('SORC')) define('SORC', 1);
if (!defined('DRUID')) define('DRUID', 2);
if (!defined('PALADIN')) define('PALADIN', 3);
if (!defined('KNIGHT')) define('KNIGHT', 4);
$diraccount = $data_."\\accounts";
$dirplayer =  $data_."\\players";
$dirvip =     $data_."[COLOR="Red"]\\vip[/COLOR]";

a skasuj to tylko \\vip i zobacz czy co? to da a tak wogule to czemu ci przeszkadza ze sie w vip zapisuj? ? :D
 
Odp: Pomocy acc maker

W configu musisz doda? tak? linijke:
$dirvip = 'D:\\DBJ\\Dbj\\dbj\\data\\vip'; // tu wpisujemy ?cie?k? do folderu vip, pami?tamy o podw?jnym "//"!

Dodaj j? pod scie?k? do folderu data
 
Status
Zamknięty.
Back
Do góry