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

[Request] NPC

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I need one npc speak: Hello my name is HJEIJEIRJ,i can travel you to OTLand,Welcome,My Profile,Settings,Log Out

(more ps: the npc don't move...he must be stopped,without one pitch)

Thx all
~without spam ;)
 
[NPC] HJEIJEIRJ.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="HJEIJEIRJ" script="travel.lua" walkinterval="0" floorchange="0">
	<health now="100" max="100"/>
	<look type="133" head="95" body="86" legs="86" feet="38" addons="3"/>
	<parameters>
		<parameter key="message_greet" value="Hello |PLAYERNAME|, my name is HJEIJEIRJ. I can travel you to OTLand, Welcome, My Profile, Settings, Log Out."/>
	</parameters>
</npc>

[NPC Script] travel.lua:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg) 			npcHandler:onCreatureSay(cid, type, msg)		end
function onThink() 					npcHandler:onThink()					end

local yesNode1 = KeywordNode:new({'yes'}, cost = 110)
local noNode1 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode2 = KeywordNode:new({'yes'}, cost = 150)
local noNode2 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode3 = KeywordNode:new({'yes'}, cost = 180)
local noNode3 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode4 = KeywordNode:new({'yes'}, cost = 200)
local noNode4 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode5 = KeywordNode:new({'yes'}, cost = 210)
local noNode5 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local node1 = keywordHandler:addKeyword({'otland'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to OTLand for 110 gold?'})
	node1:addChildKeywordNode(yesNode1)
	node1:addChildKeywordNode(noNode1)

local node2 = keywordHandler:addKeyword({'welcome'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to Welcome for 150 gold?'})
	node2:addChildKeywordNode(yesNode2)
	node2:addChildKeywordNode(noNode2)

local node3 = keywordHandler:addKeyword({'my profile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to My Profile for 180 gold?'})
	node3:addChildKeywordNode(yesNode3)
	node3:addChildKeywordNode(noNode3)

local node4 = keywordHandler:addKeyword({'settings'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to Settings for 200 gold?'})
	node4:addChildKeywordNode(yesNode4)
	node4:addChildKeywordNode(noNode4)

local node5 = keywordHandler:addKeyword({'log out'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to Log Out for 210 gold?'})
	node5:addChildKeywordNode(yesNode5)
	node5:addChildKeywordNode(noNode5)
keywordHandler:addKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Then come back when you are ready.'})

npcHandler:addModule(FocusModule:new())
 
Last edited:
[NPC] HJEIJEIRJ.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="HJEIJEIRJ" script="travel.lua" walkinterval="0" floorchange="0">
	<health now="100" max="100"/>
	<look type="133" head="95" body="86" legs="86" feet="38" addons="3"/>
	<parameters>
		<parameter key="message_greet" value="Hello |PLAYERNAME|, my name is HJEIJEIRJ. I can travel you to OTLand, Welcome, My Profile, Settings, Log Out."/>
	</parameters>
</npc>

[NPC Script] travel.lua:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg) 			npcHandler:onCreatureSay(cid, type, msg)		end
function onThink() 					npcHandler:onThink()					end

local yesNode1 = KeywordNode:new({'yes'}, cost = 110)
local noNode1 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode2 = KeywordNode:new({'yes'}, cost = 150)
local noNode2 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode3 = KeywordNode:new({'yes'}, cost = 180)
local noNode3 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode4 = KeywordNode:new({'yes'}, cost = 200)
local noNode4 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local yesNode5 = KeywordNode:new({'yes'}, cost = 210)
local noNode5 = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then where do you wish to go?'})

local node1 = keywordHandler:addKeyword({'otland'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to OTLand for 110 gold?'})
	node1:addChildKeywordNode(yesNode1)
	node1:addChildKeywordNode(noNode1)

local node2 = keywordHandler:addKeyword({'welcome'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to Welcome for 150 gold?'})
	node2:addChildKeywordNode(yesNode2)
	node2:addChildKeywordNode(noNode2)

local node3 = keywordHandler:addKeyword({'my profile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to My Profile for 180 gold?'})
	node3:addChildKeywordNode(yesNode3)
	node3:addChildKeywordNode(noNode3)

local node4 = keywordHandler:addKeyword({'settings'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to Settings for 200 gold?'})
	node4:addChildKeywordNode(yesNode4)
	node4:addChildKeywordNode(noNode4)

local node5 = keywordHandler:addKeyword({'log out'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, destination = {x=1, y=1, z=1}, text = 'Do you seek a passage to Log Out for 210 gold?'})
	node5:addChildKeywordNode(yesNode5)
	node5:addChildKeywordNode(noNode5)
keywordHandler:addKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Then come back when you are ready.'})

npcHandler:addModule(FocusModule:new())

LOL, I don't know what to say about that. ^_^
 
That was the weirdest NPC I've ever scripted...

@OP: Are you trying to make a map of the forum? :blink:
 
Back
Top