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

Please Help!

otnoobs

New Member
Joined
Jan 23, 2011
Messages
13
Reaction score
0
Ok so i got this script to do ,!info

Code:
function getPlayerResets 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:" ..
		"\nName: " .. getCreatureName(pid) ..
		"\nLevel: " .. getPlayerLevel(pid) ..
		"\nPrestige: "..getPlayerResets(pid)..
		"\nMagic Level: "..getPlayerMagLevel(pid).. 
		"\nVocation: " .. getVocationInfo(getPlayerVocation(pid)).name .. "")
	return true
end

and my onLook thingy.

Code:
function getPlayerReset(cid) 
        local name = getCreatureName(cid) 
        local Query = db.getResult("SELECT `resets` FROM `players` WHERE `name` = '"..name.."';") 
        return Query:getDataInt("resets") 
end

Please Help im useing TFS Crying Damson 8.54
 
Lua:
local function getPlayerResets(cid)
	local q, r = db.getResult('SELECT resets FROM players WHERE id=' .. getPlayerGUID(cid))
	if q:getID() ~= -1 then
		r = q:getDataInt('resets')
		q:free()
	end
	return r
end

function onSay(cid, words, param, channel)
	if not param or param == '' then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Command param required.')
	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 n = getCreatureName(pid)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Acquired Information: '.. n)
	doShowTextDialog(cid, 5958, '•Player Information:' ..
		'\nName: ' .. n ..
		'\nLevel: ' .. getPlayerLevel(pid) ..
		'\nPrestige: '..getPlayerResets(pid)..
		'\nMagic Level: '..getPlayerMagLevel(pid)..
		'\nVocation: ' .. getVocationInfo(getPlayerVocation(pid)).name .. '')
	return true
end
 
Last edited:
[09/03/2011 15:50:48] [Error - TalkAction Interface]
[09/03/2011 15:50:48] data/talkactions/scripts/info.lua:eek:nSay
[09/03/2011 15:50:48] Description:
[09/03/2011 15:50:48] data/talkactions/scripts/info.lua:26: attempt to call global 'getPlayerResets' (a nil value)
[09/03/2011 15:50:48] stack traceback:
[09/03/2011 15:50:48] data/talkactions/scripts/info.lua:26: in function <data/talkactions/scripts/info.lua:10>


Im getting this error! :(
 
•Player Information: Name: Jake Level: 8 Prestige: 0 Magic Level: 0 Vocation: Sorcerer 15:58 You see Jake (Level 8). He is a Sorcerer. [7 Prestiges].


It works, its just not giving the right amount? :eek:
 
Back
Top