• 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 NPC new module

Sherice

Sky&Wind
Joined
Jan 20, 2012
Messages
183
Reaction score
7
Location
Sweden
Greetings!

Does anyone know how I can change the "greeting" message in the new module for each NPC, in an easy way?



Thanks in advance.
 
It should be this file:
./data/npc/lib/npcsystem/npchandler.lua

Search:
[MESSAGE_GREET]

And you can edit all your messages there.
Red
 
Oh. That's not too difficult either!

Here's an example of what Barret might say.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Barret" script="data/npc/scripts/barret.lua" walkinterval="5000" speed="60" floorchange="0">
	<health now="100" max="100"/>
	<look type="143" head="116" body="120" legs="116" feet="114" addons="2"/>
	
	<parameters>
		<parameter key="message_greet" value="{Shinra} is sucking all of the {Mako} out of the planet."/>
		<parameter key="message_farewell" value="You can't give up now! There ain't no gettin' off of this train we on!"/>
	</parameters>
</npc>

The parameter keys are also in npchandler.lua
Red
 
Oh thanks, took me years to find this thread again lol >.<
rep+d

EDIT: How do I add a range to how far away you can talk/say hi to him?
 
afaik you can only edit it here:
./data/npc/lib/npcsystem/npchandler.lua

Search:
talkRadius = 3,

and change it to whatever valuable you'd like. Although this applies to every NPC. I'm not sure how to apply it to only one NPC or if that's an option.
Red
 
Back
Top Bottom