Ir para conteúdo
  • 0

Npc Bugado


blumaster

Pergunta

Galera eu criei uns items novos no meu servidor

 

Exemplo:

 

Peguei a sprite de uma crown legs.

 

e criei uma brave legs, porem nao uso o ID da crown legs criei com outro ID diferente.

 

So que quando eu vo vende uma crown legs no npc ele nao compra e la marca exemplo no trade/sell que voce tem crown legs ´para vender

 

mas nao vende e se voce da look na imagen que o npc mostra ta escrito brave legs.

 

Sendo que brave e ID 102 e a crown e outro totalmente diferente.

 

Se eu falar pro npc sell crown legs ele compra normal

 

Alguem sabe o que pode ser?

 

post-349531-0-65258300-1340461471_thumb.png

 

 

Nesta foto eu estou com uma crown legs na bp apenas isso porem dando look no npc aparece brave legs.

Editado por blumaster
Link para o comentário
Compartilhar em outros sites

10 respostass a esta questão

Posts Recomendados

  • 0

mediga,para criar esse items novos voce uso o mod de newitems do mkalo?(link abaixo)

http://www.xtibia.com/forum/topic/158192-sistema-de-novos-items/

 

 

se sim eu te digo que esse mod é uma trolagem,ele n cria novos item,ele so pega os items velhos e muda os atributos(quenem chega com o god e fala /attr set )

Link para o comentário
Compartilhar em outros sites

  • 0

Nao para criar os item eu editei ID que estavam deprecated no Items.otb

 

E adicionei as scprites devidas a cada item

 

feito isso como o item era para ser vip coloquei ele no items.xml assim:

 

<item id="102" article="a" name="Brave Legs">

<attribute key="weight" value="150"/>

<attribute key="armor" value="20"/>

<attribute key="slotType" value="legs"/>

<attribute key="speed" value="80"/>

<attribute key="absorbPercentEnergy" value="10"/>

<attribute key="absorbPercentPoison" value="10"/>

<attribute key="absorbPercentFire" value="10"/>

<attribute key="absorbPercentPhysical" value="10"/>

<attribute key="absorbPercentIce" value="10"/>

<attribute key="absorbPercentDeath" value="10"/>

<attribute key="absorbPercentHoly" value="10"/>

<attribute key="skillSword" value="15"/>

<attribute key="skillDist" value="15"/>

<attribute key="skillAxe" value="15"/>

<attribute key="skillClub" value="15"/>

<attribute key="skillShield" value="15"/>

</item>

 

A crown esta assim:

 

 

 

<item id="2488" name="crown legs">

<attribute key="weight" value="6500" />

<attribute key="armor" value="8" />

<attribute key="slotType" value="legs" />

</item>

 

 

e no movements esta assim

 

 

<movevent type="Equip" itemid="102" slot="legs" function="onEquipItem">

 

<vocation name="Knight"/>

<vocation name="Elite Knight" showInDescription="0"/>

<vocation name="Paladin"/>

<vocation name="Royal Paladin" showInDescription="0"/>

</movevent>

<movevent type="DeEquip" itemid="102" slot="legs" event="function" value="onDeEquipItem"/>

 

esta tudo funcionando certo se eu digito /i brave legs ele cria uma brave legs se digito crown legs ele cria a crown so o npc que esta marcando errado na imagens voce da look ele mostra a brave sendo que voce nem tem a brave legs com voce e para comprar ele mostra crown legs so que nao compra so se voce dizer sell nome do item ele compra

 

o Meu Npc e este aki:

 

 

NPC.XML

 

 

 

 

<?xml version="1.0" encoding="UTF-8"?>

<npc name="The Blacksmith" script="data/npc/scripts/loot2.lua" walkinterval="450" floorchange="0" access="5" level="1" maglevel="1">

<health now="150" max="150"/>

<look type="131" head="57" body="95" legs="95" feet="57" addons="3"/>

<parameters>

<parameter key="message_greet" value="HiHo |PLAYERNAME|. Eu compro apenas Armaduras, como Legs, Armors, Helmets e Boots. Se quiser vender armas va na Soya. Diga {trade}." />

<parameter key="message_needmoremoney" value="You do not have enough money."/>

<parameter key="message_decline" value="Is |TOTALCOST| gold coins too much for you? Get out of here!"/>

</parameters>

</npc>

 

Npc Script.

 

 

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 thinkCallback(cid)

local rand = math.random(1,100)

if rand == 1 then

selfSay('Compro armaduras e escudos, pago muito bem. Além disso, sou o unico que compro.')

end

return true

end

function greetCallback(cid)

return true

end

local shopModule = ShopModule:new()

npcHandler:addModule(shopModule)

shopModule:addSellableItem({'dragon scale mail', 'dsm'}, 2492, 40000, 'dragon scale mail')

shopModule:addSellableItem({'dwarven armor', 'dwarven armor'}, 2503, 30000, 'dwarven armor')

shopModule:addSellableItem({'golden armor', 'golden armor'}, 2466, 20000, 'golden armor')

shopModule:addSellableItem({'leopard armor', 'leopard armor'}, 3968, 1000, 'leopard armor')

shopModule:addSellableItem({'mammoth fur cape', 'mfc'}, 7463, 6000, 'mammoth fur cape')

shopModule:addSellableItem({'plate armor', 'plate armor'}, 2463, 400, 'plate armor')

shopModule:addSellableItem({'chain armor', 'chain armor'}, 2464, 80, 'chain armor')

shopModule:addSellableItem({'brass armor', 'brass armor'}, 2465, 35, 'brass armor')

shopModule:addSellableItem({'leather armor', 'leather armor'}, 2467, 10, 'leather armor')

shopModule:addSellableItem({'magic plate armor', 'magic plate armor'}, 2472, 80000, 'magic plate armor')

shopModule:addSellableItem({'knight armor', 'knight armor'}, 2476, 5000, 'knight armor')

shopModule:addSellableItem({'scale armor', 'scale armor'}, 2483, 50, 'scale armor')

shopModule:addSellableItem({'studded armor', 'studded armor'}, 2484, 30, 'studded armor')

shopModule:addSellableItem({'doublet', 'doublet'}, 2485, 15, 'doublet')

shopModule:addSellableItem({'noble armor', 'noble armor'}, 2486, 1000, 'noble armor')

shopModule:addSellableItem({'crown armor', 'crown armor'}, 2487, 12000, 'crown armor')

shopModule:addSellableItem({'pirate shirt', 'pirate shirt'}, 6095, 500, 'pirate shirt')

shopModule:addSellableItem({'dark armor', 'dark armor'}, 2489, 500, 'dark armor')

shopModule:addSellableItem({'demon armor', 'demon armor'}, 2494, 120000, 'demon armor')

shopModule:addSellableItem({'amazon armor', 'amazon armor'}, 2500, 150000, 'amazon armor')

shopModule:addSellableItem({'elven armor', 'elven armor'}, 2505, 130000, 'elven armor')

shopModule:addSellableItem({'native armor', 'native armor'}, 2508, 3000, 'native armor')

shopModule:addSellableItem({'jacket', 'jacket'}, 2650, 5, 'jacket')

shopModule:addSellableItem({'blue robe', 'blue robe'}, 2656, 11000, 'blue robe')

shopModule:addSellableItem({'hidden turbant', 'hidden turbant'}, 2660, 100000, 'hidden turbant')

shopModule:addSellableItem({'cowl', 'cowl'}, 2664, 90000, 'cowl')

shopModule:addSellableItem({'terra mantle', 'terra mantle'}, 7884, 10000, 'terra mantle')

shopModule:addSellableItem({'glacier rope', 'glacier rope'}, 7897, 15000, 'glacier rope')

shopModule:addSellableItem({'lighting robe', 'lighting robe'}, 7898, 20000, 'lighting robe')

shopModule:addSellableItem({'magma coat', 'magma coat'}, 7899, 60000, 'magma coat')

shopModule:addSellableItem({'studded legs', 'studded legs'}, 2468, 10, 'studded legs')

shopModule:addSellableItem({'dragon scale legs', 'dcl'}, 2469, 100000, 'dragon scale legs')

shopModule:addSellableItem({'golden legs', 'golden legs'}, 2470, 100000, 'golden legs')

shopModule:addSellableItem({'knight legs', 'knight legs'}, 2477, 5000, 'knight legs')

shopModule:addSellableItem({'brass legs', 'brass legs'}, 2478, 90, 'brass legs')

shopModule:addSellableItem({'crown legs', 'crown legs'}, 2488, 12000, 'crown legs')

shopModule:addSellableItem({'demon legs', 'demon legs'}, 2495, 200000, 'demon legs')

shopModule:addSellableItem({'dwarven legs', 'dwarven legs'}, 2504, 3000, 'dwarven legs')

shopModule:addSellableItem({'elven legs', 'elven legs'}, 2507, 150000, 'elven legs')

shopModule:addSellableItem({'plate legs', 'plate legs'}, 2647, 200, 'plate legs')

shopModule:addSellableItem({'chain legs', 'chain legs'}, 2648, 30, 'chain legs')

shopModule:addSellableItem({'leather legs', 'leather legs'}, 2649, 5, 'leather legs')

shopModule:addSellableItem({'mammoth fur shorts', 'mfs'}, 7464, 300, 'mammoth fur shorts')

shopModule:addSellableItem({'terra legs', 'terra legs'}, 7885, 60000, 'terra legs')

shopModule:addSellableItem({'magma legs', 'magma legs'}, 7894, 70000, 'magma legs')

shopModule:addSellableItem({'lighting legs', 'lighting legs'}, 7895, 50000, 'lighting legs')

shopModule:addSellableItem({'glacier kilt', 'glacier kilt'}, 7896, 55000, 'glacier kilt')

shopModule:addSellableItem({'bast skirt', 'bast skirt'}, 3983, 8000, 'bast skirt')

shopModule:addSellableItem({'blue legs', 'blue legs'}, 7730, 15000, 'blue legs')

shopModule:addSellableItem({'pirate knee breeches', 'pkb'}, 5918, 200, 'pirate knee breeches')

shopModule:addSellableItem({'steel shield', 'steel shield'}, 2509, 80, 'steel shield')

shopModule:addSellableItem({'plate shield', 'plate shield'}, 2510, 150, 'plate shield')

shopModule:addSellableItem({'brass shield', 'brass shield'}, 2511, 90, 'brass shield')

shopModule:addSellableItem({'wooden shield', 'wooden shield'}, 2512, 80, 'wooden shield')

shopModule:addSellableItem({'battle shield', 'battle shield'}, 2513, 100, 'battle shield')

shopModule:addSellableItem({'mastermind shield', 'mastermind shield'}, 2514, 90000, 'mastermind shield')

shopModule:addSellableItem({'guardian shield', 'guardian shield'}, 2515, 2000, 'guardian shield')

shopModule:addSellableItem({'dragon shield', 'dragon shield'}, 2516, 4000, 'dragon shield')

shopModule:addSellableItem({'shield of honour', 'shield of honour'}, 2517, 100000, 'shield of honour')

shopModule:addSellableItem({'beholder shield', 'beholder shield'}, 2518, 1000, 'beholder shield')

shopModule:addSellableItem({'crown shield', 'crown shield'}, 2519, 8000, 'crown shield')

shopModule:addSellableItem({'demon shield', 'demon shield'}, 2520, 30000, 'demon shield')

shopModule:addSellableItem({'dark shield', 'dark shield'}, 2521, 500, 'dark shield')

shopModule:addSellableItem({'great shield', 'great shield'}, 2522, 30000, 'great shield')

shopModule:addSellableItem({'blessed shield', 'blessed shield'}, 2523, 400000, 'blessed shield')

shopModule:addSellableItem({'ornamented shield', 'ornamented shield'}, 2524, 2000, 'ornamented shield')

shopModule:addSellableItem({'dwarven shield', 'dwarven shield'}, 2525, 100, 'dwarven shield')

shopModule:addSellableItem({'studded shield', 'studded shield'}, 2526, 50, 'studded shield')

shopModule:addSellableItem({'rose shield', 'rose shield'}, 2527, 80000, 'rose shield')

shopModule:addSellableItem({'tower shield', 'tower shield'}, 2528, 8000, 'tower shield')

shopModule:addSellableItem({'black shield', 'black shield'}, 2529, 1000, 'black shield')

shopModule:addSellableItem({'copper shield', 'copper shield'}, 2530, 30, 'copper shield')

shopModule:addSellableItem({'viking shield', 'viking shield'}, 2531, 100, 'viking shield')

shopModule:addSellableItem({'ancient shield', 'ancient shield'}, 2532, 1000, 'ancient shield')

shopModule:addSellableItem({'griffin shield', 'griffin shield'}, 2533, 1500, 'griffin shield')

shopModule:addSellableItem({'vampire shield', 'vampire shield'}, 2534, 15000, 'vampire shield')

shopModule:addSellableItem({'castle shield', 'castle shield'}, 2535, 35000, 'castle shield')

shopModule:addSellableItem({'medusa shield', 'medusa shield'}, 2536, 9000, 'medusa shield')

shopModule:addSellableItem({'amazon shield', 'amazon shield'}, 2537, 400000, 'amazon shield')

shopModule:addSellableItem({'eagle shield', 'eagle shield'}, 2538, 300000, 'eagle shield')

shopModule:addSellableItem({'phoenix shield', 'phoenix shield'}, 2539, 500000, 'phoenix shield')

shopModule:addSellableItem({'scarab shield', 'scarab shield'}, 2540, 2000, 'scarab shield')

shopModule:addSellableItem({'bone shield', 'bone shield'}, 2541, 160, 'bone shield')

shopModule:addSellableItem({'tempest shield', 'tempest shield'}, 2542, 1000000, 'tempest shield')

shopModule:addSellableItem({'tusk shield', 'tusk shield'}, 3973, 1000, 'tusk shield')

shopModule:addSellableItem({'sentinel shield', 'sentinel shield'}, 3974, 700, 'sentinel shield')

shopModule:addSellableItem({'salamander shield', 'salamander shield'}, 3975, 600, 'salamander shield')

shopModule:addSellableItem({'tortoise shield', 'tortoise shield'}, 6131, 200, 'tortoise shield')

shopModule:addSellableItem({'nightmare shield', 'nightmare shield'}, 6391, 1200000, 'nightmare shield')

shopModule:addSellableItem({'necromancer shield', 'necromancer shield'}, 6433, 1200000, 'necromancer shield')

shopModule:addSellableItem({'norse shield', 'norse shield'}, 7460, 1500, 'norse shield')

shopModule:addSellableItem({'crown', 'crown'}, 2128, 10000, 'crown')

shopModule:addSellableItem({'steel helmet', 'steel helmet'}, 2457, 300, 'steel helmet')

shopModule:addSellableItem({'chain helmet', 'chain helmet'}, 2458, 35, 'chain helmet')

shopModule:addSellableItem({'iron helmet', 'iron helmet'}, 2459, 150, 'iron helmet')

shopModule:addSellableItem({'brass helmet', 'brass helmet'}, 2460, 30, 'brass helmet')

shopModule:addSellableItem({'leather helmet', 'leather helmet'}, 2461, 8, 'leather helmet')

shopModule:addSellableItem({'devil helmet', 'devil helmet'}, 2462, 1200, 'devil helmet')

shopModule:addSellableItem({'golden helmet', 'golden helmet'}, 2471, 1500000, 'golden helmet')

shopModule:addSellableItem({'viking helmet', 'viking helmet'}, 2473, 50, 'viking helmet')

shopModule:addSellableItem({'winged helmet', 'winged helmet'}, 2474, 1300000, 'winged helmet')

shopModule:addSellableItem({'warrior helmet', 'warrior helmet'}, 2475, 5000, 'warrior helmet')

shopModule:addSellableItem({'strange helmet', 'strange helmet'}, 2479, 500, 'strange helmet')

shopModule:addSellableItem({'legion helmet', 'legion helmet'}, 2480, 70, 'legion helmet')

shopModule:addSellableItem({'soldier helmet', 'soldier helmet'}, 2481, 20, 'soldier helmet')

shopModule:addSellableItem({'studded helmet', 'studded helmet'}, 2482, 3, 'studded helmet')

shopModule:addSellableItem({'dark helmet', 'dark helmet'}, 2490, 250, 'dark helmet')

shopModule:addSellableItem({'crown helmet', 'crown helmet'}, 2491, 2500, 'crown helmet')

shopModule:addSellableItem({'demon helmet', 'demon helmet'}, 2493, 100000, 'demon helmet')

shopModule:addSellableItem({'horned helmet', 'horned helmet'}, 2496, 1000000, 'horned helmet')

shopModule:addSellableItem({'crusader helmet', 'crusader helmet'}, 2497, 6000, 'crusader helmet')

shopModule:addSellableItem({'royal helmet', 'royal helmet'}, 2498, 30000, 'royal helmet')

shopModule:addSellableItem({'amazon helmet', 'amazon helmet'}, 2499, 1400000, 'amazon helmet')

shopModule:addSellableItem({'ceremonial mask', 'ceremonial mask'}, 2501, 1000, 'ceremonial mask')

shopModule:addSellableItem({'dwarven helmet', 'dwarven helmet'}, 2502, 100000, 'dwarven helmet')

shopModule:addSellableItem({'dragon scale helmet', 'drascahelm'}, 2506, 400000, 'dragon scale helmet')

shopModule:addSellableItem({'mystic turban', 'mystic turban'}, 2663, 3000, 'mystic turban')

shopModule:addSellableItem({'post officers hat', 'post'}, 2665, 50000, 'post officers hat')

shopModule:addSellableItem({'tribal mask', 'tribal mask'}, 3967, 300, 'tribal mask')

shopModule:addSellableItem({'horseman helmet', 'horseman helmet'}, 3969, 1000, 'horseman helmet')

shopModule:addSellableItem({'feather headdress', 'feather head'}, 3970, 1500, 'feather headdress')

shopModule:addSellableItem({'charmer tiara', 'charmer tiara'}, 3971, 13000, 'charmer tiara')

shopModule:addSellableItem({'beholder helmet', 'beholder helmet'}, 3972, 10000, 'beholder helmet')

shopModule:addSellableItem({'helmet of the deep', 'heotde'}, 5461, 1000000, 'helmet of the deep')

shopModule:addSellableItem({'santa hat', 'santa hat'}, 6531, 2300, 'santa hat')

shopModule:addSellableItem({'skull helmet', 'skull helmet'}, 5741, 50000, 'skull helmet')

shopModule:addSellableItem({'pirate hat', 'pirate hat'}, 6096, 1000, 'pirate hat')

shopModule:addSellableItem({'krimhorn helmet', 'krimhorn helmet'}, 7461, 250, 'krimhorn helmet')

shopModule:addSellableItem({'ragnir helmet', 'ragnir helmet'}, 7462, 400, 'ragnir helmet')

shopModule:addSellableItem({'fur cap', 'fur cap'}, 7458, 30000, 'fur cap')

shopModule:addSellableItem({'earmuffs', 'earmuffs'}, 7459, 1000, 'earmuffs')

shopModule:addSellableItem({'terra hood', 'terra hood'}, 7903, 3500, 'terra hood')

shopModule:addSellableItem({'lighting headband', 'lighba'}, 7901, 8000, 'lighting headband')

shopModule:addSellableItem({'glacier mask', 'glacier mask'}, 7902, 4000, 'glacier mask')

shopModule:addSellableItem({'boots of haste', 'boots of haste'}, 2195, 30000, 'boots of haste')

shopModule:addSellableItem({'soft boots', 'soft boots'}, 6132, 400000, 'soft boots')

shopModule:addSellableItem({'boots of waterwalking', 'bowwalk'}, 2358, 1000000, 'boots of waterwalking')

shopModule:addSellableItem({'traper boots', 'traper boots'}, 2641, 3000, 'traper boots')

shopModule:addSellableItem({'sandals', 'sandals'}, 2642, 100, 'sandals')

shopModule:addSellableItem({'leather boots', 'leather boots'}, 2643, 10, 'leather boots')

shopModule:addSellableItem({'bunny slippers', 'bunny slippers'}, 2644, 35, 'bunny slippers')

shopModule:addSellableItem({'steel boots', 'steel boots'}, 2645, 30000, 'steel boots')

shopModule:addSellableItem({'golden boots', 'golden boots'}, 2646, 400000, 'golden boots')

shopModule:addSellableItem({'crocodile boots', 'crocodile boots'}, 3982, 1000, 'crocodile boots')

shopModule:addSellableItem({'pirate boots', 'pirate boots'}, 5462, 5000, 'pirate boots')

shopModule:addSellableItem({'fur boots', 'fur boots'}, 7457, 2000, 'fur boots')

shopModule:addSellableItem({'terra boots', 'terra boots'}, 7886, 5000, 'terra boots')

shopModule:addSellableItem({'magma boots', 'magma boots'}, 7891, 7000, 'magma boots')

shopModule:addSellableItem({'glacier shoes', 'glacier shoes'}, 7892, 3000, 'glacier shoes')

shopModule:addSellableItem({'lighting boots', 'lighting boots'}, 7893, 7000, 'lighting boots')

npcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)

npcHandler:setCallback(CALLBACK_GREET, greetCallback)

npcHandler:addModule(FocusModule:new())

Link para o comentário
Compartilhar em outros sites

  • 0

intão cara tava vendo aki seu script do npc mas n achei o shopmodule com id 102(as tais brave legs),acho que tu esqueceu de adicionalas

 

obs:procurei por "brave" no script tbm n achei.

 

se n souber como adicionar,so flar que te ensino como adiciona pra vende.

Link para o comentário
Compartilhar em outros sites

  • 0

Ai que ta amigo ele nao devia esta vendendo a brave mesmo.

 

viu na ss?

 

Eu tenho uma crown legs na bag.

 

o Npc marca que compra ela certo?

 

eu clicko para vender ele nao compra.

 

do look na crown do npc que fica na foto do seller

 

ele mostra a brave legs e nao a crown legs.

 

e se eu falar sell brave legs ele nao compra

se falar sell crown legs ele compra normal.

 

Problema

 

eu tenho 1 crown o npc fala que tenho porem nao compra.

 

do look no npc ele mostra uma brave legs oO.

Link para o comentário
Compartilhar em outros sites

  • 0

Pode ser que no item editor os dois itens estão com alguma coisa igual...

Poste seu .otb aqui e diga a versão dele, vou dar uma olhada.

Editado por fireelement
Link para o comentário
Compartilhar em outros sites

  • 0

Fireelement.

 

Estao apenas usando a mesma sprite.

 

Porque nao criei uma sprite nova.

 

Ambos estao com CID 3382

 

Ambos estao pickutable .

 

Mas os IDs no items.otb sao diferente.

 

pode ser pela CID?

 

A SID e diferente.

 

Se o problema for as sprites teria de criar novas sprite com isso eu teria de criar client e players seriao obrigado a baixar para ter set vip.

 

nao queria isso.

 

Se eu remover a crown legs daria certo?

 

e se eu remover teria que editar todos os monstros que dropan os items?

 

que eu criei?

Editado por blumaster
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...