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...
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 lookdoodoo 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
Creature script - <event type="Look" name="Rebirth" event="script" value="Rebirth.lua"/>did you register it to creaturescripts.xml and in login.lua?
not working, if i download Teamviewer will you be able to have a check for me ??
You see your self, You are a gladiator. That is all
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 workingDon'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.
yes but it's assumed that he wanted to have the normal description + rebirths of the playerYes but in the prev thread he asked to check for rebirths, not vocation(s).
yes but it's assumed that he wanted to have the normal description + rebirths of the player
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?????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]
You have [" .. getPlayerStorageValue(cid, 85987) .. "] " .. (getPlayerStorageValue(cid, 85987) == 1 and "Prestige" or "Prestiges"))
it does though?????
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 ?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]