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

Rebirth system OnLook 0.3.6

mxdz

New Member
Joined
Jul 28, 2017
Messages
19
Reaction score
1
hey guys does anyone have a spare script for the OnLook rebirth system, i can't seem to find a working one Thank you
Tibia 8.6
Crying damson 0.3.6
 
Solution
doodoo script but should work
LUA:
function onLook(cid, thing, position, lookDistance)
    local pmessage = ""
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerStorageValue(thing.uid, 85987) ~= -1) then
        if(getPlayerStorageValue(thing.uid, 85987) > -1) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has [" .. getPlayerStorageValue(thing.uid, 85987) .. "] " .. (getPlayerStorageValue(thing.uid, 85987) == 1 and "Prestige" or "Prestiges"))
        end
    elseif(thing.uid == cid and getPlayerStorageValue(cid, 85987) ~= -1) then
        local message = "You see yourself."
        if(getPlayerFlagValue(cid...
doodoo script but should work
LUA:
function onLook(cid, thing, position, lookDistance)
    local pmessage = ""
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerStorageValue(thing.uid, 85987) ~= -1) then
        if(getPlayerStorageValue(thing.uid, 85987) > -1) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has [" .. getPlayerStorageValue(thing.uid, 85987) .. "] " .. (getPlayerStorageValue(thing.uid, 85987) == 1 and "Prestige" or "Prestiges"))
        end
    elseif(thing.uid == cid and getPlayerStorageValue(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(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(getPlayerStorageValue(thing.uid, 45001)) then
           -- message = message .. "\nPower: " .. getPlayerStorageValue(thing.uid, 45001) .. ""
       -- end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. "\nYou have [" .. getPlayerStorageValue(cid, 85987) .. "] " .. (getPlayerStorageValue(cid, 85987) == 1 and "Prestige" or "Prestiges"))
    end
    return true 
end
 
Solution
doodoo script but should work
LUA:
function onLook(cid, thing, position, lookDistance)
    local pmessage = ""
    if(isPlayer(thing.uid) and thing.uid ~= cid and getPlayerStorageValue(thing.uid, 85987) ~= -1) then
        if(getPlayerStorageValue(thing.uid, 85987) > -1) then
            doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has [" .. getPlayerStorageValue(thing.uid, 85987) .. "] " .. (getPlayerStorageValue(thing.uid, 85987) == 1 and "Prestige" or "Prestiges"))
        end
    elseif(thing.uid == cid and getPlayerStorageValue(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(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(getPlayerStorageValue(thing.uid, 45001)) then
           -- message = message .. "\nPower: " .. getPlayerStorageValue(thing.uid, 45001) .. ""
       -- end
        return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. "\nYou have [" .. getPlayerStorageValue(cid, 85987) .. "] " .. (getPlayerStorageValue(cid, 85987) == 1 and "Prestige" or "Prestiges"))
    end
    return true
end
Added this into (Rebirth.lua) in data/creature scripts / scripts, relaunched the server and not allowing me to see rebirths on look
 
do you get an error?
im not gonna bother with teamviewer cause this should work fine
i used this like a year ago for my server
 
You see your self, You are a gladiator. That is all

Don't create new threads for the same issues, I deleted your other thread.

Is this the only onLook script you have registerd? If it is, post the script you are using because the one Static posted does not print "gladiator"
The one I wrote for you does how ever, might be that this one isn't calld.
 
Don't create new threads for the same issues, I deleted your other thread.

Is this the only onLook script you have registerd? If it is, post the script you are using because the one Static posted does not print "gladiator"
The one I wrote for you does how ever, might be that this one isn't calld.
it would if that's his vocation.
 
Don't create new threads for the same issues, I deleted your other thread.

Is this the only onLook script you have registerd? If it is, post the script you are using because the one Static posted does not print "gladiator"
The one I wrote for you does how ever, might be that this one isn't calld.
im sorry, but also none of the scripts aint working
 
yes but it's assumed that he wanted to have the normal description + rebirths of the player

Correct and your script dosn't contain anything about that or am I missing it?
This is what he needs to add;
LUA:
local titles = {
    [1] = 'noob',
    [2] = 'gladiator'
}

local rebirths = getCreatureStorage(cid, 200)
message = message .. " You are a " .. titles[rebirths == -1 and 0 or rebirths]
 
Correct and your script dosn't contain anything about that or am I missing it?
This is what he needs to add;
LUA:
local titles = {
    [1] = 'noob',
    [2] = 'gladiator'
}

local rebirths = getCreatureStorage(cid, 200)
message = message .. " You are a " .. titles[rebirths == -1 and 0 or rebirths]
it does though?????

You have [" .. getPlayerStorageValue(cid, 85987) .. "] " .. (getPlayerStorageValue(cid, 85987) == 1 and "Prestige" or "Prestiges"))
 
Correct and your script dosn't contain anything about that or am I missing it?
This is what he needs to add;
LUA:
local titles = {
    [1] = 'noob',
    [2] = 'gladiator'
}

local rebirths = getCreatureStorage(cid, 200)
message = message .. " You are a " .. titles[rebirths == -1 and 0 or rebirths]
do i not need to add this into the script then? i just don't understand why it aint working, would it be best to use the original bocations anyways ?
 
Back
Top