• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved reset look

xLosT

Member
Joined
Jan 11, 2010
Messages
1,021
Reaction score
13
Location
Brasil, Rio Grande do Sul
if the player has 0 resets is not shown, wanted to show even with 0

PHP:
function onLook(cid, thing, position, lookDistance)
	if(isPlayer(thing.uid) and thing.uid ~= cid and getCreatureStorage(thing.uid, 85987) ~= -1) then
		doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has prestiged " .. getCreatureStorage(thing.uid, 85987) .. " " .. (getCreatureStorage(thing.uid, 85987) == 1 and "time" or "times"))
	elseif(thing.uid == cid and getCreatureStorage(cid, 85987) ~= -1) then
		local message = "You see yourself."
		if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then
			message = message .. " You are " .. getPlayerGroupName(cid) .. "."
		elseif(getPlayerVocation(cid) ~= 0) then
			message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "."
		else
			message = message .. " You have no vocation."
		end
 
		if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then
			message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "."
		end
 
		if(getPlayerGuildId(cid) > 0) then
			message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid)
			message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "."
		end
 
		if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then
			message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]."
			message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "."
		end
 
		if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
			message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
		end
 
		return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. getCreatureStorage(cid, 85987) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times."))
	end
 
	return true
end

bump

bump
 
Last edited by a moderator:
Try
LUA:
function onLook(cid, thing, position, lookDistance) 
    if(isPlayer(thing.uid) and thing.uid ~= cid then 
        doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has prestiged " .. (getCreatureStorage(thing.uid, 85987) == -1 and "0" or getCreatureStorage(thing.uid, 85987)) .. " " .. (math.abs(getCreatureStorage(thing.uid, 85987)) == 1 and "time" or "times")) 
    elseif(thing.uid == cid then 
        local message = "You see yourself." 
        if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then 
            message = message .. " You are " .. getPlayerGroupName(cid) .. "." 
        elseif(getPlayerVocation(cid) ~= 0) then 
            message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "." 
        else 
            message = message .. " You have no vocation." 
        end 
  
        if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then 
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "." 
        end 
  
        if(getPlayerGuildId(cid) > 0) then 
            message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid) 
            message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "." 
        end 
  
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then 
            message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]." 
            message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "." 
        end 
  
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then 
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]." 
        end 
  
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. (getCreatureStorage(cid, 85987) == -1 and "0" or getCreatureStorage(cid, 85987)) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times.")) 
    end 
  
    return true 
end
 
ok i already paste it but look :S
[Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/rebirthdescription.lua:2: ')' expected near 'then'
[07/11/2012 16:40:29] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/rebirthdescription.lua)
[07/11/2012 16:40:29] data/creaturescripts/scripts/rebirthdescription.lua:2: ')' expected near 'then'
 
Repaired the error for you.

LUA:
function onLook(cid, thing, position, lookDistance) 
    if isPlayer(thing.uid) and thing.uid ~= cid then 
        doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has prestiged " .. (getCreatureStorage(thing.uid, 85987) == -1 and "0" or getCreatureStorage(thing.uid, 85987)) .. " " .. (math.abs(getCreatureStorage(thing.uid, 85987)) == 1 and "time" or "times")) 
    elseif thing.uid == cid then 
        local message = "You see yourself." 
        if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then 
            message = message .. " You are " .. getPlayerGroupName(cid) .. "." 
        elseif(getPlayerVocation(cid) ~= 0) then 
            message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "." 
        else 
            message = message .. " You have no vocation." 
        end 
 
        if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then 
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "." 
        end 
 
        if(getPlayerGuildId(cid) > 0) then 
            message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid) 
            message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then 
            message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]." 
            message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then 
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]." 
        end 
 
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. (getCreatureStorage(cid, 85987) == -1 and "0" or getCreatureStorage(cid, 85987)) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times.")) 
    end 
 
    return true 
end
 
>.< this is what i have:
registerCreatureEvent(cid, "RebirthDescription")

that is in login lua

- - - Updated - - -

now the auto look is working, i can see how many prestiges i am, but how can i see the other people's prestige D:

- - - Updated - - -

plz help :( i only can see my prestige, i can't see the other people's prestige =(!!!

- - - Updated - - -

D:?
 
Try
LUA:
function onLook(cid, thing, position, lookDistance) 
    if isPlayer(thing.uid) and thing.uid ~= cid then 
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has prestiged " .. (getCreatureStorage(thing.uid, 85987) == -1 and "0" or getCreatureStorage(thing.uid, 85987)) .. " " .. (math.abs(getCreatureStorage(thing.uid, 85987)) == 1 and "time." or "times."))
		return false
    elseif thing.uid == cid then 
        local message = "You see yourself." 
        if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then 
            message = message .. " You are " .. getPlayerGroupName(cid) .. "." 
        elseif(getPlayerVocation(cid) ~= 0) then 
            message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "." 
        else 
            message = message .. " You have no vocation." 
        end 
 
        if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then 
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "." 
        end 
 
        if(getPlayerGuildId(cid) > 0) then 
            message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid) 
            message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then 
            message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]." 
            message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then 
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]." 
        end 
 
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. (getCreatureStorage(cid, 85987) == -1 and "0" or getCreatureStorage(cid, 85987)) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times.")) 
    end 
 
    return true 
end
 
it works! but i only see his prestige, nothing else like his lvl or his guild :S

- - - Updated - - -

neither his vocation >:<
 
Ok man i wait you :D

- - - Updated - - -

sorry i need to add this:
11:43 You see yourself. You are a royal paladin.
You have prestiged 1 time.
and..
11:44 .
He has prestiged 5 times.

so the third person look is wrong >.<

- - - Updated - - -

man? :S
 
LUA:
function onLook(cid, thing, position, lookDistance) 
    if isPlayer(thing.uid) and thing.uid ~= cid then
		local sex = getPlayerSex(thing.uid)
        local message = "You see " .. getPlayerName(thing.uid) .. "." 
        if(getPlayerFlagValue(thing.uid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is a " .. getPlayerGroupName(thing.uid) .. "." 
        elseif(getPlayerVocation(thing.uid) ~= 0) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is a " .. getPlayerVocationName(thing.uid):lower() .. "." 
        else 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " has no vocation." 
        end 
 
        if(getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) ~= nil) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is " .. (sex == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(thing.uid)) .. "." 
        end 
 
        if(getPlayerGuildId(thing.uid) > 0) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is " .. (getPlayerGuildRank(thing.uid) == "" and "a member" or getPlayerGuildRank(thing.uid)) .. " of the " .. getPlayerGuildName(thing.uid) 
            message = getPlayerGuildNick(thing.uid) ~= "" and message .. " (" .. getPlayerGuildNick(thing.uid) .. ")." or message .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then 
            message = message .. "\nHealth: [" .. getCreatureHealth(thing.uid) .. " / " .. getCreatureMaxHealth(thing.uid) .. "], Mana: [" .. getCreatureMana(thing.uid) .. " / " .. getCreatureMaxMana(thing.uid) .. "]." 
            message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(thing.uid)) .. ", Client: " .. getClientVersion(thing.uid) .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then 
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]." 
        end 
 
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. (sex == PLAYERSEX_FEMALE and " \nShe" or ".\nHe") .. " has prestiged " .. (getCreatureStorage(thing.uid, 85987) == -1 and "0" or getCreatureStorage(thing.uid, 85987)) .. " " .. (math.abs(getCreatureStorage(thing.uid, 85987)) == 1 and "time." or "times."))
		return false
    elseif thing.uid == cid then 
        local message = "You see yourself." 
        if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then 
            message = message .. " You are " .. getPlayerGroupName(cid) .. "." 
        elseif(getPlayerVocation(cid) ~= 0) then 
            message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "." 
        else 
            message = message .. " You have no vocation." 
        end 
 
        if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then 
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "." 
        end 
 
        if(getPlayerGuildId(cid) > 0) then 
            message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid) 
            message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then 
            message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]." 
            message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then 
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]." 
        end 
 
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. (getCreatureStorage(cid, 85987) == -1 and "0" or getCreatureStorage(cid, 85987)) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times.")) 
    end 
 
    return true 
end

Tagged as solved too.
 
sorry man is only one thing missing that i just saw, when u use look on someone you cannot see his lvl D:

- - - Updated - - -

sorry man is only one thing missing that i just saw, when u use look on someone you cannot see his lvl D:
17:51 You see Master'pk. He is a knight..
He has prestiged 0 time.
 
LUA:
function onLook(cid, thing, position, lookDistance) 
    if isPlayer(thing.uid) and thing.uid ~= cid then
		local sex = getPlayerSex(thing.uid)
        local message = "You see " .. getPlayerName(thing.uid) .. " (Level " .. getPlayerLevel(thing.uid) .. ")." 
        if(getPlayerFlagValue(thing.uid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is a " .. getPlayerGroupName(thing.uid) .. "." 
        elseif(getPlayerVocation(thing.uid) ~= 0) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is a " .. getPlayerVocationName(thing.uid):lower() .. "." 
        else 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " has no vocation." 
        end 
 
        if(getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) ~= nil) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is " .. (sex == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(thing.uid)) .. "." 
        end 
 
        if(getPlayerGuildId(thing.uid) > 0) then 
            message = message .. " " .. (sex == PLAYERSEX_FEMALE and "She" or "He") .. " is " .. (getPlayerGuildRank(thing.uid) == "" and "a member" or getPlayerGuildRank(thing.uid)) .. " of the " .. getPlayerGuildName(thing.uid) 
            message = getPlayerGuildNick(thing.uid) ~= "" and message .. " (" .. getPlayerGuildNick(thing.uid) .. ")." or message .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then 
            message = message .. "\nHealth: [" .. getCreatureHealth(thing.uid) .. " / " .. getCreatureMaxHealth(thing.uid) .. "], Mana: [" .. getCreatureMana(thing.uid) .. " / " .. getCreatureMaxMana(thing.uid) .. "]." 
            message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(thing.uid)) .. ", Client: " .. getClientVersion(thing.uid) .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then 
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]." 
        end 
 
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. (sex == PLAYERSEX_FEMALE and " \nShe" or " \nHe") .. " has prestiged " .. (getCreatureStorage(thing.uid, 85987) == -1 and "0" or getCreatureStorage(thing.uid, 85987)) .. " " .. (math.abs(getCreatureStorage(thing.uid, 85987)) == 1 and "time." or "times."))
		return false
    elseif thing.uid == cid then 
        local message = "You see yourself." 
        if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then 
            message = message .. " You are " .. getPlayerGroupName(cid) .. "." 
        elseif(getPlayerVocation(cid) ~= 0) then 
            message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "." 
        else 
            message = message .. " You have no vocation." 
        end 
 
        if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then 
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "." 
        end 
 
        if(getPlayerGuildId(cid) > 0) then 
            message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid) 
            message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then 
            message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]." 
            message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "." 
        end 
 
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then 
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]." 
        end 
 
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. (getCreatureStorage(cid, 85987) == -1 and "0" or getCreatureStorage(cid, 85987)) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times.")) 
    end 
 
    return true 
end
 
Back
Top