function getPlayerReset(cid)
local name = getCreatureName(cid)
local Query = db.getResult("SELECT `resets` FROM `players` WHERE `name` = '"..name.."';")
return Query:getDataInt("resets")
end
function onLook(cid, thing, position, lookDistance)
if(not isPlayer(thing.uid)) then
return true
end
if getPlayerGroupId(cid) >= 4 then
doPlayerSendTextMessage(cid,22,"HP: " .. getCreatureHealth(thing.uid) .. "/".. getCreatureMaxHealth(thing.uid) .." MP: " .. getCreatureMana(thing.uid) .. "/".. getCreatureMaxMana(thing.uid) .."\n IP: ".. getPlayerIp(thing.uid) ..".")
end
local name = getCreatureName(thing.uid)
local level = getPlayerLevel(thing.uid)
local sex = getPlayerSex(thing.uid)
local vocation = getPlayerVocationName(thing.uid)
local resets = getPlayerReset(thing.uid)
local gmsg = ""
if sex==0 then sex="She" else sex="He" end
local msg = "You see "..name.." (Level "..level.."). "..sex.." is a "..vocation..". [Rebirths: "..resets.."]"
if getPlayerGuildId(thing.uid) > 0 then
local gname = getPlayerGuildName(thing.uid)
local grank = getPlayerGuildRank(thing.uid)
local gnick = getPlayerGuildNick(thing.uid)
gmsg = " "..sex.." is "..grank.." of the "..gname.." ("..gnick..")."
end
local echo = msg .. gmsg
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, echo)
return false
end