Bom vocês sabem que a cada dia eu trago coisas novas, então hoje eu tou trazendo o npc "A Sweaty Cyclops" vamo lá:
Pimeiro abra: data\npc copie qualquer arquivo xml, renomeie para A Sweaty Cyclops, abra em bloco de notas, apague tudo que tem la dentro, e bote isso:
<npc name="A Sweaty Cyclops" script="data/npc/scripts/echanger.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="22" head="114" body="113" legs="113" feet="113" addons="3" corpse="2212"/> <parameters> <parameter key="module_shop" value="1" /> <parameter key="message_greet" value="Hello |PLAYERNAME|, Me can make good items from items me need." /> <parameter key="shop_buyable" value="obsidian knife,5908,10000." /> <parameter key="shop_buyable" value="spool of yarn,5886,20000." /> <parameter key="shop_buyable" value="chunk of crude iron,5892,30000." /> <parameter key="shop_buyable" value="lotery ticket,5958,40000." /> <parameter key="shop_buyable" value="draconian steel,5889,10000." /> <parameter key="shop_buyable" value="magic sulphur,5904,20000." /> <parameter key="shop_buyable" value="enchanted chicken wing,5891,40000." /> <parameter key="shop_buyable" value="royal steel,5887,30000." /> <parameter key="shop_buyable" value="hell steel,5888,20000." /> <parameter key="shop_buyable" value="engraved crossbow,5947,40000." /> <parameter key="shop_buyable" value="fighting spirit,5884,50000." /> <parameter key="shop_buyable" value="blue piece of cloth,5912,20000." /> <parameter key="shop_buyable" value="green piece of cloth,5910,20000." /> <parameter key="shop_buyable" value="red piece of cloth,5911,10000." /> <parameter key="shop_buyable" value="white piece of cloth,5909,10000." /> <parameter key="shop_buyable" value="green piece of cloth,5910,10000." /> <parameter key="shop_buyable" value="yellow piece of cloth,5914,10000." /> <parameter key="shop_buyable" value="blue piece of cloth,5912,10000." /> <parameter key="shop_buyable" value="brown piece of cloth,5913,10000." /> </parameters> </npc>
2°: Abra: data\npc\scripts, copie qualquer arquivo, mude o nome para echanger, abra, retire o que tem dentro e bote:
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 creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
if msgcontains(msg, 'help') then
selfSay('You can here change some items for "spider silk yarn", "chunk of crude iron", "draconian steel", "warrior sweat", "magic sulpher", "enchanted chicken wing", "royal steel", "hell steel", "engraved crossbow", "fighting spirit", "infernal bolt", "blue piece of cloth", "green piece of cloth", "red piece of cloth", "lottery ticket".', cid)
elseif msgcontains(msg, 'spider silk yarn') then
if getPlayerItemCount(cid,5879) >= 10 then
selfSay('Did you bring me the 10 Giant Silks ?', cid)
talk_state = 1
else
selfSay('I need a 10 Giant Spider Silks, to give you the spider silk yarn. Come back when you have them.', cid)
talk_state = 0
end
elseif msgcontains(msg, 'yes') and talk_state == 1 then
talk_state = 0
if getPlayerItemCount(cid,5879) >= 10 then
if doPlayerRemoveItem(cid,5879, 10) == TRUE then
selfSay(done, cid)
doPlayerAddItem(cid, 5886, 1)
end
else
selfSay(item, cid)
end
elseif msgcontains(msg, 'chunk of crude iron') then
if getPlayerItemCount(cid,2393) >= 1 then
TCHAU GENTE, E LEMBREM-SE DOS CRÉDITOS!.!.!





