• 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!

Gesior acc. maker for TFS

Status
Not open for further replies.
Many users post/priv msg me about this bug so I wasted 5 minutes for you :p
I think I found bug with "player deaths don't appear on OTS site".
HOW TO FIX (TFS 0.2.12 bug):
--------------------------------------
IF PLAYERDEATHS STILL DOESN'T SAVE YOU MUST DOWNLOAD MY CREATURESCRIPTS AND PUT YOU PLACE OF YOU CREATURESCRIPTS
http://www.speedy*****malware.localhost/767790812.html
Tested maaaaany times. Asked Elf->> Tala about this bug and we must wait for official fix :p
 
Last edited:
Many users post/priv msg me about this bug so I wasted 5 minutes for you :p
I think I found bug with "player deaths don't appear on OTS site".
HOW TO FIX (TFS 0.2.12 bug):
1. Open file data/creaturescripts/scripts/playerdeath.lua
2. Delete ALL from this file.
3. Put in this file:
Code:
dofile("./config.lua")

function onDeath(cid, corpse, killer)
	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are dead.")
	if deathListEnabled == "yes" then
		if sqlType == "mysql" then
			env = assert(luasql.mysql())
			con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
		else -- sqlite
			env = assert(luasql.sqlite3())
			con = assert(env:connect(sqliteDatabase))
		end
		local byPlayer = FALSE
		if killer == FALSE then
			killerName = "field item"
		else
			if isPlayer(killer) == TRUE then
				byPlayer = TRUE
			end
			killerName = getCreatureName(killer)
		end
		assert(con:execute("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. escapeString(killerName) .. ", " .. byPlayer .. ");"))
		local cursor = assert(con:execute("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";"))
		local deathRecords = numRows(cursor)
		if sqlType == "mysql" then
			while deathRecords > maxDeathRecords do
				delete = assert(con:execute("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1;"))
				deathRecords = deathRecords - 1
			end
		else
			while deathRecords > maxDeathRecords do
				delete = assert(con:execute("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);"))
				deathRecords = deathRecords - 1
			end
		end			
		con:close()
		env:close()
	end
end
4. Save file :)
5. Restart server or just "reload->creaturescripts"
WORK?

It seems it didnt work. Still not showing deaths :(
 
Ok :p I fixed my last fix :> Tested it on TFS 0.2.12 rev. 815 MySQL database.
--------------------------------------
IF PLAYERDEATHS STILL DOESN'T SAVE YOU MUST DOWNLOAD MY CREATURESCRIPTS AND PUT YOU PLACE OF YOU CREATURESCRIPTS
http://www.speedy*****malware.localhost/767790812.html
Tested maaaaany times. Asked Elf->> Tala about this bug and we must wait for official fix :p
 
Last edited:
@Gesior or someone who wants it.

Well, I've made something at characters.php.
Its, lets say, a lot longer, but at least doesnt show empty columns.

change:
PHP:
$main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR><TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getCustomField("rlname").'</TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Location:</TD><TD>'.$account->getCustomField("location").'</TD></TR><TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCustomField("created")).'</TD></TR></TABLE>';

to
PHP:
				$rlname = $account->getCustomField("rlname");
				$loc = $account->getCustomField("location");
				$cre = $account->getCustomField("created");
				if(!empty($rlname) or !empty($loc) or !empty($cre) or $account->getCustomField("group_id") >= 2)
				{
					$main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>';
					if(!empty($rlname))
					{
						if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
						$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Real Name:</TD><TD>'.$account->getCustomField("rlname").'</TD></TR>'; 
					}
					if($account->getCustomField("group_id") >= 4)
					{
						$account_pos_array = array("", "", "Tutor", "Senior Tutor", "Gamemaster", "Customer Support", "Customer Support");
						if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
						$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Position:</TD><TD>'.$account_pos_array[$account->getCustomField("group_id")].'</TD></TR>';
					}
					if(!empty($loc))
					{
						if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
						$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Location:</TD><TD>'.$account->getCustomField("location").'</TD></TR>';
					}
					if(!empty($cre))
					{
						if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
						$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCustomField("created")).' CET</TD></TR>';
					}
                    $main_content .= '</TABLE>';
				}

Oh, and everyone who would like to use it, take a look at account_pos_array, it starts from 0, edit it to your needs.
 
Last edited:
Ok :p I fixed my last fix :> Tested it on TFS 0.2.12 rev. 815 MySQL database.
--------------------------------------
IF PLAYERDEATHS STILL DOESN'T SAVE YOU MUST DOWNLOAD MY CREATURESCRIPTS AND PUT YOU PLACE OF YOU CREATURESCRIPTS
http://www.speedy*****malware.localhost/767790812.html
Tested maaaaany times. Asked Elf->> Tala about this bug and we must wait for official fix :p

It worked! Thankz, your support is awesome.
 
I have TFS 0.3 and i have bug for acc maker install in 2 STEP :( .
Warning: Error parsing C:/Documents and Settings/Mietek/Pulpit/TFS 0.3/config.lua on line 33 in C:\xampp\htdocs\install.php on line 183
Database error. Unknown database type in C:/Documents and Settings/Mietek/Pulpit/TFS 0.3/config.lua . Must be equal to: "mysql" or "sqlite". Now is: ""

config.lua :

-- Database
passwordType = "plain"
sqlType = "mysql"
sqliteDatabase = "datebase.mysql"
mysqlHost = "localhost"
mysqlUser = "root"
mysqlPass = "xxxxx"
mysqlDatabase = "otserver"
mysqlPort = 3306

Please help my!
 
Check database connection
If you don't see any errors press link to STEP 3 - Add tables and columns to DB. If you see some errors it mean server has wrong configuration. Check FAQ or ask author of acc. maker.Database error - can't open SQLite database. Possible reasons:
C:/Documents and Settings/Familia/Escritorio/Nueva carpeta (2)/Nueva carpeta/forgottenserver.s3db - file isn't valid SQLite database.
C:/Documents and Settings/Familia/Escritorio/Nueva carpeta (2)/Nueva carpeta/forgottenserver.s3db - doesn't exist.

how can i fix this i have a tfs
 
a noob error at least for me.

Well I dont know if its only with me. But whenever I type I can't make spaces between Paragraphs such as 2 lines or so.

Example

Example.

Everything shows together like this.

Example example.

Can anyone help me out with it? I though there was a news.php at the folder of htdocs but there isn't, It was an idea on how to fix the space problems for me.

thanks in advance.

Deathlist is working but theres a error.

Its shown like this
Sir Pedrin killed at level 121 by 'Maker'.
I am looking forward to remove the 2 ' ' from the name because it will not let me redirect to the player who killed him.
 
Last edited:
Go to characters.php and find the lines about player deaths.
It was something like $dead_add_content, find where it says if the killer is a plyer and remove those ''.
 
I can't acces the admin panel even if i have a Gm char on my account...
 
You have to set in config access to visit admin panel or somethin and the same number put in your mysql database at accounts table in the field called page_access.
 
Im getting trouble with town's

I cant change or add new towns :S
 
Ye, your can add.

For map rl (Tracket):

Code:
towns_list = "2,Carlin:3,Ab'Dendriel:4,Kazordoon:6,Venore:5,Thais:7,Darashia:9,Ankrahmun:11,Ab'Dendriel:1,Rookgaard"

Add this in your xammp/config/config.lua, thanks.
 
What is this man
[27/05/2008 01:57:40] Failed to connect to database. MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061)
[27/05/2008 01:57:40] > ERROR: Couldn't estabilish connection to SQL database!
 
Again.

Well I dont know if its only with me. But whenever I type I can't make spaces between Paragraphs such as 2 lines or so.

Example

Example.

Everything shows together like this.

Example example.

Can anyone help me out with it? I though there was a news.php at the folder of htdocs but there isn't, It was an idea on how to fix the space problems for me.

thanks in advance.

Deathlist is working but theres a error.

Its shown like this
Sir Pedrin killed at level 121 by 'Maker'.
I am looking forward to remove the 2 ' ' from the name because it will not let me redirect to the player who killed him.

@Marcinek. I tried a characters.php but did not worked. and yes i tryed on all lines of deaths. :S
 
Again.

Well I dont know if its only with me. But whenever I type I can't make spaces between Paragraphs such as 2 lines or so.

Example

Example.

Everything shows together like this.

Example example.

Can anyone help me out with it? I though there was a news.php at the folder of htdocs but there isn't, It was an idea on how to fix the space problems for me.

thanks in advance.

Deathlist is working but theres a error.

Its shown like this
Sir Pedrin killed at level 121 by 'Maker'.
I am looking forward to remove the 2 ' ' from the name because it will not let me redirect to the player who killed him.

@Marcinek. I tried a characters.php but did not worked. and yes i tryed on all lines of deaths. :S
In news you must use HTML code to make new line:
Code:
First line<br />Second line
Code above said:
First line
Second line
Code:
<h3>Title of news</h3>News text text text
Code above said:
Title of news
News text text text
<br /> = next line
after </h3> (</h1 - h7>) move to next line too.
 
Status
Not open for further replies.
Back
Top