juneto 0 #1 Postado 5 Maio, 2010 Nome: NPC Gary (compra items colecionáveis) Autor: Juneto Versão Testada: Styller Yourots (0.6.5) - Naxed Ot (6.0) Client: Tibia 8.54 (funionamento simples, deve pegar em todos a partir do 8.4) Bom vamos ao principal: Na Pasta Data/npc crie um arquivo com nome de Gary.xml, dentro deste arquivo coloque o seguinte: <?xml version="1.0" encoding="UTF-8"?><npc name="Gary" script="buyer.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="151" head="75" body="20" legs="75" feet="95" addons="1" corpse="2212"/> <parameters> <parameter key="module_travel" value="1"/> <parameter key="message_greet" value="Hello |PLAYERNAME|. I buy Collectionables! And Sell Explorer Equipments." /> </parameters> </npc> Legendas: Vermelho: Nome do NPC Verde: Outfit que ele esta usando (neste caso, Pirate) Azul: Mensagem que ele diz após o Player falar Hi. Feito isso, vamos abrir a pasta Data/npc/scripts lá dentro iremos criar um arquivo com nome de buyer.lua. Abra este arquivo e dentro dele vamos por: 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 local shopModule = ShopModule:new() npcHandler:addModule(shopModule) <!--Items que ele Compra --> shopModule:addSellableItem({'lizard leather'}, 5876, 120, 'lizard leathers') shopModule:addSellableItem({'minotaur leather'}, 5878, 120, 'minotaur leathers') shopModule:addSellableItem({'green dragon leather'}, 5877, 200, 'green dragon leathers') shopModule:addSellableItem({'giant spider silk'}, 5879, 200, 'giant spider silks') shopModule:addSellableItem({'red dragon scale'}, 5882, 400, 'red dragon scale') shopModule:addSellableItem({'green dragon scale'}, 5920, 200, 'green dragon scales') shopModule:addSellableItem({'bear paw'}, 5896, 100, 'bear paw') shopModule:addSellableItem({'wolf paw'}, 5897, 100, 'wolf paw') shopModule:addSellableItem({'bat wing'}, 5894, 100, 'bat wing') shopModule:addSellableItem({'egg of the many'}, 10523, 100, 'egg of the many') shopModule:addSellableItem({'honeycomb'}, 5902, 150, 'honeycomb') shopModule:addSellableItem({'ape fur'}, 5883, 100, 'ape furs') shopModule:addSellableItem({'iron ore'}, 5880, 100, 'iron ore') shopModule:addSellableItem({'chicken feather'}, 5890, 30, 'chicken feathers') shopModule:addSellableItem({'beholder eye'}, 5898, 300, 'beholder eyes') shopModule:addSellableItem({'demon dust'}, 5906, 1000, 'demon dust') shopModule:addSellableItem({'vampire dust'}, 5905, 500, 'vampire dust') shopModule:addSellableItem({'hydra egg'}, 4850, 800, 'hydra egg') shopModule:addSellableItem({'behemot claw'}, 5930, 500, 'behemot claw') shopModule:addSellableItem({'red dragon leather'}, 5948, 400, 'red dragon leathers') shopModule:addSellableItem({'fish tail'}, 5951, 200, 'fish tail') shopModule:addSellableItem({'winged tail'}, 11223, 900, 'winged tail') shopModule:addSellableItem({'fish fin'}, 5895, 200, 'fish fin') shopModule:addSellableItem({'shard'}, 7290, 300, 'shard') shopModule:addSellableItem({'icicle'}, 4848, 500, 'icicle') shopModule:addSellableItem({'perfect behemoth fang'}, 5893, 500, 'perfect behemoth fang') shopModule:addSellableItem({'turtle shell'}, 5899, 100, 'turtle shell') shopModule:addSellableItem({'white pearl'}, 2143, 120, 'white pearl') shopModule:addSellableItem({'black pearl'}, 2144, 120, 'black pearl') shopModule:addSellableItem({'small diamond'}, 2145, 120, 'small diamond') shopModule:addSellableItem({'small sapphire'}, 2146, 100, 'small sapphire') shopModule:addSellableItem({'small ruby'}, 2147, 100, 'small ruby') shopModule:addSellableItem({'small emerald'}, 2149, 100, 'small emerald') shopModule:addSellableItem({'small amethyst'}, 2150, 100, 'small amethyst') shopModule:addSellableItem({'talon'}, 2151, 150, 'talon') shopModule:addSellableItem({'scarab coin'}, 2159, 100, 'scarab coin') shopModule:addSellableItem({'wyvern fang'}, 7408, 400, 'wyvern fang') shopModule:addSellableItem({'heaven blossom'}, 5921, 100, 'heaven blossom') shopModule:addSellableItem({'dragon claw'}, 5919, 800, 'dragon claw') shopModule:addSellableItem({'hardened bone'}, 5925, 200, 'hardened bone') shopModule:addSellableItem({'blue gem'}, 2158, 10000, 'blue gem') shopModule:addSellableItem({'green gem'}, 2155, 10000, 'green gem') shopModule:addSellableItem({'yellow gem'}, 2154, 10000, 'yellow gem') shopModule:addSellableItem({'red gem'}, 2156, 10000, 'red gem') shopModule:addSellableItem({'purple gem'}, 2153, 10000, 'purple gem') shopModule:addSellableItem({'white piece of cloth'}, 5909, 100, 'white piece of cloth') shopModule:addSellableItem({'green piece of cloth'}, 5910, 100, 'green piece of cloth') shopModule:addSellableItem({'red piece of cloth'}, 5911, 100, 'red piece of cloth') shopModule:addSellableItem({'blue piece of cloth'}, 5912, 100, 'blue piece of cloth') shopModule:addSellableItem({'brown piece of cloth'}, 5913, 100, 'brown piece of cloth') shopModule:addSellableItem({'yellow piece of cloth'}, 5914, 100, 'yellow piece of cloth') <!-- Items que ele vende --> shopModule:addBuyableItem({'blessed wooden stake'}, 5942, 7000, 'blessed wooden stake') shopModule:addBuyableItem({'obsidian knife'}, 5908, 3200, 'obsidian knife') shopModule:addBuyableItem({'shovel'}, 2554, 20, 'shovel') npcHandler:addModule(FocusModule:new()) Legendas: Vermelho: Nome do Item Verde: ID do Item (pode ser verificado em Data/items/items.xml) Azul: Preço de venda ou compra do item Roxo: modo de venda (se for addSellableItem o NPC compra do Player, se for addbuyableItem, o NPC vende para o Player) Esse NPC se encaixa melhor nos Server de RPG ou Fun. Mas pode ser usado tambem em Server de War ou aqueles apelao mesmo, para conseguir uma graninha extra. :yes: Compartilhar este post Link para o post
Flatronez 1 #2 Postado 7 Maio, 2010 Desculpe a demora, movido. Compartilhar este post Link para o post
Shhuratoo 0 #3 Postado 23 Maio, 2010 Massa... Tipo o npc do P.O. fico massa Compartilhar este post Link para o post
Death Monkey 0 #4 Postado 25 Maio, 2010 nuss, parece bom so q e mto grande Compartilhar este post Link para o post
Voolcom 0 #5 Postado 25 Maio, 2010 Bem Simples, mais já poupa o trabalho de alguns =) Compartilhar este post Link para o post
jeferson patrick 0 #6 Postado 26 Maio, 2010 fuinciona em quaquer tipo de ot server ? Compartilhar este post Link para o post
Fantom 1 #7 Postado 26 Maio, 2010 Boa idéia... Uma coisa simples e útil. Gostei ^^ Att. Compartilhar este post Link para o post
miroki 0 #8 Postado 17 Agosto, 2010 No meu ot Tfs 0.3.6 nao ta funcionando direito Compartilhar este post Link para o post
Velho Doidao 2 #9 Postado 21 Setembro, 2010 É útil para servidores que não utilizam estes itens como forma de conseguir addons, assim vender seria sua única utilidade, parabéns pelo script. Compartilhar este post Link para o post
Lismae Foke 0 #10 Postado 21 Setembro, 2010 Parabéns Belo Scripter !! Compartilhar este post Link para o post