Ir para conteúdo
  • 0

[Resolvido] [Ajuda] Sobre Npc de outfits Tfs 0.4 8.6


Pergunta

Boa Tarde! 

ajuda por favor ja fiz de tudo procurei em varios lugares mas nao achei queria npc que dava outfits

jogado chegava npc

 

Jogador: Ola

Npc/ Barbaro: Ola |PLAYERNAME| voce conseguiu chega ater aqui parabens sou Barbaro que destruir Orfeu vamos pula com esse assuntos  vc ja saber de tudo 

tenho uma coisa para voce minha roupa vc gostaria de {adquirir} ela ?

jogador: adquirir

Npc/ Barbaro: para adquirir minha roupa nao vai ser facil tem certeza?

jogado: Sim ou Nao

se jogado fala nao npc

Resposta do Npc/ Barbaro: voltei quando tive certeza

se jogado fala sim 

Resposta do Npc/ Barbaro: vc precisa de um Capacete Do Barbaro e um 1 Capa Do Barbaro

se jogado tive itens npc vai da  outfit do barbaro para ele ( Jogado pode ser free ou p.a )

jogador: tenta pega de novo ( npc fala que ele ja pegou se ele tive ja feito)

 

outfits.xml

	<outfit id="8" default="0">		<list gender="0" lookType="147" name="Barbara"/>		<list gender="1" lookType="143" name="Barbaro"/>	</outfit>

items.xml

1 <item id="12672" article="a" name="Capa Do Barbaro" plural="Capa Do Barbaro">1 <item id="12664" article="a" name="Capacete Do Barbaro" plural="Capacete Do Barbaro">
Link para o comentário
https://xtibia.com/forum/topic/246103-resolvido-ajuda-sobre-npc-de-outfits-tfs-04-86/
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0
16 horas atrás, soaresdk disse:

testa aki ja edito

 

 

conseguir edita essa parte 

  Ocultar conteúdo

    <outfit id="8" storageId="31013" storageValue="1">

        <list gender="0" lookType="147" name="Barbara"/>

        <list gender="1" lookType="143" name="Barbaro"/>

    </outfit>

 

ai npc remover itens certo e da outfit tudo normal mas quando jogado vai fala com ele de novo ele pega itens de novo e nao fala " Voce ja tem a Outflit "

parecendo que ele da de novo outfit.

 

local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid)         npcHandler:onCreatureAppear(cid)         endfunction onCreatureDisappear(cid)      npcHandler:onCreatureDisappear(cid)         endfunction onCreatureSay(cid, type, msg)   npcHandler:onCreatureSay(cid, type, msg:lower())   endfunction onThink()                  npcHandler:onThink()                  endlocal talkState = {} function creatureSayCallback(cid, type, msg)   if(not npcHandler:isFocused(cid)) then      return false   end    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid    if msgcontains(msg, "yes") and (getPlayerItemCount(cid, 12672) >= 1) and (getPlayerItemCount(cid, 12664) >= 1) and getPlayerStorageValue(cid, 56422) <=0 then        doPlayerRemoveItem(cid, 12672, 1)        doPlayerRemoveItem(cid, 12664, 1)        setPlayerStorageValue(cid, 56422, 1)        selfSay("AAHHHH. Muito obrigado voce conseguil os items, toma aqui sua Red senzu !!.", cid)    elseif msgcontains(msg, "yes") and (getPlayerItemCount(cid, 12672) < 1) or (getPlayerItemCount(cid, 12664) < 1) and getPlayerStorageValue(cid, 56422) <=0 then        selfSay("Ops.....", cid)    elseif getPlayerStorageValue(cid, 56422) >= 1 then        selfSay("Voce ja tem a Outflit", cid)    end   return trueend npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new())

 

  • 0

 

<outfit id="8" default="0" quest="56422">        <list gender="0" lookType="147" name="Barbara"/>        <list gender="1" lookType="143" name="Barbaro"/>    </outfit>

 

 

 

local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid)         npcHandler:onCreatureAppear(cid)         endfunction onCreatureDisappear(cid)      npcHandler:onCreatureDisappear(cid)         endfunction onCreatureSay(cid, type, msg)   npcHandler:onCreatureSay(cid, type, msg:lower())   endfunction onThink()                  npcHandler:onThink()                  endlocal talkState = {} function creatureSayCallback(cid, type, msg)   if(not npcHandler:isFocused(cid)) then      return false   end    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid    if msgcontains(msg, "yes") and (getPlayerItemCount(cid, 12672) >= 1) and (getPlayerItemCount(cid, 12664) >= 1) then        doPlayerRemoveItem(cid, 12672, 1)        doPlayerRemoveItem(cid, 12664, 1)        setPlayerStorageValue(cid, 56422, 1)        selfSay("AAHHHH. Muito obrigado voce conseguil os items, toma aqui sua Red senzu !!.", cid)    elseif msgcontains(msg, "yes") and (getPlayerItemCount(cid, 12672) < 1) or (getPlayerItemCount(cid, 12664) < 1) then        selfSay("Ops.....", cid)    elseif getPlayerStorageValue(cid, 56422) >= 1 then        selfSay("Voce ja tem a Outflit", cid)    end   return trueend npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new())

 

  • 0

testa aki ja edito

 

 

conseguir edita essa parte 

Spoiler

    <outfit id="8" storageId="31013" storageValue="1">
        <list gender="0" lookType="147" name="Barbara"/>
        <list gender="1" lookType="143" name="Barbaro"/>
    </outfit>

 

ai npc remover itens certo e da outfit tudo normal mas quando jogado vai fala com ele de novo ele pega itens de novo e nao fala " Voce ja tem a Outflit "

parecendo que ele da de novo outfit.

Editado por soaresdk
  • 0
7 horas atrás, Crypter disse:

 

local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid)         npcHandler:onCreatureAppear(cid)         endfunction onCreatureDisappear(cid)      npcHandler:onCreatureDisappear(cid)         endfunction onCreatureSay(cid, type, msg)   npcHandler:onCreatureSay(cid, type, msg:lower())   endfunction onThink()                  npcHandler:onThink()                  endlocal talkState = {} function creatureSayCallback(cid, type, msg)   if(not npcHandler:isFocused(cid)) then      return false   end    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid    if msgcontains(msg, "yes") and (getPlayerItemCount(cid, 12672) >= 1) and (getPlayerItemCount(cid, 12664) >= 1) and getPlayerStorageValue(cid, 56422) <=0 then        doPlayerRemoveItem(cid, 12672, 1)        doPlayerRemoveItem(cid, 12664, 1)        setPlayerStorageValue(cid, 56422, 1)        selfSay("AAHHHH. Muito obrigado voce conseguil os items, toma aqui sua Red senzu !!.", cid)    elseif msgcontains(msg, "yes") and (getPlayerItemCount(cid, 12672) < 1) or (getPlayerItemCount(cid, 12664) < 1) and getPlayerStorageValue(cid, 56422) <=0 then        selfSay("Ops.....", cid)    elseif getPlayerStorageValue(cid, 56422) >= 1 then        selfSay("Voce ja tem a Outflit", cid)    end   return trueend npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new())

 

  

 

deu Certo Muito Obrigado +rep

como da rep aperto em 

  • Reputação: +  75

  • nao munda ??

Editado por soaresdk
  • 0

O pedido neste tópico de foi atendido e/ou o autor do tópico resolveu sua duvida. Este tópico está fechado e foi movido para Pedidos - Resolvidos. Se você tiver outros pedidos, crie um novo tópico.
Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...