• 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

im getting this error when a buyer log's in to recive there items..


[01/10/2008 13:59:17] Lua Script Error: [CreatureScript Interface]
[01/10/2008 13:59:17] in a timer event called from:
[01/10/2008 13:59:17] data/creaturescripts/scripts/login.lua:eek:nLogin

[01/10/2008 13:59:17] data/creaturescripts/scripts/login.lua:46: attempt to call global 'getItemWeight' (a nil value)
[01/10/2008 13:59:17] stack traceback:
[01/10/2008 13:59:17] data/creaturescripts/scripts/login.lua:46: in function <data/creaturescripts/scripts/login.lua:17>




They recive no message..
Anything to be done?...


Using [01/10/2008 13:58:44] The Forgotten Server - Version 0.3 (Pre-Alpha).
Lastest compile
 
This is real crap. Like when he writes 4. In your MySQL database execute (with phpmyadmin or something like that):
IT'S SAME LIKE IN VERSION 0.0.3

Code:
CREATE TABLE `z_ots_comunication` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`action` varchar(255) NOT NULL,
`param1` varchar(255) NOT NULL,
`param2` varchar(255) NOT NULL,
`param3` varchar(255) NOT NULL,
`param4` varchar(255) NOT NULL,
`param5` varchar(255) NOT NULL,
`param6` varchar(255) NOT NULL,
`param7` varchar(255) NOT NULL,
`delete_it` int(2) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
tachi i dont recommended use the tfs 0.3 for real server but i have a answer for ur question u have to change in login.lua getItemWeight for getItemWeightbyID
 
[02/10/2008 12:45:42] data/creaturescripts/scripts/login.lua:46: attempt to call global 'getItemWeightbyID' (a nil value)
[02/10/2008 12:45:42] stack traceback:
[02/10/2008 12:45:42] data/creaturescripts/scripts/login.lua:46: in function <data/creaturescripts/scripts/login.lua:17>
 
[02/10/2008 12:45:42] data/creaturescripts/scripts/login.lua:46: attempt to call global 'getItemWeightbyID' (a nil value)
[02/10/2008 12:45:42] stack traceback:
[02/10/2008 12:45:42] data/creaturescripts/scripts/login.lua:46: in function <data/creaturescripts/scripts/login.lua:17>
I'll actualize script today.
 
Hey,

when people got 1 pin for daopay they can enter it several times and they will recieve the points several times too. How to fix this?
 
Where am i suppose to write CREATE TABLE `z_ots_comunication` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`action` varchar(255) NOT NULL,
`param1` varchar(255) NOT NULL,
`param2` varchar(255) NOT NULL,
`param3` varchar(255) NOT NULL,
`param4` varchar(255) NOT NULL,
`param5` varchar(255) NOT NULL,
`param6` varchar(255) NOT NULL,
`param7` varchar(255) NOT NULL,
`delete_it` int(2) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
one problem

hello,i have problem with shopsystem


fatal error call to a member function fetch()on a non-objecte in c/xampp/htdocs/gesior/shopsystem.php on line 56.


thanks.
 
i re-installed the script... and im still getting this error...

Code:
[06/10/2008  13:12:52] Lua Script Error: [CreatureScript Interface] 
[06/10/2008  13:12:52] in a timer event called from: 
[06/10/2008  13:12:52] data/creaturescripts/scripts/login.lua:onLogin

[06/10/2008  13:12:52] data/creaturescripts/scripts/login.lua:46: attempt to call global 'getItemWeightbyID' (a nil value)
[06/10/2008  13:12:52] stack traceback:
[06/10/2008  13:12:52]     data/creaturescripts/scripts/login.lua:46: in function <data/creaturescripts/scripts/login.lua:17>

Using tfs 3.0
 
I didnt understand this:

4. In your MySQL database execute (with phpmyadmin or something like that):

???

What do I need to do? I dont understand that of "MySql database execute". Help :p
 
Code:
<?php
session_start();
include "config.php";
include "functions.php";
include "pots/OTS.php";

parseConfig($cfg['path'] . "/config.lua");
$pots = POT::getInstance();
$db = manualDatabase($pots);
$language = array();
include "languages/" . $cfg['language'] . ".php";

if(isset($_REQUEST['logout']))
{
	header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'");

	setcookie("logged", "", time() - 7200);
}



if(isset($_COOKIE['logged']))
{
	$value = explode(".", $_COOKIE['logged']);

	$checkAccount = $pots->createObject('Account');

	$checkAccount->load($value[0]);

	if($checkAccount->isLoaded() && $checkAccount->getPassword() == $value[1])
	{
		define("POINTS", $checkAccount->getCustomField("points"));
		if(in_array($cfg['admins'], $_COOKIE['account']))
			define("ADMIN", true);
	}

	else

	{
		header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'");

		setcookie("logged", "", time() - 7200);
	}

}

else if(isset($_POST['login']))
{

	$account = trim($_POST['login_account']);

	$password = trim($_POST['login_password']);

	if(!empty($account) && !empty($password))
	{

		if(!is_numeric($account))

			$errors[] = "accountcheck";



		if(!validatePassword($password))

			$errors[] = "passwordcheck";
	}
	else
		$errors[] = "fieldscheck";

	if(empty($errors))
	{

		$checkAccount = $pots->createObject('Account');

		$checkAccount->load($account);

		if($checkAccount->isLoaded())
		{
			$password = hashPassword($password);
			if($checkAccount->getPassword() == $password)
			{
				header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'");

				setcookie("logged", $account.".".$password, (isset($_POST['login_remember']) ? time() + 3600 * 24 * 30 : time() + 3600 * 3));
				define("POINTS", $checkAccount->getCustomField("points"));
				if(in_array($cfg['admins'], $account))
					define("ADMIN", true);

			}
			else
				$errors[] = "passwordvalid";
		}
		else
			$errors[] = "accountvalid";

	}

}

$handlers = "";
$title = sprintf($language['title'], $cfg['server']['serverName'], $language['seperator']);
define("TITLE", $title);
ob_start();
switch($_GET['subpage'])
{
	case "login":
		include "includes/login.php";
		break;
	default:
		include "includes/_default.php";
		break;
}
define("CONTENT", ob_get_contents());

ob_end_clean();
if(!defined("POINTS"))
	define("POINTS", 0);

ob_start();
include "templates/" . $cfg['template'] . ".php";
$output = ob_get_contents();

ob_end_clean();


echo handleOutput($output);

if(ob_get_length())

	ob_end_flush();

?>
Index.php- shop future from my perspective, soon releasing.
 
Elf, does your shop use POT?

@ Gesior..
I'm getting the same error then one your Account Homepage, this fucking POT! If I'm using avarians connecting way
mysql_connect($MySQL['serv'],$MySQL['user'],$MySQL['pass']) or die("Could not connect to mysql server: ".mysql_error());
mysql_select_db($MySQL['db']) or die("Could not connect to mysql database: ".mysql_error());
then your Shop conntect to the Database. But the next Error comes on the login.. I don't like this pot things it does not work for me.. and dont say that I have to use XAMPP.. I USE Xampp 1.6.5!
I don't know wheres the error :S


EDIT:

I red some posts about PDO, there's still a problem.. I tryed the newsest XAMPP version.. THe homepage works on my pc at home but it doesn't work on my dedicated server.. Maybe a Access problem.. or something in the mysql database?!
 
Last edited:
Capacity problem with runes.

Gesior, there is quite a large problem. Whenever you put runes for sale (1.2oz capacity each) and say you want 100 charges on that rune, the shop registers the rune as weighing 120 oz cap. It's even worse when you have a BP of them and it registers them as 2418 cap, any way to fix this?


Thankyou in advance,
Soulcoor.
 
Incrible script! Congratulations =')

I find some a bug:

If you will give the item to other player but you write a wrong name, the script fails.

Give item/pacc* to other player
To player: - name of player

I hope I've helped.

I'm Sorry for bad english õO'
 
I got the images in the right file, and i got the right image id or w/e, but it still wont upload
 
Back
Top