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
function Sweet(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
for i = 1, table.maxn(parameters.items) do
if getPlayerItemCount(cid, parameters.items[i]) <= 0 then
npcHandler:say('You don\'t have these items!', cid)
return true
end
end
for i = 1, table.maxn(parameters.items) do
doPlayerRemoveItem(cid,parameters.items[i], 1)
end
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid, parameters.reward,1)
return true
end
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can forge Amulet, {koshei ancient amulet},{huge chunk of crude iron},{piece of draconian steel},{piece of royal steel} and {piece of hell steel}!"})
local node1 = keywordHandler:addKeyword({'koshei ancient amulet'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a all piece of broken amulet for a Koshei Ancient Amulet?'})
node1:addChildKeyword({'yes'}, Sweet, {items = {8262,8263,8264,8265},reward = 8266})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node2 = keywordHandler:addKeyword({'huge chunk of crude iron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Giant Sword for a Huge Chunk of Crude Iron?'})
node2:addChildKeyword({'yes'}, Sweet, {items = {2393},reward = 5892})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node3 = keywordHandler:addKeyword({'piece of draconian steel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield for a Piece of Draconian Steel?'})
node3:addChildKeyword({'yes'}, Sweet, {items = {2516},reward = 5889})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node4 = keywordHandler:addKeyword({'piece of royal steel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Crown Armor for a Piece of Royal Steel?'})
node4:addChildKeyword({'yes'}, Sweet, {items = {2487},reward = 5887})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node5 = keywordHandler:addKeyword({'piece of royal steel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Devil Helmet for a Piece of Hell Steel?'})
node5:addChildKeyword({'yes'}, Sweet, {items = {2462},reward = 5888})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
npcHandler:addModule(FocusModule:new())
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- Npc A Sweaty Cyclops
3
1.1k
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

05 de março de 2011 às 21:19



info
Grupo: Campones
Registrado: 29/04/10
Posts: 38
Reputação: +2
Char no Tibia: Terry Thigo
Preciso do NPC A Sweaty Cyclops que troca itens por alguns itens de addon e quest.
ITENS QUE ELE TROCARA:
1 Devil Helmet (ID:2462) POR 1 Piece of Hell Steel (ID:5888)
1 Crown Armor (ID:2487) POR 1 Piece of Royal Steel (ID:5887)
1 Dragon Shield (ID:2516) POR 1 Piece of Draconian Steel (ID:5889)
1 Giant Sword (ID:2393) POR 1 Huge Chunk of Crude Iron (ID:5892)
Troca os itens com (ID: 8262. 8263, 8264, 8265) POR 1 Koshei's Ancient Amulet (ID:8266)