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

Solved NPC look direction and message greet

Raiden

Developer
Joined
Sep 16, 2008
Messages
486
Reaction score
32
Location
Venezuela
Hello, i want to do some guard npc, but i want they to NOT move, so i put walkinterval in 0, and they don't move, but they are always looking down, and i want them to look for example to the right when they respawn

Also, there no way to make them to NOT focus on you when you say hi/hello, or simple say to you "I'm busy" and don't focus?, cuz i'm searching and don't find a usefull way
 
1. after walkinterval add "direction".
2. use default npc script without onCreatureSay handler. (Ofc dont edit default.lua, just create new one)
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 onThink()                            npcHandler:onThink()                        end
function onPlayerEndTrade(cid)                npcHandler:onPlayerEndTrade(cid)            end
function onPlayerCloseChannel(cid)            npcHandler:onPlayerCloseChannel(cid)        end

npcHandler:addModule(FocusModule:new())
 
Back
Top