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

[Lua Function] getCurrentNPCName () (get NPC name)

Seminari

Banned User
Joined
Dec 13, 2009
Messages
1,496
Reaction score
34
Location
Poland
Lua:
        function getCurrentNPCName ()
	   name = getCreatureName(getNpcCid())
	return name
	end


Example:

Lua:
if msgcontains(msg, 'name') then
		selfSay('I am ' .. getCurrentNPCName() .. '', cid)
end
 
Already exists in TFS?

Lua:
function getNpcName()
	return getCreatureName(getNpcId())
end
 
Back
Top