So that's the error which is making troubles for me
and that's the script
I can't fix that by myself, maybe someone can.
Code:
[Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/john.lua
data/npc/scripts/john.lua:21: 'then' expected near '='
and that's the 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(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'hi') or msgcontains(msg, 'hello')) then
selfSay('Hello, what do you need??', cid)
talkState[talkUser] = 1
if msgcontains(msg, 'Kate') and talkState[talkUser] = 1 and getPlayerStorageValue(cid, 171711) = 1 then
selfSay('ahh she told me about you... do you want to help me??!!', cid)
if msgcontains(msg, 'yes')
selfSay('go there and make something.',cid)
end
else selfSay('Bye then.',cid)
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())