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())