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

[Npc] Talking on NPCs chanell, not on defalut

Dubler

PHP, LUA, C++
Joined
Aug 3, 2009
Messages
268
Reaction score
11
Location
Poland
Please edit my script:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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
function creatureSayCallback(cid, type, msg)
     if msgcontains(msg, 'mission') then
              if getCreatureStorage(cid, 17001) == 1 then
                    selfSay('Hmm... grenhorn... I know! Find and bring me a firebug. Look for hole in ground on souther island.')
                    doCreatureSetStorage(cid, 17001, 2)
              else
                    selfSay('Lol?! WTF?' .. getCreatureStorage(cid, 17001))
                    talk_state = 0
              end
     elseif msgcontains(msg, 'noob') then
              selfSay("Fuck YOU!!!!!!!!")
              talk_state = 0
     end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top