• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Ver. 0.1.0 - Gesior ITEM/PACC Shop (PHP+LUA) for TFS

Gesior I got some scripts that dotpay give users maybe they will help You. Files added in atachement :)
 

Attachments

Last edited:
Gesior, I need your help. Suddenly my script is not recording the date anymore. I do the transaction but on the Trans. History it says "Not realized yet."
 
Gesior I Have problem
[20/07/2008 13:33:44] Lua Script Error: [CreatureScript Interface]
[20/07/2008 13:33:44] in a timer event called from:
[20/07/2008 13:33:44] data/creaturescripts/scripts/firstitems.lua:eek:nLogin

[20/07/2008 13:33:44] data/creaturescripts/scripts/firstitems.lua:63: attempt to compare string with number
[20/07/2008 13:33:44] stack traceback:
[20/07/2008 13:33:44] data/creaturescripts/scripts/firstitems.lua:63: in function <data/creaturescripts/scripts/firstitems.lua:17>

I use latest version tfs 0.2rc13

So Can You Help me? What's is wrong ;/
 
Last edited:
hmmm its work but where i can found this shop or how i can do this shop ?? fast help please ;):thumbup:


ohh i have thx its so nice!!!!
 
Last edited:
Wkurwiłem się kurwa! Po huj dałeś gęsior ten SMS SHOP system skoro kurwa nie dałeś jebanego buyproints.php? Nie ma tego nigdzie w necie bo szukałem około 4h! Koleś chciał mi to napisać za jebane 30zł! Skąd mam to wziąć? Napisz ten skrpt i udostępnij w tym temacie bo inaczej to wogóle nie ma sensu!
 
Admin must put his SMS to Points script in file Buypoints.php

What i gonna do? xD
 
hehh ye I would like to have script points for sms :p But I think nobody will show it for public because they dont need other servers with pacc for sms :p


Edit: I Found something like this:

<?php
$main_content = '<h1>Punkty premium</h1>
<ul>
<li><font color="red"><b>Wyloguj się z gry!</b></font></li>
<li>W smsie zwrotnym otrzymasz kod aktywacyjny</li>
<li>Wpisz numer konta na którym maja zostac dodane punkty premium do formularza ponizej</li>
<li>Wpisz swój 8-cyfrowy kod otrzymany smsem do formularza ponizej</li>
</ul>
<br/><b><font color="red">Usluga dziala w sieciach operatorów: Plus GSM, Era, Orange</font></b>
<br/><b>Wlasciciel serwisu: ---</b>
<br/><b>Kontakt elektroniczny:
<script type="text/javascript">
// <![CDATA[
var uzytkownik = "EMAIL";
var domena = "gmail.com";
var dodatkowe = "?subject=YOURWORLDNAMEHERE&body=Napisz co%9C:%0A";
var opis = "Wyslij do mnie mail";
document.write("<a hr" + "ef="mai" + "lto:" + uzytkownik + "\x40" + domena + dodatkowe + "">");
if (opis) document.write(opis + "<"+"/a>");
else document.write(uzytkownik + "\x40" + domena + "<"+"/a>");
// ]]>
</script>
</b>
<br/><b>Serwis sms obsluguje <a href="http://dotpay.eu">dotpay.eu</a> - <a href="http://www.dotpay.eu/regulaminsms">Regulamin serwisu</a></b>
<h2>Formularz:</h2>
<form action="index.php?subtopic=buypoints" method="post" onreset="if (!confirm("Czy na pewno chcesz wyczycić cały formularz?")) return false">
<table>
<tr>
<td width="30%">Numer konta:</td>
<td><input type="password" name="account"/></td>
</tr>
<tr>
<td width="30%">Kod aktywacyjny:</td>
<td><input type="text" name="check" maxlength="8">
</td>
</tr>
</table>
<input type="submit" value="Zamawiam punkty!"/>
<input type="reset" value="Wyczyść"/>
</form>';

if ($_POST)
{
$account = (int) $_POST['account'];
$Points = '200';
$query = mysql_query("SELECT premium_points FROM accounts WHERE id='".$account."'");
$result = mysql_fetch_array($query, MYSQL_ASSOC);
$curr_date = time();
$check = $_POST['check'];

//START Sprawdzacz kodu
$id = "17828";
$code = "AP.OLDOTS";
$type = "sms";
$del="1";
//END Sprawdzacz kodu

$handle = fopen("http://dotpay.eu/check_code.php?id=".$id."&code=".$code."&check=".$ check."&type=".$type."&del=".$del."", "r");
$status = fgets($handle, 8);
fclose($handle);

if ((empty($check)) || (empty($account)))
{
$message = "Proszę wypelnić wszystkie pola.";
}

elseif ($status == 0)
{
$message = "Wpisany kod jest niepoprawny.";
}
else
{
$actualPoints = $result[premium_points];
$newPoints = $actualPoints + $Points;

mysql_query("UPDATE accounts SET premium_points='".$newPoints."' WHERE id='".$account."'");
$message = "<font color='red'><b>Konto zostalo zasilone 200 punktami premium. Życzymy milej gry!</b></font>";
}
}

if (isset($message))
{
echo $message;
}

?>


But I have error

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in C:\xampp\htdocs\buypoints.php on line 58


anyone could help?
 
Last edited:
Hum.. But can any1 tell how to get that script?:D

what script? I gave u here :p but I dont know how its working :/ I need help with this error


@Kret - I dont think that deleting this line will help with anything.. It wont work more then


something is wrong here ://


$handle = fopen("http://dotpay.eu/check_code.php?id=".$id."&code=".$code."&check=".$ check."&type=".$type."&del=".$del."", "r");
$status = fgets($handle, 8);
fclose($handle);
 
Last edited:
Maybe I'll post today my version of buypremium.php
I can't test it, because I don't have dotpay account :>
Actuall version:
PHP:
<?PHP
####################       CONFIG      ###################################################
$config['dotpay'] = array();
$config['dotpay'][0]['id'] = 10;       # numer ID zarejestrowanego klienta
$config['dotpay'][0]['code'] = "abcd"; # identyfikator uslug SMS
$config['dotpay'][0]['type'] = "sms";   # typ konta: C1 - 8 znakowy kod bezobslugowy, sms - dla sprawdzania SMSow
$config['dotpay'][0]['addpoints'] = 100; # ile premium punktow daje dany sms
$config['dotpay'][0]['sms_number'] = 73068; # numer na jaki nalezy wyslac kod
$config['dotpay'][0]['sms_text'] = "AP.TwojKodDotPay"; # tresc jaka ma byc w SMSie
$config['dotpay'][0]['sms_cost'] = "3.66 zl z VAT"; # cena za wyslanie sms
#################################################################################

function check_code($code, $posted_code, $user_id, $type)
{
	$handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=0", 'r');
    $status = fgets($handle, 8);
    $czas_zycia = fgets($handle, 24);
    fclose($handle);
    $czas_zycia = rtrim($czas_zycia);
	return array($status, $czas_zycia);
}

function delete_code($code, $posted_code, $user_id, $type)
{
	$handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=1", 'r');
    fclose($handle);
}

function add_points(OTS_Account $account, $number_of_points)
{
	if($account->isLoaded())
	{
		$account->setCustomField('premium_points', ($account->getCustomField('premium_points')+$number_of_points));
		return true;
	}
	else
		return false;
}
#################################################################################
$sms_type = (int) $_POST['sms_type'];
$posted_code = trim($_POST['code']);
$to_user = trim($_POST['to_user']);
$verify_code = trim($_POST['verify_code']);
#################################################################################
if(!empty($to_user))
{
	if(is_numeric($to_user))
	{
		$account = new OTS_Account();
		$account->load($to_user);
	}
	else
	{
		$player = new OTS_Player();
		$player->find($to_user);
		if($player->isLoaded())
			$account = $player->getAccount();
		else
			$account = new OTS_Account();
	}
	
	if(empty($posted_code))
		$errors[] = 'Prosze wpisac kod z SMSa.';
		
	if(!$account->isLoaded())
		$errors[] = 'Konto/konto postaci o podanym nicku nie istnieje.';
		
	if(count($errors) == 0)
	{
		if($config['site']['verify_code_shop'] == 'yes')
		{
			//check verification code
			$string = strtoupper($_SESSION['string']);
			$userstring = strtoupper($verify_code);
			$_SESSION['string'] = mt_rand(1,99999);
			if(empty($string))
				$errors[] = "Kod z obrazka w sesji jest pusty, sproboj ponownie.";
			else
			{
				if(empty($userstring))
					$errors[] = "Prosze wpisac kod z obrazka.";
				else
				{
					if($string != $userstring)
						$errors[] = "Kod z obrazka jest niepoprawny.";
				}
			}
		}
		
		if(count($errors) == 0)
		{
			$code_info = check_code($config['dotpay'][$sms_type]['code'], $posted_code, $config['dotpay'][$sms_type]['id'], $config['dotpay'][$sms_type]['type']);
			if($code_info[0] == 0)
				$errors[] = 'Podany kod z SMS jest niepoprawny lub wybrano zla opcje SMSa.';
			else
			{
				if(add_points($account, $config['dotpay'][$sms_type]['addpoints']))
				{
					$code_info = delete_code($config['dotpay'][$sms_type]['code'], $posted_code, $config['dotpay'][$sms_type]['id'], $config['dotpay'][$sms_type]['type']);
					$main_content .= '<h2><font color="red">Dodano '.$config['dotpay'][$sms_type]['addpoints'].' punktow premium do konta: '.$to_user.' !</font></h2>';
				}
				else
					$errors[] = 'Wystapil blad podczas dodawania punktow do konta, sproboj ponownie.';
			}
		}
	}
}
if(count($errors) > 0)
{
	$main_content .= '<h2><font color="red">Wystapily bledy:</font></h2><b>';
	foreach($errors as $error)
		$main_content .= '* '.$error.'<br />';
	$main_content .= '</b><hr />';
}
$main_content .= '<h1><font color="red">System nie aktywny, prosze nie wysylac SMSow!!!</font></h1>Kup punkty premium, mozesz je wymienic w sklepie OTSa na PACC/przedmioty w grze, aby zakupic punkty premium wyslij SMSa:';
foreach($config['dotpay'] as $sms)
	$main_content .= '<br /><b>* Na numer <font color="red">'.$sms['sms_number'].'</font> o tresci <font color="red"><b>'.$sms['sms_text'].'</b></font> za <font color="red"><b>'.$sms['sms_cost'].'</b></font>, a za kod zwrotny dostaniesz <font color="red"><b>'.$sms['addpoints'].'</b></font> punktow premium.</b>';
$main_content .= '<br />W SMSie zwrotnym otrzymasz specjalny kod. Wpisz ten kod w formularzu wraz z nickiem postaci lub numerem konta osoby ktora ma otrzymac punkty.<hr />
Serwis SMS obslugiwany przez <a href="http://www.dotpay.pl" target="_blank">Dotpay.pl</a><br />
Regulamin: <a href="http://www.dotpay.pl/regulaminsms" target="_blank">http://www.dotpay.pl/regulaminsms</a><br />
Usluga dostepna w sieciach: Orange, Plus GSM, Era.<br />
<b>'.$config['server']['serverName'].'</b> nie odpowieda za zle wpisane tresci SMS.<hr />
<form action="index.php?subtopic=buypoints" method="POST"><table>';
$main_content .= '<tr><td><b>Nick postaci lub numer konta: </b></td><td><input type="text" size="20" value="'.$to_user.'" name="to_user" /></td></tr>
<tr><td><b>Kod z SMSa: </b></td<td><input type="text" size="20" value="'.$posted_code.'" name="code" /></td></tr><tr><td><b>Typ wyslanego SMSa: </b></td><td><select name="sms_type">';
foreach($config['dotpay'] as $id => $sms)
	$main_content .= '<option value="'.$id.'">numer '.$sms['sms_number'].' - kod '.$sms['sms_text'].' - SMS za '.$sms['sms_cost'].'</option>';
$main_content .= '</select></td></tr>';
if($config['site']['verify_code'] == 'yes')
		$main_content .= '<tr><td><B>Kod weryfikacji: </B></td><td><img src="imgverification/imagebuilder.php?image_refresher='.mt_rand(1,99999).'" border="0" alt=""></td></tr>
						  <tr><td><B>Wpisz kod weryfikacji: </B></td><td><INPUT id="verify" NAME="verify_code" VALUE="" SIZE=30></td></tr>';
$main_content .= '<tr><td></td><td><input type="submit" value="Sprawdz" /></td></tr></table></form>';
?>
-------
Test:
http://debestia.hopto.org/index.php?subtopic=buypoints
 
Last edited:
Maybe I'll post today my version of buypremium.php
I can't test it, because I don't have dotpay account :>
Actuall version:
PHP:
<?PHP
####################       CONFIG      ###################################################
$config['dotpay'] = array();
$config['dotpay'][0]['id'] = 10;       # numer ID zarejestrowanego klienta
$config['dotpay'][0]['code'] = "abcd"; # identyfikator uslug SMS
$config['dotpay'][0]['type'] = "sms";   # typ konta: C1 - 8 znakowy kod bezobslugowy, sms - dla sprawdzania SMSow
$config['dotpay'][0]['addpoints'] = 100; # ile premium punktow daje dany sms
$config['dotpay'][0]['sms_number'] = 73068; # numer na jaki nalezy wyslac kod
$config['dotpay'][0]['sms_text'] = "AP.TwojKodDotPay"; # tresc jaka ma byc w SMSie
$config['dotpay'][0]['sms_cost'] = "3.66 zl z VAT"; # cena za wyslanie sms
#################################################################################

function check_code($code, $posted_code, $user_id, $type)
{
	$handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=0", 'r');
    $status = fgets($handle, 8);
    $czas_zycia = fgets($handle, 24);
    fclose($handle);
    $czas_zycia = rtrim($czas_zycia);
	return array($status, $czas_zycia);
}

function delete_code($code, $posted_code, $user_id, $type)
{
	$handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=1", 'r');
    fclose($handle);
}

function add_points(OTS_Account $account, $number_of_points)
{
	if($account->isLoaded())
	{
		$account->setCustomField('premium_points', ($account->getCustomField('premium_points')+$number_of_points));
		return true;
	}
	else
		return false;
}
#################################################################################
$sms_type = (int) $_POST['sms_type'];
$posted_code = trim($_POST['code']);
$to_user = trim($_POST['to_user']);
$verify_code = trim($_POST['verify_code']);
#################################################################################
if(!empty($to_user))
{
	if(is_numeric($to_user))
	{
		$account = new OTS_Account();
		$account->load($to_user);
	}
	else
	{
		$player = new OTS_Player();
		$player->find($to_user);
		if($player->isLoaded())
			$account = $player->getAccount();
		else
			$account = new OTS_Account();
	}
	
	if(empty($posted_code))
		$errors[] = 'Prosze wpisac kod z SMSa.';
		
	if(!$account->isLoaded())
		$errors[] = 'Konto/konto postaci o podanym nicku nie istnieje.';
		
	if(count($errors) == 0)
	{
		if($config['site']['verify_code_shop'] == 'yes')
		{
			//check verification code
			$string = strtoupper($_SESSION['string']);
			$userstring = strtoupper($verify_code);
			$_SESSION['string'] = mt_rand(1,99999);
			if(empty($string))
				$errors[] = "Kod z obrazka w sesji jest pusty, sproboj ponownie.";
			else
			{
				if(empty($userstring))
					$errors[] = "Prosze wpisac kod z obrazka.";
				else
				{
					if($string != $userstring)
						$errors[] = "Kod z obrazka jest niepoprawny.";
				}
			}
		}
		
		if(count($errors) == 0)
		{
			$code_info = check_code($config['dotpay'][$sms_type]['code'], $posted_code, $config['dotpay'][$sms_type]['id'], $config['dotpay'][$sms_type]['type']);
			if($code_info[0] == 0)
				$errors[] = 'Podany kod z SMS jest niepoprawny lub wybrano zla opcje SMSa.';
			else
			{
				if(add_points($account, $config['dotpay'][$sms_type]['addpoints']))
				{
					$code_info = delete_code($config['dotpay'][$sms_type]['code'], $posted_code, $config['dotpay'][$sms_type]['id'], $config['dotpay'][$sms_type]['type']);
					$main_content .= '<h2><font color="red">Dodano '.$config['dotpay'][$sms_type]['addpoints'].' punktow premium do konta: '.$to_user.' !</font></h2>';
				}
				else
					$errors[] = 'Wystapil blad podczas dodawania punktow do konta, sproboj ponownie.';
			}
		}
	}
}
if(count($errors) > 0)
{
	$main_content .= '<h2><font color="red">Wystapily bledy:</font></h2><b>';
	foreach($errors as $error)
		$main_content .= '* '.$error.'<br />';
	$main_content .= '</b><hr />';
}
$main_content .= '<h1><font color="red">System nie aktywny, prosze nie wysylac SMSow!!!</font></h1>Kup punkty premium, mozesz je wymienic w sklepie OTSa na PACC/przedmioty w grze, aby zakupic punkty premium wyslij SMSa:';
foreach($config['dotpay'] as $sms)
	$main_content .= '<br /><b>* Na numer <font color="red">'.$sms['sms_number'].'</font> o tresci <font color="red"><b>'.$sms['sms_text'].'</b></font> za <font color="red"><b>'.$sms['sms_cost'].'</b></font>, a za kod zwrotny dostaniesz <font color="red"><b>'.$sms['addpoints'].'</b></font> punktow premium.</b>';
$main_content .= '<br />W SMSie zwrotnym otrzymasz specjalny kod. Wpisz ten kod w formularzu wraz z nickiem postaci lub numerem konta osoby ktora ma otrzymac punkty.<hr />
Serwis SMS obslugiwany przez <a href="http://www.dotpay.pl" target="_blank">Dotpay.pl</a><br />
Regulamin: <a href="http://www.dotpay.pl/regulaminsms" target="_blank">http://www.dotpay.pl/regulaminsms</a><br />
Usluga dostepna w sieciach: Orange, Plus GSM, Era.<br />
<b>'.$config['server']['serverName'].'</b> nie odpowieda za zle wpisane tresci SMS.<hr />
<form action="index.php?subtopic=buypoints" method="POST"><table>';
$main_content .= '<tr><td><b>Nick postaci lub numer konta: </b></td><td><input type="text" size="20" value="'.$to_user.'" name="to_user" /></td></tr>
<tr><td><b>Kod z SMSa: </b></td<td><input type="text" size="20" value="'.$posted_code.'" name="code" /></td></tr><tr><td><b>Typ wyslanego SMSa: </b></td><td><select name="sms_type">';
foreach($config['dotpay'] as $id => $sms)
	$main_content .= '<option value="'.$id.'">numer '.$sms['sms_number'].' - kod '.$sms['sms_text'].' - SMS za '.$sms['sms_cost'].'</option>';
$main_content .= '</select></td></tr>';
if($config['site']['verify_code'] == 'yes')
		$main_content .= '<tr><td><B>Kod weryfikacji: </B></td><td><img src="imgverification/imagebuilder.php?image_refresher='.mt_rand(1,99999).'" border="0" alt=""></td></tr>
						  <tr><td><B>Wpisz kod weryfikacji: </B></td><td><INPUT id="verify" NAME="verify_code" VALUE="" SIZE=30></td></tr>';
$main_content .= '<tr><td></td><td><input type="submit" value="Sprawdz" /></td></tr></table></form>';
?>
-------
Test:
http://debestia.hopto.org/index.php?subtopic=buypoints

Do you have it on english?^^
 
Back
Top