Hello, I need help for script. What I am supposed to write down into places XXXX?
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, "I have talons")) then
if (getPlayerItemCount(cid, 2151) >= 100) then
doPlayerRemoveItem(cid, 2151, 100)
setPlayerStorageValue(cid, [SIZE="4"][COLOR="#9932cc"]xxxx[/COLOR][/SIZE], 1)
else
selfSay("You don\'t have any talons.", cid)
end
elseif (msgcontains(msg, "I want to travel")) then
if (getPlayerStorageValue(cid, [COLOR="#9932cc"][SIZE="4"]xxxx[/SIZE][/COLOR]) == -1) then
selfSay("You didn\'t bring me any talons.", cid)
else
doTeleportThing(cid {x = 418, y = 882, z = 1})
selfSay("Go away!", cid)
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())