Ir para conteúdo
  • Cadastre-se

ajuda urgente sobre npc


Posts Recomendados

acabei de notar que nao sao so o rashid e os djins ... todos os npcs falam isso

 

00:49 Xodet: Welcome, Mage Hell! I have been expecting you.
00:49 Mage Hell [39]: trade
00:49 Xodet: you can't trade with me.

 

como resolvi isso? ajuuuda por fvro


detalhe: notei agora que eles aceitam o primeiro trade.. depois nao da mais ..


niguem ? ninguem ? :(((

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

Descobri a solução desse problema! O problema ocorre com a storage do Rashid. Quando voce abre o server, voce consegue comprar itens normais dos npcs.

O problema acontece quando voce fala com o rashid! Quando vc fala com o rashid, (e se o seu otserver tiver sistema de missões no rashid, ou seja, se para voce poder negociar com ele vc precisa terminar as missoes), ele vai falar "sorry, you cant trade with me"

A partir disso, se vc falar com outro npc ele também dira "sorry, you cant trade with me"

 

Então esse bug está relacionado com o rashid. Como resolver?

 

vá para data/npc/lib/npcsystem e abra o arquivo modules.lua.

 

Procure nesse arquivo que voce abriu a parte mais ou menos assim:
 

[B]-[[ Checking for Storage]]--
local storage = 9032 -- storage here djinn
local storage2 = 100007
local npc = {""} -- names of npc's that will have this enabled
local npc2 = {"rashid"} -- names of npc's that will have this enabled
local npc3 = {""} -- names of npc's that will have this enabled
for i = 1,#npc do
if string.lower(getCreatureName(getNpcId())) == string.lower(npc[I]) then
check = true
break
end
end

for i = 1,#npc2 do
if string.lower(getCreatureName(getNpcId())) == string.lower(npc2[I]) then
check2 = true
break
end
end


for i = 1,#npc3 do
if string.lower(getCreatureName(getNpcId())) == string.lower(npc3[I]) then
check3 = true
break
end
end

if check == true then
if getPlayerStorageValue(cid,storage) >= 8 then
--He can trade!
else
selfSay("you can't trade with me.",cid)
return false
end
end

if check2 == true then
if getPlayerStorageValue(cid,storage2) >= 12 then
--He can trade!
else
selfSay("you can't trade with me.",cid)
return false
end
end

if check3 == true then
if getPlayerStorageValue(cid,100062) >= 11 then
--He can trade!
else
selfSay("you can't trade with me.",cid)
return false
end
end


Ao encontrar isso, substitua TUDO por:



--[[ Checking for Storage]]--

     local storage = 100007
     local npc = {"Rashid"} -- names of npc's that will have this enabled

     if string.lower(getCreatureName(getNpcId())) == string.lower(npc[1]) then
  if getPlayerStorageValue(cid,storage) >= 12 then
  --He can trade!
  else
  selfSay("Sorry, you can only trade with me when you finish the {mission}.",cid)
  return false
  end
end


     --[[ End ]]--


Pronto! salve, reabra seu servidor, e o bug sumirá!
Editado por 1268995 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

muito bom, nao testei, troquei de server porque procurei demais sobre ese bug e nao consegui arrumar, mais si realmente funcionar, parabens!

Link para o post
Compartilhar em outros sites
  • 1 month later...

 

Descobri a solução desse problema! O problema ocorre com a storage do Rashid. Quando voce abre o server, voce consegue comprar itens normais dos npcs.

O problema acontece quando voce fala com o rashid! Quando vc fala com o rashid, (e se o seu otserver tiver sistema de missões no rashid, ou seja, se para voce poder negociar com ele vc precisa terminar as missoes), ele vai falar "sorry, you cant trade with me"

A partir disso, se vc falar com outro npc ele também dira "sorry, you cant trade with me"

 

Então esse bug está relacionado com o rashid. Como resolver?

 

vá para data/npc/lib/npcsystem e abra o arquivo modules.lua.

 

Procure nesse arquivo que voce abriu a parte mais ou menos assim:

 

[B]-[[ Checking for Storage]]--
local storage = 9032 -- storage here djinn
local storage2 = 100007
local npc = {""} -- names of npc's that will have this enabled
local npc2 = {"rashid"} -- names of npc's that will have this enabled
local npc3 = {""} -- names of npc's that will have this enabled
for i = 1,#npc do
if string.lower(getCreatureName(getNpcId())) == string.lower(npc[I]) then
check = true
break
end
end

for i = 1,#npc2 do
if string.lower(getCreatureName(getNpcId())) == string.lower(npc2[I]) then
check2 = true
break
end
end


for i = 1,#npc3 do
if string.lower(getCreatureName(getNpcId())) == string.lower(npc3[I]) then
check3 = true
break
end
end

if check == true then
if getPlayerStorageValue(cid,storage) >= 8 then
--He can trade!
else
selfSay("you can't trade with me.",cid)
return false
end
end

if check2 == true then
if getPlayerStorageValue(cid,storage2) >= 12 then
--He can trade!
else
selfSay("you can't trade with me.",cid)
return false
end
end

if check3 == true then
if getPlayerStorageValue(cid,100062) >= 11 then
--He can trade!
else
selfSay("you can't trade with me.",cid)
return false
end
end


Ao encontrar isso, substitua TUDO por:



--[[ Checking for Storage]]--

     local storage = 100007
     local npc = {"Rashid"} -- names of npc's that will have this enabled

     if string.lower(getCreatureName(getNpcId())) == string.lower(npc[1]) then
  if getPlayerStorageValue(cid,storage) >= 12 then
  --He can trade!
  else
  selfSay("Sorry, you can only trade with me when you finish the {mission}.",cid)
  return false
  end
end


     --[[ End ]]--


Pronto! salve, reabra seu servidor, e o bug sumirá!

 

Só pra quando passarem no tópico saberem que isso é funcional ...

Editado por Smart Maxx (veja o histórico de edições)

btn_donate_LG.gif

 
 
 

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo