Ir para conteúdo

Npc Vendendo Tudo Em Dobro


MarcioIV

Posts Recomendados

oi galera

 

o npc dark rodo do meu otserver esta vendendo tudo em dobro.

 

 

como faço para arrumar ele?

 

olha como esta o script:

 

Servfull 2.4\data\npc

 

 

<?xml version="1.0"?>

 

<npc name="Dark Rodo" script="data/npc/scripts/dark_rodo.lua" walkinterval="25" access="1" lookdir="2">

<mana now="800" max="800"/>

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

<look type="128" head="78" body="71" legs="82" feet="114"/>

<parameters>

<parameter key="module_shop" value="1"/>

<parameter key="shop_buyable" value="

Avalanche,2274,180,4;Blank rune,2260,5,1;SpellBook,2175,1000,1;Explosion,2313,190,6;Great fireball,2304,180,5;Firebomb,2305,235,10;Heavy magic missile,2311,120,10;Icicle,2271,150,5;Magic wall,2293,350,5;Paralyze,2278,700,1;Poison Bomb,2286,170,10;Sudden death,2268,325,100;Ultimate healing,2273,175,100;antidote,2266,65,100;thunderstorm,2315,325,100;stone shower,2288,150,4;stalagmite,2292,120,10;energy bomb,2262,325,2;energy wall,2279,340,4;energy field,2277,115,3;fireball,2302,150,5;soulfire,2308,140,3;fire wall,2303,245,4;fire field,2301,85,3;poison field,2285,65,3;poison wall,2289,210,4;light magic missile,2287,40,10;chameleon,2291,210,1;destroy field,2261,45,3;desintegrate,2310,80,3;convince creature,2290,80,1;animate dead,2316,375,1;intense healing,2265,95,1;Wand of Vortex,2190,500,1;Wand of Dragonbreath,2191,1000,1;Wand of Decay,2188,5000,1;Wand of Draconia,8921,5000,1;Wand of Cosmic Energy,2189,10000,1;Wand of Inferno,2187,15000,1;Wand of Starstorm,8920,15000,1;Wand of Voodoo,8922,15000,1;Snakebite rod,2182,500,1;Moonlight rod,2186,1000,1;Necrotic rod,2185,5000,1;Northwind rod,8911,5000,1;Terra rod,2181,10000,1;Hailstorm rod,2183,15000,1;Springsprout Rod,8912,15000,1;Underworld Rod,8910,15000,1;Health potion,7618,45,1;Strong health potion,7588,100,1;Great health potion,7591,190,1;Ultimate health potion,8473,310,1;Mana potion,7620,50,1;Strong mana potion,7589,80,1;Great mana potion,7590,120,1;great spirit potion,8472,190,1;"/>

<parameter key="shop_sellable" value="

empty potion flask,7636,5;

empty potion flask,7478,5;

empty potion flask,7635,5;

empty potion flask,7634,5;

---Wand-Rod---

 

Wand of Vortex,2190,200;Wand of Dragonbreath,2191,500;Wand of Decay,2188,1000;Wand of Draconia,8921,1000;Wand of Cosmic Energy,2189,5000;Wand of Inferno,2187,5000;Wand of Starstorm,8920,5000;Wand of Voodoo,8922,5000;Snakebite rod,2182,200;Moonlight rod,2186,500;Necrotic rod,2185,1000;Northwind rod,8911,1000;Terra rod,2181,3000;Hailstorm rod,2183,5000;Springsprout Rod,8912,5000;Underworld Rod,8910,5000;

"/>

</parameters>

</npc>

 

 

E o outro:

 

Servfull 2.4\data\npc\scripts

 

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)

 

shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 22000, 'wand of voodoo')

shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno')

shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 5000, 'wand of decay')

shopModule:addBuyableItem({'wand of draconia', 'plague'}, 8921, 7500, 'wand of draconia')

shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 18000, 'wand of starstorm')

shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic'}, 2189, 10000, 'wand of cosmic energy')

shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex')

shopModule:addBuyableItem({'wand of dragonbreath', 'dragon'}, 2191, 1000, 'wand of dragonbreath')

shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 7500, 'northwind rod')

shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 22000, 'underworld rod')

shopModule:addBuyableItem({'hailstorm rod', 'hailstorm rod'}, 2183, 15000, 'hailstorm rod')

shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 10000, 'terra rod')

shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod')

shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 5000, 'necrotic rod')

shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod')

shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 18000, 'springsprout rod')

shopModule:addBuyableItem({'ultimate health potion', 'uhp'}, 8473, 310, 'ultimate health potion')

shopModule:addBuyableItem({'great health potion', 'ghp'}, 7591, 190, 'great health potion')

shopModule:addBuyableItem({'strong health potion', 'shp'}, 7588, 100, 'strong health potion')

shopModule:addBuyableItem({'health potion', 'hp'}, 7618, 45, 'health potion')

shopModule:addBuyableItem({'great spirit potion', 'gsp'}, 8472, 190, 'great spirit potion')

shopModule:addBuyableItem({'great mana potion', 'gmp'}, 7590, 120, 'great mana potion')

shopModule:addBuyableItem({'strong mana potion', 'smp'}, 7589, 80, 'strong mana potion')

shopModule:addBuyableItem({'mana potion', 'mp'}, 7620, 50, 'mana potion')

shopModule:addBuyableItem({'light wand', 'lightwand'}, 2163, 500, 'magic light wand')

shopModule:addBuyableItem({'heavy magic missile', 'hmm'}, 2311, 150, 10, 'heavy magic missile rune')

shopModule:addBuyableItem({'great fireball', 'gfb'}, 2304, 200, 5, 'great fireball rune')

shopModule:addBuyableItem({'explo', 'xpl'}, 2313, 250, 6, 'explosion rune')

shopModule:addBuyableItem({'ultimate healing', 'uh'}, 2273, 200, 1, 'ultimate healing rune')

shopModule:addBuyableItem({'sudden death', 'sd'}, 2268, 500, 3, 'sudden death rune')

shopModule:addBuyableItem({'blank', 'rune'}, 2260, 10, 'blank rune')

shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook')

 

npcHandler:addModule(FocusModule:new())

 

 

Abraço ! :positive:

Link para o comentário
Compartilhar em outros sites

Amigo acho que isso pode te ajudar.

 

data/npc.

 

 

<npc name="Dark Rodo" script="data/npc/scripts/runes.lua" access="5" lookdir="1">

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

<look type="133" head="0" body="86" legs="0" feet="38" addons="1"/>

</npc>

 

 

 

data/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

 

local shopModule = ShopModule:new()

npcHandler:addModule(shopModule)

 

shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 22000, 'wand of voodoo')

shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno')

shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 5000, 'wand of decay')

shopModule:addBuyableItem({'wand of draconia', 'plague'}, 8921, 7500, 'wand of draconia')

shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 18000, 'wand of starstorm')

shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic'}, 2189, 10000, 'wand of cosmic energy')

shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex')

shopModule:addBuyableItem({'wand of dragonbreath', 'dragon'}, 2191, 1000, 'wand of dragonbreath')

shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 7500, 'northwind rod')

shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 22000, 'underworld rod')

shopModule:addBuyableItem({'hailstorm rod', 'hailstorm rod'}, 2183, 15000, 'hailstorm rod')

shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 10000, 'terra rod')

shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod')

shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 5000, 'necrotic rod')

shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod')

shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 18000, 'springsprout rod')

shopModule:addBuyableItem({'ultimate health potion', 'uhp'}, 8473, 310, 'ultimate health potion')

shopModule:addBuyableItem({'great health potion', 'ghp'}, 7591, 190, 'great health potion')

shopModule:addBuyableItem({'strong health potion', 'shp'}, 7588, 100, 'strong health potion')

shopModule:addBuyableItem({'health potion', 'hp'}, 7618, 45, 'health potion')

shopModule:addBuyableItem({'great spirit potion', 'gsp'}, 8472, 190, 'great spirit potion')

shopModule:addBuyableItem({'great mana potion', 'gmp'}, 7590, 120, 'great mana potion')

shopModule:addBuyableItem({'strong mana potion', 'smp'}, 7589, 80, 'strong mana potion')

shopModule:addBuyableItem({'mana potion', 'mp'}, 7620, 50, 'mana potion')

shopModule:addBuyableItem({'light wand', 'lightwand'}, 2163, 500, 'magic light wand')

shopModule:addBuyableItem({'heavy magic missile', 'hmm'}, 2311, 150, 10, 'heavy magic missile rune')

shopModule:addBuyableItem({'great fireball', 'gfb'}, 2304, 200, 5, 'great fireball rune')

shopModule:addBuyableItem({'explo', 'xpl'}, 2313, 250, 6, 'explosion rune')

shopModule:addBuyableItem({'ultimate healing', 'uh'}, 2273, 200, 1, 'ultimate healing rune')

shopModule:addBuyableItem({'sudden death', 'sd'}, 2268, 500, 3, 'sudden death rune')

shopModule:addBuyableItem({'blank', 'rune'}, 2260, 10, 'blank rune')

shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook')

 

npcHandler:addModule(FocusModule:new())

 

 

Editado por erro de spolier

Adicionado como QUOTE

 

@marcioiv

@gnomow157

Seu NPC esta vendendo tudo em doblo pelo qual o npc system esta executando 2 vezes por causa que ah 2 trade modo no seu npc ele executa o script e também executa o Dark Rodo.xml

 

 

Espero ter ajudado os dois :smile_positivo:

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

VLW PSY MAGIC

 

RESOLVEU O PROBLEMA

 

MUITO OBRIGADO

 

ABRAÇO !!!!

 

 

De nada fico muito feliz em ter ajudado vocês estamos aqui para isso mesmo ajudarmos uns aos outros...

 

OBS:Esse sistema novo executa o script da pasta data/npc/script e também vem a executar o "<parameters>" dentro do xml do NPC.

Link para o comentário
Compartilhar em outros sites

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