• 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 Account Information (Including Password) v1.1

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Solutions
2
Reaction score
115
Tested 0.3.6pl1.

allcm.png


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:
if it is a sql query, ofc that you will get the result wether the player is online or not
 
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).
 
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:
 
Thanks for all of the comments. ;)
 
Back
Top