AD

ola possa me ajudar erro npc ja fis de varias forma sebre mesmo erro add npc

Por ADMP0KEWOOD, 06 de jan. de 2023 em Scripts

4
1.4k
ADMP0KEWOODA
06 de janeiro de 2023 às 12:37

 aqui  ta erro não conseguido decifra   

 

[Warning - Npc::loadFromXml] Cannot load npc file (data/npc/Seller Super Rox.xml).
 Info: failed to load external entity "data/npc/Seller Super Rox.xml"   

 

 mandar anexar escrip npc  

chopin.xml itemsvip.lua

BrunoBrilhaB
06 de janeiro de 2023 às 16:10
3 horas atrás, ADMP0KEWOOD disse:

 aqui  ta erro não conseguido decifra   

 

[Warning - Npc::loadFromXml] Cannot load npc file (data/npc/Seller Super Rox.xml).
 Info: failed to load external entity "data/npc/Seller Super Rox.xml"   

 

 mandar anexar escrip npc  

chopin.xml 353 B · 0 downloads itemsvip.lua 1.68 kB · 0 downloads

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
local NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
local itemid = 7759 -- Novos points ( default é pirate coins )
local shopWindow = {}
local t = {
 [346] = {price = 10}, -- [ID do item] e o preço que ele irá custar em points.
 [344] = {price = 20},
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = }
 }
local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
if  t[item] and getPlayerItemCount(cid, itemid) < t[item].price then
selfSay("you do not have "..t[item].price.." pirate coins.", cid)
else
doPlayerAddItem(cid, item)
doPlayerRemoveItem(cid, itemid, (t[item].price))
selfSay("Here you item", cid)
  end
return true
end
if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then
for var, ret in pairs(t) do
table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = 0, name = getItemNameById(var)})
end
openShopWindow(cid, shopWindow, onBuy, onSell)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Tenta com esse agora!

Editado Janeiro 6 por BrunoBrilha

SacaniS
07 de janeiro de 2023 às 08:31

Problema está no arquivo nomeado como Seller Super Rox, tu tem ele na pasta do ot?

ADMP0KEWOODA
07 de janeiro de 2023 às 13:29

ok  vo testar te trago a resposta 

 

22 horas atrás, BrunoBrilha disse:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
local NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
local itemid = 7759 -- Novos points ( default é pirate coins )
local shopWindow = {}
local t = {
 [346] = {price = 10}, -- [ID do item] e o preço que ele irá custar em points.
 [344] = {price = 20},
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = },
 [] = {price = }
 }
local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
if  t[item] and getPlayerItemCount(cid, itemid) < t[item].price then
selfSay("you do not have "..t[item].price.." pirate coins.", cid)
else
doPlayerAddItem(cid, item)
doPlayerRemoveItem(cid, itemid, (t[item].price))
selfSay("Here you item", cid)
  end
return true
end
if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then
for var, ret in pairs(t) do
table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = 0, name = getItemNameById(var)})
end
openShopWindow(cid, shopWindow, onBuy, onSell)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Tenta com esse agora!

 

erro e mesmo sera tsf 0.3.6  não  to conseguido intender  

 

 

 

[ERROR] ORC KING IS OUT OF SQM HOLY SHIT D: ~
 [Warning - Npc::loadFromXml] Cannot load npc file (data/npc/lucas.xml).
 Info: failed to load external entity "data/npc/lucas.xml"
 

to achado erro sistema lib npc  

teria   essas funções no lib:      teria por uma para poder add ese npc no servidor 

Editado Janeiro 7 por ADMP0KEWOOD

nao sera erro sistema lib npc