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

TalkAction [TFS 0.2.5] Ingame Highscores

Please , Can someone Give me a Page There i Can download 8.1 Realmap Ot , and a Ot Work 100% , Please Some Info =/
 
Wow i test it on my server (v0.2.11) and it work!! but i still have a small error when i use !ranks...

[13/04/2008 09:44:48] Lua Script Error: [TalkAction Interface]
[13/04/2008 09:44:48] data/talkactions/scripts/highscores.lua:eek:nSay

[13/04/2008 09:44:48] data/talkactions/scripts/highscores.lua:158: LuaSQL: there are open cursors


How may i fix it??


-- edit --

I have another error when i log some character

[13/04/2008 09:54:36] ADM Nesaj has logged out.
[13/04/2008 09:54:36] SQLITE ERROR sqlite_exec: UPDATE `players` SET `online` = 0 WHERE `id` = 2 database is locked
[13/04/2008 09:54:36] SQLITE ERROR sqlite_exec: COMMIT; database is locked
[13/04/2008 09:54:36] SQLITE ERROR sqlite_exec: BEGIN; cannot start a transaction within a transaction
[13/04/2008 09:54:36] SQLITE ERROR sqlite_exec: BEGIN; cannot start a transaction within a transaction
[13/04/2008 09:54:36] Error while saving player: ADM Nesaj
 
Last edited:
dude i added it and will add credits to you on the highscores (if its possible, and when i work out how) Thx Good job!
 
You can shorten this script down quite alot! Do it!

I luff it xD
 
I got an error but that's because of TFS 0.3 trunk.
But I though I could post it here...
I get an error in the console that luasql = nil
I saw that in database.lua there are some functions for the database, but do I have to overwrite all the parts of the script that it works, or is there an easyer way so I can use this
Code:
env = assert(luasql.mysql())
con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
:confused:
 
Sorry for bumping this post, but does anyone knows how to make this work on TFS 0.3?
I couldn't make it work:
(part of the code, I don't think the whole code is needed, just the part that gets the data from the database)
PHP:
if param == "level" or param == "exp" or param == "lvl" then
		local topPlayers = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` <= "..maxgroupid.." ORDER BY `experience` DESC LIMIT 0,"..players..";")
		str = "# [Level] - Name - (Experience)\n"
		local i = 0
		local level = topPlayers:getDataInt(level)
		local name = topPlayers:getDataString(name)
		local experience = topPlayers:getDataInt(experience)
		while(true) do
			str = str.."\n#"..(i+1).." ["..level.."] - "..name.." - ("..experience..")"
			i = i+1
			if not(topPlayers:next()) then
					break
			end
		end
		topPlayers:free()

I get these errors:
[17/11/2008 12:56:10] Error during getDataInt().
[17/11/2008 12:56:10] Error during getDataString().
[17/11/2008 12:56:10] Error during getDataInt().
 
Not neccesary, TFS allready got a version of in-game highscores.

Add to actions.xml: [if you don't got it already by default]
Code:
	<!-- Highscore Book -->
	<action itemid="1981" function="highscoreBook"/>

Club Fighting in-game highscore book.
ItemID: [1981].
ActionID: [151].
UniqueID: [4861].


Keep using item id 1981,

action id: 151 - 158 and it will show diffrent skills. (club, sword, axe, fishing, fist, magic, level, distance)

Add unique id and it will be stuck to the ground or at that place its suppose to belong to stick to.
 
Sorry for bumping this post, but does anyone knows how to make this work on TFS 0.3?
I couldn't make it work:
(part of the code, I don't think the whole code is needed, just the part that gets the data from the database)
PHP:
if param == "level" or param == "exp" or param == "lvl" then
		local topPlayers = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` <= "..maxgroupid.." ORDER BY `experience` DESC LIMIT 0,"..players..";")
		str = "# [Level] - Name - (Experience)\n"
		local i = 0
		local level = topPlayers:getDataInt(level)
		local name = topPlayers:getDataString(name)
		local experience = topPlayers:getDataInt(experience)
		while(true) do
			str = str.."\n#"..(i+1).." ["..level.."] - "..name.." - ("..experience..")"
			i = i+1
			if not(topPlayers:next()) then
					break
			end
		end
		topPlayers:free()

I get these errors:

0.3 functions are:
Code:
result.getDataInt(resId, s)
result.getDataLong(resId, s)
result.getDataString(resId, s)
result.getDataStream(resId, s, length)
result.next(resId)
result.free(resId)
 
0.3 functions are:
Code:
result.getDataInt(resId, s)
result.getDataLong(resId, s)
result.getDataString(resId, s)
result.getDataStream(resId, s, length)
result.next(resId)
result.free(resId)

They are the same, look at classes/database.lua

And I also based my script on the deathlist command, I basically just changed queries and variables.
 
i have downloaded the version 0.3, but i got this error

Lua script error: [TalkAction Interface]
data/talkactions/scripts/highscores.lua:eek:nSay

data/talkactions/scripts/highscores.lua:7: attempt to index global 'luasql' < a nil value >
stack traceback:
data/talkactions/scripts/highscores.lua:7: in function <data/talkactions/scripts/highscores.lua:1>
 
Script isnt working at tfs 0.3

I added it as
result.getDataInt(resId, s)
result.getDataLong(resId, s)
result.getDataString(resId, s)
result.getDataStream(resId, s, length)
result.next(resId)
result.free(resId)

But isnt working... someone could post a one working?
 
Doesn't work, I tried to fix it, but I can't.
If anyone have the script for 0.3 I will be happy. :p
 
Back
Top