local key = 1717
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, 'storage') then
local rst = msg:sub(msg:find(' ') + 1, msg:len())
local sts = tonumber(rst)
if not sts then
selfSay('no number msg...', cid)
return true
end
doPlayerSetStorageValue(cid, key, sts)
selfSay('storage set to ' .. sts, cid)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)