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

NPC farwell

bpm91

Advanced OT User
Joined
May 23, 2019
Messages
1,046
Solutions
7
Reaction score
180
Location
Brazil
YouTube
caruniawikibr
how do you make the npc say "bye" to the player after X time without talking to him? tfs 1.5
7.72
 
XML:
<npc name="Example" script="example.lua" walkinterval="1500">
    <health now="100" max="100" />
    <look type="132" head="20" body="39" legs="45" feet="7" addons="0" />
    <parameters>
        <parameter key="idleTime" value="10" />
        <parameter key="message_idletimeout" value="bye" />
    </parameters>
</npc>

idleTime can be used to customize default time
message_idletimeout to specify message.

Might now work if your npcsystem is some custom implementation.

It can aslo be customized from LUA:
LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

npcHandler:setMaxIdleTime(20)
 
Last edited:
Back
Top