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

Solved [CreatureScripts] Need a little Help. Please

RosOT

Who am i?
Joined
Feb 12, 2013
Messages
714
Reaction score
137
Location
Canada
Well, i Wanted to make my Rebirth/prestige script what ever you guys wana call it tell you if you had Legend aswell. I made it there are no error's just the fact that when you look at someone nothing happends no errors or crashs.

Here is my Version of the script.
Code:
function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerPrestige(thing.uid) ~= -1 and getPlayerLPrestiges(thing.uid) ~= -1) then
        doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestiges" or "Prestige") "and has" .. getPlayerLPrestiges(thing.uid) .. " " .. (getPlayerLPrestiges(thing.uid) == 1 and "Legends" or "Legend."))
    elseif(thing.uid == cid and getPlayerPrestige(cid) ~= -1 and getPlayerLPrestiges(cid) ~= -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(getPlayerByName(getPlayerPartner(cid), false, false) ~= nil) then
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerByName(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)) .. "."
        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 " .. getPlayerPrestige(cid) .. " " .. (getPlayerPrestige(cid) == 1 and "Prestiges." or "Prestige") "and you have " .. getPlayerLPrestiges(cid) .. " " .. (getPlayerLPrestiges(cid) == 1 and "Legends." or "Legend."))
    end
    return true
end

My Legend Prestige Function.
Code:
 -- Legend Prestige --
function getPlayerLPrestiges(cid)
    local Info = db.getResult("SELECT `LPrestiges` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
        if Info:getID() ~= LUA_ERROR then
        local Lpres= Info:getDataInt("LPrestiges")
        Info:free()
        return Lpres
    end
    return LUA_ERROR
end

This is the Original script i had gotten from a fellow otlander.
http://otland.net/threads/best-rebirth-system-mysql-by-mlody-1039-with-gesior-script.186274/
 
Last edited:
I did everything right except adding legend prestige to the lua... i know howto register scripts fine.
Okay if you're asking for help, and the answer to my question isn't already answered then is there a reason for you to be a prick? No there is not.

ANYWAYS, so from the script I see, that the script says there should only be a description when the player has legend prestige. because the script is looking for both. I take it you want it to show legend and normal when you have legend, and just show normal when you have normal. So lets try this.
One of these two should work.
Code:
function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerPrestige(thing.uid) ~= -1) then
        if(getPlayerLPrestiges(thing.uid) ~= -1) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestiges" or "Prestige") "and has" .. getPlayerLPrestiges(thing.uid) .. " " .. (getPlayerLPrestiges(thing.uid) == 1 and "Legends" or "Legend") ".")
        else
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestiges" or "Prestige") ".")
        end
    elseif(thing.uid == cid and getPlayerPrestige(cid) ~= -1) then
        local message = "You see yourself."
        local Lmessage = ""
        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(getPlayerByName(getPlayerPartner(cid), false, false) ~= nil) then
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerByName(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)) .. "."
        end
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
        end
        if(getPlayerLPrestiges(cid) ~= -1) then
            Lmessage = "and you have " .. getPlayerLPrestiges(cid) .. " " .. (getPlayerLPrestiges(cid) == 1 and "Legends" or "Legend") "."
        else
            Lmessage = "."
        end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have " .. getPlayerPrestige(cid) .. " " .. (getPlayerPrestige(cid) == 1 and "Prestiges" or "Prestige") Lmessage)
    end
    return true
end
That or
This
Code:
function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerPrestige(thing.uid) ~= -1) then
        if(getPlayerLPrestiges(thing.uid) ~= -1) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestiges" or "Prestige") "and has" .. getPlayerLPrestiges(thing.uid) .. " " .. (getPlayerLPrestiges(thing.uid) == 1 and "Legends." or "Legend."))
        else
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestiges." or "Prestige."))
        end
    elseif(thing.uid == cid and getPlayerPrestige(cid) ~= -1) then
        local message = "You see yourself."
        local Lmessage = ""
        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(getPlayerByName(getPlayerPartner(cid), false, false) ~= nil) then
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerByName(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)) .. "."
        end
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
        end
        if(getPlayerLPrestiges(cid) ~= -1) then
            Lmessage = "and you have " .. getPlayerLPrestiges(cid) .. " " .. (getPlayerLPrestiges(cid) == 1 and "Legends." or "Legend.")
        else
            Lmessage = "."
        end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have " .. getPlayerPrestige(cid) .. " " .. (getPlayerPrestige(cid) == 1 and "Prestiges" or "Prestige") .. Lmessage)
    end
    return true
end
 
Last edited:
Neither of them work :| says Lmessage on line 37 and thats it

I remove lmessage from line 37 and it says
4: attempt to call a string value
 
Last edited:
Ok you got it working for when i look at myself "You have 10 Prestiges and you have 1 Legend Prestige."
But when i look at someone else is does nothing and i get this error
"4: attempt to call a string value"
 
Ok you got it working for when i look at myself "You have 10 Prestiges and you have 1 Legend Prestige."
But when i look at someone else is does nothing and i get this error
"4: attempt to call a string value"
What is the whole error?
 
2u4u8ft.png
 
the only things I see being called that that could be are this part of that line, so if you try removing the line and testing and works, then one of these functions being called is returning a string and the other one is returning a number and they are trying to compare.

Code:
(getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") ..
 
[NOTE: No Errors]
Ok so here is what i got i edited it some to make it work but.

21:10 You see yourself. You are god.
Health: [250 / 250], Mana: [100 / 100].
Position: [X: 1039] [Y: 1022] [Z: 4].
You have 10 Prestiges
You have 1 Legend Prestige.

[this guy has 0 of each]
21:10 You see Testy (Level 33). He is a Archer.
He has 0 Legend Prestige.
Health: [470 / 470], Mana: [480 / 480].
Position: [X: 1034] [Y: 1019] [Z: 4].

[Should be like this if he has no legends]
21:10 You see Testy (Level 33). He is a Archer.
He has 0 Prestige.
Health: [470 / 470], Mana: [480 / 480].
Position: [X: 1034] [Y: 1019] [Z: 4].

[Should be like this if he has 1 legends]
21:10 You see Testy (Level 33). He is a Archer.
He has 0 Prestige.
He has 1 Legend Prestige.
Health: [470 / 470], Mana: [480 / 480].
Position: [X: 1034] [Y: 1019] [Z: 4].

[This is the God hes 10 Prestiges 1 Legend]
21:11 You see Justin. He is god.
He has 1 Legend Prestige.


Code:
function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerPrestige(thing.uid) ~= -1) then
        if(getPlayerLPrestiges(thing.uid) ~= -1) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerLPrestiges(thing.uid) .. " " .. (getPlayerLPrestiges(thing.uid) == 1 and "Legend Prestiges" or "Legend Prestige"))
        else
            doPlayerSetSpecialDescription(thing.uid, " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestige." or "Prestiges."))
        end
    elseif(thing.uid == cid and getPlayerPrestige(cid) ~= -1) then
        local message = "You see yourself."
        local Lmessage = ""
        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(getPlayerByName(getPlayerPartner(cid), false, false) ~= nil) then
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerByName(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)) .. "."
        end
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
        end
        if(getPlayerLPrestiges(cid) > 0) then
            Lmessage = "\nYou have " .. getPlayerLPrestiges(cid) .. " " .. (getPlayerLPrestiges(cid) == 1 and "Legend Prestige." or "Legend Prestiges.")
        else
            Lmessage = "."
        end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have " .. getPlayerPrestige(cid) .. " " .. (getPlayerPrestige(cid) == 1 and "Prestige" or "Prestiges") .. Lmessage)
    end
    return true
end
 
[NOTE: No Errors]
Ok so here is what i got i edited it some to make it work but.

21:10 You see yourself. You are god.
Health: [250 / 250], Mana: [100 / 100].
Position: [X: 1039] [Y: 1022] [Z: 4].
You have 10 Prestiges
You have 1 Legend Prestige.

[this guy has 0 of each]
21:10 You see Testy (Level 33). He is a Archer.
He has 0 Legend Prestige.
Health: [470 / 470], Mana: [480 / 480].
Position: [X: 1034] [Y: 1019] [Z: 4].

[Should be like this if he has no legends]
21:10 You see Testy (Level 33). He is a Archer.
He has 0 Prestige.
Health: [470 / 470], Mana: [480 / 480].
Position: [X: 1034] [Y: 1019] [Z: 4].

[Should be like this if he has 1 legends]
21:10 You see Testy (Level 33). He is a Archer.
He has 0 Prestige.
He has 1 Legend Prestige.
Health: [470 / 470], Mana: [480 / 480].
Position: [X: 1034] [Y: 1019] [Z: 4].

[This is the God hes 10 Prestiges 1 Legend]
21:11 You see Justin. He is god.
He has 1 Legend Prestige.


Code:
function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerPrestige(thing.uid) ~= -1) then
        if(getPlayerLPrestiges(thing.uid) ~= -1) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerLPrestiges(thing.uid) .. " " .. (getPlayerLPrestiges(thing.uid) == 1 and "Legend Prestiges" or "Legend Prestige"))
        else
            doPlayerSetSpecialDescription(thing.uid, " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestige." or "Prestiges."))
        end
    elseif(thing.uid == cid and getPlayerPrestige(cid) ~= -1) then
        local message = "You see yourself."
        local Lmessage = ""
        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(getPlayerByName(getPlayerPartner(cid), false, false) ~= nil) then
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerByName(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)) .. "."
        end
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
        end
        if(getPlayerLPrestiges(cid) > 0) then
            Lmessage = "\nYou have " .. getPlayerLPrestiges(cid) .. " " .. (getPlayerLPrestiges(cid) == 1 and "Legend Prestige." or "Legend Prestiges.")
        else
            Lmessage = "."
        end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have " .. getPlayerPrestige(cid) .. " " .. (getPlayerPrestige(cid) == 1 and "Prestige" or "Prestiges") .. Lmessage)
    end
    return true
end

Lets try this
Code:
function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerPrestige(thing.uid) ~= -1) then
        if(getPlayerLPrestiges(thing.uid) > 0) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerLPrestiges(thing.uid) .. " " .. (getPlayerLPrestiges(thing.uid) == 1 and "Legend Prestiges" or "Legend Prestige"))
        else
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestige." or "Prestiges."))
        end
    elseif(thing.uid == cid and getPlayerPrestige(cid) ~= -1) then
        local message = "You see yourself."
        local Lmessage = ""
        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(getPlayerByName(getPlayerPartner(cid), false, false) ~= nil) then
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerByName(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)) .. "."
        end
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
        end
        if(getPlayerLPrestiges(cid) > 0) then
            Lmessage = "\nYou have " .. getPlayerLPrestiges(cid) .. " " .. (getPlayerLPrestiges(cid) == 1 and "Legend Prestige." or "Legend Prestiges.")
        else
            Lmessage = "."
        end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have " .. getPlayerPrestige(cid) .. " " .. (getPlayerPrestige(cid) == 1 and "Prestige" or "Prestiges") .. Lmessage)
    end
    return true
end
 
22:20 You see Justin. He is god.
He has 1 Legend Prestiges.

22:21 You see Testy (Level 33). He is a Archer.
He has 0 Prestiges..

it is working like it should but i need it to show prestige and legend when you look at someone if they have 1 legend
 
22:20 You see Justin. He is god.
He has 1 Legend Prestiges.

22:21 You see Testy (Level 33). He is a Archer.
He has 0 Prestiges..

it is working like it should but i need it to show prestige and legend when you look at someone if they have 1 legend

Easy fix, you removed something from line you shouldn't have.
try this
Code:
function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerPrestige(thing.uid) ~= -1) then
        if(getPlayerLPrestiges(thing.uid) > 0) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestige." or "Prestiges.") .. " and " .. getPlayerLPrestiges(thing.uid) .. " " .. (getPlayerLPrestiges(thing.uid) == 1 and "Legend Prestiges." or "Legend Prestige."))
        else
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has " .. getPlayerPrestige(thing.uid) .. " " .. (getPlayerPrestige(thing.uid) == 1 and "Prestige." or "Prestiges."))
        end
    elseif(thing.uid == cid and getPlayerPrestige(cid) ~= -1) then
        local message = "You see yourself."
        local Lmessage = ""
        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(getPlayerByName(getPlayerPartner(cid), false, false) ~= nil) then
            message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerByName(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)) .. "."
        end
        if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
            message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
        end
        if(getPlayerLPrestiges(cid) > 0) then
            Lmessage = "\nYou have " .. getPlayerLPrestiges(cid) .. " " .. (getPlayerLPrestiges(cid) == 1 and "Legend Prestige." or "Legend Prestiges.")
        else
            Lmessage = "."
        end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have " .. getPlayerPrestige(cid) .. " " .. (getPlayerPrestige(cid) == 1 and "Prestige" or "Prestiges") .. Lmessage)
    end
    return true
end
 
Back
Top