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

[OnLook] You are a tutor/senior tutor

Carlitos Flow

Developer (lvl*1)
Joined
Mar 2, 2011
Messages
156
Solutions
4
Reaction score
10
Hello OTland, could anyone help me with this?
Senior tutor:
14:52 You see yourself. You are a knight and senior tutor. Or You are a knight. You are a senior tutor
Position: [X: 340] [Y: 1025] [Z: 7].

I try with this but doesn't work, in LUA, creaturescripts:

LUA:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) and thing.uid ~= cid then
if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION(thing.uid) then
doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == 0 and ".\nShe" or ".\nHe") .. " ..getPlayerGroupName(cid)..")
else
doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == 0 and ".\nShe" or ".\nHe") .. " ..getPlayerGroupName(cid)..")
end
return true
elseif thing.uid == cid then 
local string = 'You see yourself.'
if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then
string = string..' You are '.. getPlayerGroupName(cid) ..'.'
elseif getPlayerVocation(cid) ~= 0 then
string = string..' You are '.. getPlayerVocationName(cid) ..'.'
else
string = string..' You have no vocation.'
end

if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then
string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.'
end

if getPlayerGuildId(cid) > 0 then 
string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid)
string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.'
end 
return true
end
 
Back
Top