Por blumaster, 13 de jun. de 2012 em Scripts
info
Grupo: Artesão
Registrado: 09/06/12
Posts: 104
Reputação: +6
Bom Galera seguinte baixei o riot do sUBWAT 8.6
Akele com mapa igual do infinity
criei este Npc
Equipaments Seller.xml
Com base no itens.xml do servidor
Que esta aqui
items.xml
Porem o Npc anuncia os items errados e nao vende eles
exemplo a wand of corruption tem a script dela la tudo porem as ids nao batem com a do itens.xml
eu coloquei exemplo 12706
la marca item tipo 12706 report to game master
sendo que este item esta no itens.xml
como um item especifico uma arma uma ropa etc...
so que se eu crio pelo God o item pelo nome ele sai certo
se eu crio pela id nao sai
alguem sabe arrumar?
alguem sabe o que isso?
Npc.xml
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Equipaments Seller" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="143" head="0" body="126" legs="87" feet="87" addons="3"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="message_greet" value="Ola |PLAYERNAME|. Eu vendo equipamentos Vip. Diga {trade}."/>
<parameter key="shop_buyable" value="Lightning Magician Boots,12706,5000000;Lightning Magician Legs,12705,5000000;Lightning Magician Robe,12704,5000000;Lightning Magician Mask,12703,5000000"/>
</parameters>
</npc>
Script Default.lua
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
npcHandler:addModule(FocusModule:new())
Tag do item no items.xml
<item id="12706" name="Lightning Magician Boots">
<attribute key="magiclevelpoints" value="10"/>
<attribute key="weight" value="800"/>
<attribute key="speed" value="200"/>
<attribute key="absorbPercentEnergy" value="15"/>
<attribute key="absorbPercentPoison" value="15"/>
<attribute key="absorbPercentFire" value="15"/>
<attribute key="absorbPercentPhysical" value="15"/>
<attribute key="absorbPercentIce" value="15"/>
<attribute key="absorbPercentDeath" value="15"/>
<attribute key="absorbPercentHoly" value="15"/>
<attribute key="healthGain" value="1000"/>
<attribute key="healthTicks" value="1000"/>
<attribute key="manaGain" value="3000"/>
<attribute key="manaTicks" value="1000"/>
<attribute key="armor" value="20"/>
<attribute key="slotType" value="feet"/>
</item>
ScreenShot do Bug no Npc...
http://imageshack.us/photo/my-images/534/bugnpc.jpg/
Moderaçao Favor feichar o Topico Duvida resolvida....
O problema era em movements.xml
Que nao avia estes itens adicionados..
info
Grupo: Artesão
Registrado: 09/06/12
Posts: 104
Reputação: +6
Bom Galera seguinte baixei o riot do sUBWAT 8.6
Akele com mapa igual do infinity
criei este Npc
Equipaments Seller.xml
Com base no itens.xml do servidor
Que esta aqui
items.xml
Porem o Npc anuncia os items errados e nao vende eles
exemplo a wand of corruption tem a script dela la tudo porem as ids nao batem com a do itens.xml
eu coloquei exemplo 12706
la marca item tipo 12706 report to game master
sendo que este item esta no itens.xml
como um item especifico uma arma uma ropa etc...
so que se eu crio pelo God o item pelo nome ele sai certo
se eu crio pela id nao sai
alguem sabe arrumar?
alguem sabe o que isso?
Npc.xml
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Equipaments Seller" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="143" head="0" body="126" legs="87" feet="87" addons="3"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="message_greet" value="Ola |PLAYERNAME|. Eu vendo equipamentos Vip. Diga {trade}."/>
<parameter key="shop_buyable" value="Lightning Magician Boots,12706,5000000;Lightning Magician Legs,12705,5000000;Lightning Magician Robe,12704,5000000;Lightning Magician Mask,12703,5000000"/>
</parameters>
</npc>
Script Default.lua
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
npcHandler:addModule(FocusModule:new())
Tag do item no items.xml
<item id="12706" name="Lightning Magician Boots">
<attribute key="magiclevelpoints" value="10"/>
<attribute key="weight" value="800"/>
<attribute key="speed" value="200"/>
<attribute key="absorbPercentEnergy" value="15"/>
<attribute key="absorbPercentPoison" value="15"/>
<attribute key="absorbPercentFire" value="15"/>
<attribute key="absorbPercentPhysical" value="15"/>
<attribute key="absorbPercentIce" value="15"/>
<attribute key="absorbPercentDeath" value="15"/>
<attribute key="absorbPercentHoly" value="15"/>
<attribute key="healthGain" value="1000"/>
<attribute key="healthTicks" value="1000"/>
<attribute key="manaGain" value="3000"/>
<attribute key="manaTicks" value="1000"/>
<attribute key="armor" value="20"/>
<attribute key="slotType" value="feet"/>
</item>
ScreenShot do Bug no Npc...
http://imageshack.us/photo/my-images/534/bugnpc.jpg/
Moderaçao Favor feichar o Topico Duvida resolvida....
O problema era em movements.xml
Que nao avia estes itens adicionados..