local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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
-- XVX FORGER START --
function amulet(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,8264) >= 1 and getPlayerItemCount(cid,8265) >= 1 then
if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and doPlayerRemoveItem(cid,8265,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,8266,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function obsidian(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,2425) >= 1 then
if doPlayerRemoveItem(cid,2516,1) and doPlayerRemoveItem(cid,2425,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5908,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function crude(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2393) >= 1 then
if doPlayerRemoveItem(cid,2393,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5892,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function draconian(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2516) >= 1 then
if doPlayerRemoveItem(cid,2516,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5889,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
npcHandler:addModule(FocusModule:new())