niech ktos powie, co tu przerobic aby dodac item do sms shop, bo tylko pacc jest
config.php
pacc2.php
config.php
Kod:
<?
define('DATAPATH','E:\\KAROL\\ots 7.6\\data'); // sciezka do katalogu data z \\ miedzy nazwami folderow
$servpath = 'E:\\KAROL\\ots 7.6\\'; // sciezka do katalogu z \\ miedzy nazwami folderow
$data_folder = 'E:\KAROL\ots 7.6\data'; // sciezka do katalogu data, z \ miedzy nazwami folderow bez
$hidden_chars = array("GM Czuk"); // Wpisz po przecinkach i w takiej postaci "nazwa" imiona postaci, ktore nie maja byc wyswietlane w statystykach
$admin = "1325244"; //numer acc administratora strony, numer musi sie zgadzac z numerem acc na serwerze
$ip_serwera = "czuk76.no-ip.org"; //ip servera
define('IP','czuk76.no-ip.org'); //ip servera
$port = "7171"; //port servera
define('PORT','7171'); //port servera
$expinfo = "1000x"; //ilosc expa na serverze
$server_type = "PVP"; //typ swiata
define('ROOK_SYS',ture); //czy ma byc rookgard system true=tak, false=nie
define('PL_XML',false); //czy twoj server obsluguje pliki xml true=tak, false=nie
$nazwaserwera = "Illusion x1000"; //Nazwa twojego servera
$sizeacc = "7"; // D?ugo¶? account number (zalecane 6!)
$stats_limit = ("30"); // limit wy¶wietlanych statystyk
$acc_system = ("recznie"); // jezeli ustawisz "auto" to numer account b?dzie generowany automatycznie, jezeli "recznie" to gracz bedzie mogl sam wybrac numer
$maxChars = '4'; // Maksymalna ilo¶? postaci na jednym koncie, 0 = bez limitu
$zabronione = "111111"; //tutaj mozesz podac numer na ktory nie mozna sie zalogowac np acc manager
//ustawienia sms shop
$txtwlasciciel = "czuk76.no-ip.org"; //strona accmakera
$txtemail = "czuk14@wp.pl"; //e-mail wlasciciela w serwisie dotpay
$id = "xxxxx"; //id uzytkownika dotpay
//druga opcja
$code2 = "czuk2"; //kod do drugiej opcji
$txtnumer2 = "72068"; //numer na jaki trzeba wyslac sms w drugiej opcji
$txttresc2 = "AP czuk2"; //tresc sms-a w drugiej opcji
$txtkoszt2 = "2,44"; //koszt z vat
$txtczas2 = "200"; //ilosc godzin drugiej opcji
$czass2 = "720000000"; //aby policzyc ten czas nalezy wykonac dzialanie--->iloscgodzin*6000*600=czass
//trzecia opcja
$code3 = "czuk"; //kod do trzeciej opcji
$txtnumer3 = "73068"; //numer na jaki trzeba wyslac sms w trzeciej opcji
$txttresc3 = "AP czuk"; //tresc sms-a w trzeciej opcji
$txtkoszt3 = "3,66"; //koszt z vat
$txtczas3 = "300"; //ilosc godzin trzeciej opcji
$czass3 = "1080000000"; //aby policzyc ten czas nalezy wykonac dzialanie--->iloscgodzin*6000*600=czass
//Tutaj skonfiguruj pocz±tkowe ustawienia postaci
$lvl = '10'; // pocz±tkowy level
$exp = '9300'; // pocz±tkowy exp (musi isc w parze z levelem)
$cap = '997'; // pocz±tkowy udzwig (cap)
// ustawienia spawnu
$spawnx = '169';
$spawny = '102';
$spawnz = '8';
// ustawienia temple
$templex = '169';
$templey = '102';
$templez = '8';
//Konfiguracja rook
// wygl±d
$look[ROOK][MALE] = '130';
$look[ROOK][FEMALE] = '138';
// HP, mana, magic level
$health[ROOK] = '195';
$mana[ROOK] = '95';
$mlvl[ROOK] = '30';
// Skile: fist,club,sword,axe,dist,shld,fish
$skill[ROOK] = array(10, 10, 10, 10, 10, 15, 10);
// Eq: helm, amul, bp, armor, rght, left, legs, boot, ring, ammo
$equip[ROOK] = array(2490, 2129, 1988, 2463, 2423, 2525, 2468, 2643, 2164, 0);
// Backpack (plecak):
$bp[ROOK] = '<item id="2152" count="40"/><item id="2311" count="100"/><item id="2120" count="40"/><item id="2554" count="7"/>';
//Konfiguracja Sorcerera
// wygl±d
$look[SORC][MALE] = '130';
$look[SORC][FEMALE] = '138';
// HP, mana, magic level
$health[SORC] = '195';
$mana[SORC] = '95';
$mlvl[SORC] = '30';
// Skile: 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);
// Backpack (plecak):
$bp[SORC] = '<item id="2160" count="40"/><item id="2311" count="100"/><item id="2120" count="40"/><item id="2554" count="7"/>';
//Konfiguracja Druida
// wygl±d
$look[DRUID][MALE] = '130';
$look[DRUID][FEMALE] = '138';
// HP, mana, magic level
$health[DRUID] = '195';
$mana[DRUID] = '95';
$mlvl[DRUID] = '30';
// Skile: 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);
// Backpack (plecak):
$bp[DRUID] = '<item id="2160" count="40"/><item id="2311" count="100"/><item id="2120" count="40"/><item id="2554" count="7"/>';
//Konfiguracja Paladina
// wygl±d
$look[PALADIN][MALE] = '129';
$look[PALADIN][FEMALE] = '137';
// HP, mana, magic level
$health[PALADIN] = '205';
$mana[PALADIN] = '65';
$mlvl[PALADIN] = '12';
// Skile: 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);
// Backpack:
$bp[PALADIN] = '<item id="2160" count="40"/><item id="2543" count="100"/><item id="2120" count="40"/><item id="2554" count="7"/>';
//Konfiguracja Knighta
// wygl±d
$look[KNIGHT][MALE] = '131';
$look[KNIGHT][FEMALE] = '139';
// HP, mana, magic level
$health[KNIGHT] = '215';
$mana[KNIGHT] = '45';
$mlvl[KNIGHT] = '4';
// Skile: 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);
// Backpack:
$bp[KNIGHT] = '<item id="2160" count="40"/><item id="2311" count="100"/><item id="2120" count="40"/><item id="2554" count="7"/>';
//Nie Zmieniac!!!!!!
$acc_folder = DATAPATH.'\\accounts\\'; //Nie Zmieniac!!!!!!
$player_folder = DATAPATH.'\\players\\'; //Nie Zmieniac!!!!!!
$diraccount = $servpath.'\\data\\accounts/'; //Nie Zmieniac!!!!!!
$dirhouses = $servpath. '\data\houses/'; //Nie Zmieniac!!!!!!
$dirplayer = $data_folder."\\players/"; //Nie Zmieniac!!!!!!!
$pirplayer = $data_folder.'\\players'; //Nie Zmieniac!!!!!!!
$dirvip = $data_folder."\\vip"; //Nie Zmieniac!!!!!!
$folderdata = "$data_folder\\"; //Nie Zmieniac!!!!!!
$folderacc = "$diraccount\\"; //Nie Zmieniac!!!!!!
$folderplayer = "$dirplayer\\"; //Nie Zmieniac!!!!!!
$title = ("by Piuro"); // tego nie zmieniaj, uszanuj prawa autorskie!!
$ilosckont = count(glob("$diraccount/*.*")); //Nie Zmieniac!!!!!!
$iloscpostaci = count(glob("$dirplayer/*.*")); //Nie Zmieniac!!!!!!
$iloscdomkow = count(glob("$data_folder/houses/*.*")); //Nie Zmieniac!!!!!!
$ilospotworow = count(glob("$data_folder/monster/*.*")); //Nie Zmieniac!!!!!!
$ilosnpc = count(glob("$data_folder/npc/*.*")); //Nie Zmieniac!!!!!!
if (!defined('MALE')) define('MALE', 1); //Nie Zmieniac!!!!!!
if (!defined('FEMALE')) define('FEMALE', 0);//Nie Zmieniac!!!!!!
if (!defined('ROOK')) define('ROOK', 0); //Nie Zmieniac!!!!!!
if (!defined('SORC')) define('SORC', 1); //Nie Zmieniac!!!!!!
if (!defined('DRUID')) define('DRUID', 2); //Nie Zmieniac!!!!!!
if (!defined('PALADIN')) define('PALADIN', 3); //Nie Zmieniac!!!!!!
if (!defined('KNIGHT')) define('KNIGHT', 4); //Nie Zmieniac!!!!!!
?>
pacc2.php
Kod:
<td width="558">
<table width="548" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><h2 class="text2"><center>SMS SHOP</center></h2></td>
</tr>
<tr>
<td>
<tr>
<td>
<br />
<?
ini_set ('display_errors', off);
include("config.php");
$nick = $_POST['name'];
if(isset($_POST['check']) && isset($_POST['name']))
{
$_err=false;
$type = "sms";
$del= "1";
$fileplayer = $player_folder .$nick.'.xml';
$XMLplayer = simplexml_load_string(file_get_contents($fileplayer));
$check = $_POST['check'];
if($XMLplayer == NULL)
{
$_err=true;
echo "<font color='red' size=5><center><b>Podaj prawid?ow± nazw? postaci!</b></center></font><br>";
}
if($_err)
{
echo "<font color='black' size=5><center><b><a href='index.php?body=smsshop'>Powr?t</a></b></center></font><br>";
}else{
if($_POST['rzecz'] == PACC1)
{
$handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code1."&check=".$check."&type=".$type."&del=".$del, 'r');
$status = fgets($handle, 8);
fclose($handle);
if ($status == 0)
{
$_err=true;
echo "<font color='red' size=5><center><b>Podaj prawid?owy kod!</b></center></font><br>";
}
if($_err)
{
echo "<font color='black' size=5><center><b><a href='index.php?body=smsshop'>Powr?t</a></b></center></font><br>";
}else{
$open_file = fopen($player_folder .$nick.'.xml', 'r');
$playerXML = simplexml_load_string(fread($open_file, 999999));
fclose($open_file);
$dom = dom_import_simplexml($playerXML);
$dom2 = $dom->getAttribute('premticks');
$wszystko = $dom2 + $czass1;
$dom->setAttribute('premticks', $wszystko);
$newplayerFile = $playerXML->asXML();
$open_file = fopen($player_folder .$nick.'.xml', 'w');
fwrite($open_file, $newplayerFile);
fclose($open_file);
echo "<font color='red' size=3><center><b>Otrzyma?e¶ ".$txtczas1;
echo " godzin PACC</b></center></font><br><font color='black' size=3><center><b><a href='index.php?body=smsshop'>Powr?t</a></b></center></font><br>";
}
}
if($_POST['rzecz'] == PACC2)
{
$handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code2."&check=".$check."&type=".$type."&del=".$del, 'r');
$status = fgets($handle, 8);
fclose($handle);
if ($status == 0)
{
$_err=true;
echo "<font color='red' size=5><center><b>Podaj prawid?owy kod!</b></center></font><br>";
}
if($_err)
{
echo "<font color='black' size=5><center><b><a href='index.php?body=smsshop'>Powr?t</a></b></center></font><br>";
}else{
$open_file = fopen($player_folder .$nick.'.xml', 'r');
$playerXML = simplexml_load_string(fread($open_file, 999999));
fclose($open_file);
$dom = dom_import_simplexml($playerXML);
$dom2 = $dom->getAttribute('premticks');
$wszystko = $dom2 + $czass2;
$dom->setAttribute('premticks', $wszystko);
$newplayerFile = $playerXML->asXML();
$open_file = fopen($player_folder .$nick.'.xml', 'w');
fwrite($open_file, $newplayerFile);
fclose($open_file);
echo "<font color='red' size=3><center><b>Otrzyma?e¶ ".$txtczas2;
echo " godzin PACC</b></center></font><br><font color='black' size=3><center><b><a href='index.php?body=smsshop'>Powr?t</a></b></center></font><br>";
}
}
if($_POST['rzecz'] == PACC3)
{
$handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code3."&check=".$check."&type=".$type."&del=".$del, 'r');
$status = fgets($handle, 8);
fclose($handle);
if ($status == 0)
{
$_err=true;
echo "<font color='red' size=5><center><b>Podaj prawid?owy kod!</b></center></font><br>";
}
if($_err)
{
echo "<font color='black' size=5><center><b><a href='index.php?body=smsshop'>Powr?t</a></b></center></font><br>";
}else{
$open_file = fopen($player_folder .$nick.'.xml', 'r');
$playerXML = simplexml_load_string(fread($open_file, 999999));
fclose($open_file);
$dom = dom_import_simplexml($playerXML);
$dom2 = $dom->getAttribute('premticks');
$wszystko = $dom2 + $czass3;
$dom->setAttribute('premticks', $wszystko);
$newplayerFile = $playerXML->asXML();
$open_file = fopen($player_folder .$nick.'.xml', 'w');
fwrite($open_file, $newplayerFile);
fclose($open_file);
echo "<font color='red' size=3><center><b>Otrzyma?e¶ ".$txtczas3;
echo " godzin PACC</b></center></font><br><font color='black' size=3><center><b><a href='index.php?body=smsshop'>Powr?t</a></b></center></font><br>";
}
}
}
}
?>
</td>
</tr>
</td>
</tr>
</table>