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

Afs-cms

Status
Not open for further replies.
Create column `online` in `players` table and edit your Login and Logout.lua scripts to update that column...
 
login.lua:
Code:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	dofile("./config.lua")
	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
	if serverStarted == FALSE then
		assert(con:execute("UPDATE `players` SET `online` = 0;"))
		serverStarted = TRUE
	end 
	assert(con:execute("UPDATE `players` SET `online` = `online`+1 WHERE `id` = "..getPlayerGUID(cid)..";"))
	con:close()
	env:close()
	return TRUE
end

logout.lua:
Code:
function onLogout(cid)
	dofile("./config.lua")
	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
	assert(con:execute("UPDATE `players` SET `online` = `online`-1 WHERE id = "..getPlayerGUID(cid)..";"))
	con:close()
	env:close()
	return TRUE
end
 
Well, it's not sure that will use that solution in the next release, but I'm voting to make it optional to use it. Meaning you can disable it in config.lua.
 
Avarian do you need help with your AAC? So how I can help you :)

PS: I am standing 2 times in the Credits :p
 
Avarian do you need help with your AAC? So how I can help you :)

PS: I am standing 2 times in the Credits :p

Ye, sure.

Improve Account.php -> if banned show it, add complaint function, change comment.
Improve Info.php -> show players online, show 'online' at player info, show comment if !empty.
Improve Guild Making/Managing -> a lot to work.
 
go to phpmyadmin -> `players` and add field there.
 
Avarian do you need help with your AAC? So how I can help you :)

PS: I am standing 2 times in the Credits :p

I suppose another developer wouldn't hurt since Gesior is now working on his own project, but as for me i've basically put this in the back of my mind, i've got another project i've been working on..but lately i've been thinking about getting back into this.

I began working on v1.6 which has only a few security fixes and a few other features, but I might just do a complete re-write or switch over to POT..which would also require a complete re-write.

but ah.. just work on what ever you want and send it to me or post here :)

@ Sircurse - i'll test it out and if it works it'll probably be implemented, good work :)
 
Last edited:
@Avarian, yea it works good, I tested here.

@Ronaldino, how I told, this system will work with the last revision of the TFS, but u can edit ur database, login.lua and logout.lua to see it working.

Just make that Marcinek Paladinek told.

@Marcinek Paladinek, check old replys, I've made a system to show if players has banned, and fix the guild membership to show his currently guild too.
I gonna improve it more, maybe Avarian like it, hope so =)
 
Last edited:
Code:
Sorry, your rank in the guild is not high enough.
Wtf?? why i can't need manage gulild ???

Sorry for my English
 
@Avarian, yea it works good, I tested here.

@Marcinek Paladinek, check old replys, I've made a system to show if players has banned, and fix the guild membership to show his currently guild too.
I gonna improve it more, maybe Avarian like it, hope so =)

Yes, this banishment system I've made too, but it is showing if hes banned on Player Info page, not on account page ^^
I can make it myself, but Im currently playing Trickster xd

Ronaldino,

The add field option is in the structure then go down after all fields you will see option, something like "Add one field after x "
 
@Avarian, yea it works good, I tested here.

@Ronaldino, how I told, this system will work with the last revision of the TFS, but u can edit ur database, login.lua and logout.lua to see it working.

Just make that Marcinek Paladinek told.

@Marcinek Paladinek, check old replys, I've made a system to show if players has banned, and fix the guild membership to show his currently guild too.
I gonna improve it more, maybe Avarian like it, hope so =)

Didn't I add that already? I know two people submitted different ones and I chose the one I liked best..maybe I implemented it in v1.6..aff I dont remember i've been awake waaay to long o_o
 
@Marcinek Paladinek, I gonna get free time this weekend, so I can make the banned status on account page too, then I post here to Avarian.
 
sircurse - one more problem with your script... when I look at online list there are player whos are not online atm. and when players online is 10 there are like 20 players online. >.< How can I fix that?
 
AAC Info:
If your using XAMPP then the AAC is protected from SQL-Injections, if your not then it isn't. (I'm working on making it safe either way.)

Update Info:
v1.6 is almost complete and contains many new features (as it stands about 22 changes)
I'll release it with in 1-3 days. :)

--As stated above the aac should be fine if your using XAMMP if your not then it is open to SQL-Injections. However in v1.6 I have begun making changes to make it safe no matter what.
 
Status
Not open for further replies.
Back
Top