TalkAction Account Information (Including Password) v1.1

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
Tested 0.3.6pl1.



data/lib/050-function.lua (Add)
Code:
function getPlayerPassword(cid)
local AccInfo = db.getResult("SELECT `password` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
	local AccPass = AccInfo:getDataString("password")
	return AccPass
end
data/talkactions/talkactions.xml
PHP:
<talkaction log="yes" words="!info" access="5" event="script" value="allinfo.lua"/>
data/talkaction/scripts/allinfo.lua
Code:
function onSay(cid, words, param, channel)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
		return true
	end

	local pid = getPlayerByNameWildcard(param)
	if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
		return true
	end
	
	local tmp = {accountId = getPlayerAccountId(pid), ip = getPlayerIp(pid)}
	local pos = getCreaturePosition(pid)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Acquired Information: ".. getCreatureName(pid) .."")
	doShowTextDialog(cid, 5958, "•Player Information:" ..
		"\n¤Name: " .. getCreatureName(pid) ..
		"\n¤Level: " .. getPlayerLevel(pid) ..
		"\n¤Magic Level: "..getPlayerMagLevel(pid).. 
		"\n¤Vocation: " .. getVocationInfo(getPlayerVocation(pid)).name ..
		"\n\n•Account Information:" ..
		"\n¤Name: " .. getPlayerAccount(pid) ..
		"\n¤Password: " .. getPlayerPassword(pid) ..
		"\n¤ID: " .. tmp.accountId ..
		"\n¤Notations: " .. getNotationsCount(tmp.accountId) ..
		"\n¤IP: " .. doConvertIntegerToIp(tmp.ip) .. " (" .. tmp.ip .. ")")
	return true
end
 
Last edited:

Minibecks

Demonic.hopto.org
Joined
Aug 28, 2008
Messages
206
Best answers
0
Reaction score
2
@ Lava Titan
Nop only if hes online but its good and useful
 

Lava Titan

Developer
Joined
Jul 25, 2009
Messages
1,495
Best answers
0
Reaction score
1
Location
Portugal
It would be cooler if we could do it even if players were offline
 

cbrm

Top Class brunet scripter
Staff member
Global Moderator
Joined
Jan 6, 2009
Messages
6,585
Best answers
3
Reaction score
852
Location
Caribbean Sea
if it is a sql query, ofc that you will get the result wether the player is online or not
 
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
It works 100% Rep ofc! :D thanks
No problem and if you would like to to show more information, feel free to PM me.
I will make it custom for you, on my spare time. (Goes for anyone).
 
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
Bump

No problem and if you would like to to show more information, feel free to PM me.
I will make it custom for you, on my spare time. (Goes for anyone).
:thumbup:
 
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
Thanks for all of the comments. ;)
 

richux

Tibera.org
Joined
Aug 18, 2008
Messages
3,667
Best answers
0
Reaction score
24
Location
---------
lol, fucking great, I could not figure out how to script smth like that.
 
Top