CREDITOS 100% MEUS
NAO ACEITO COPIA TOPICO EXCLUSIVO DO XTIBIA
Bom como vi muitas pessoas pedindo npc de recaregar a soft boots resolvi postar um aqui...
1° Abra a pasta data/npc de CTRL + C em qualquer arquivo .xml e CTRL + V renomeie para um nome (no caso o nome do npc) depois clique com o botão direito e clique em editar, vai abrir um bloco de notas, apague tudo e cole issu
<npc name="Recaregador" script="data/npc/scripts/softboots.lua" floorchange="0" access="5" level="1" maglevel="1"><health now="150" max="150"/>
<look type="151" head="114" body="1" legs="1" feet="76" addons="1" corpse="2212"/>
<parameters>
<parameter key="message_greet" value="Olá |PLAYERNAME|. eu sou specializado em botas." />
</parameters>
</npc>
TraduçãoRecarregador - Nome do NPC
data/npc/scripts/softboots.lua - loca onde o arquivo .lua do npc está localizado
<look type="151" head="114" body="1" legs="1" feet="76" addons="1" corpse="2212"/> - outfit do npc
Olá |PLAYERNAME|. eu sou specializado em botas - o que o npc vai dizer quando o player dizer "HI"
2° abra a pasta data/npc/scripts lá copie qualquer arquivo e cole (CTRL + C e CTRL + V) abra o arquivo como bloco de notas apague tudo e cole issu
-- by ADM LEO leonardo caetano
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end
if msgcontains(msg, 'specialised') or msgcontains(msg, 'boot') then
selfSay('Sim, meu pai foi um grande ferreiro, ele era specializado em botas , ele decidiu me ensinar a speciaria dele em botas pois viu que sua morte estava proxima e agora eu sou um fanatico por botas e tenho como revitalizar a worn soft boots.')
elseif msgcontains(msg, 'worn soft boots') or msgcontains(msg, 'worn soft boot') then
selfSay('Você gostaria de trocar sua Worn Soft Boots por uma Soft Boots? isto lhe custara 500k.')
talk_state = 1
elseif msgcontains(msg, 'yes') and talk_state == 1 then
if getPlayerItemCount(cid,6530) >= 1 and getPlayerItemCount(cid,2160) >= 50 then
if doPlayerTakeItem(cid,6530,1) and doPlayerTakeItem(cid,2160,50) == 0 then
selfSay('Aqui está.')
doPlayerAddItem(cid,2640,1)
end
else
selfSay('Desculpe, você não tem os itens requeridos.')
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok.')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Vermelho - ID da worn soft boots
azul claro - as falas do PLAYER
verde - ID do dinheiro (2160 no caso é cristal)
laranja - O tanto de dinheiro que vai ser removido (no caso 50 cristais)
rosa - ID da Soft Boots
roxo - Quantas Worn soft boots que vai ser removidas
azul um pouco mais escuro - As falas do NPC
Aceito criticas e sugestões
Por favor deem suas notas [/b]
EDIT: COMO ALGUMAS CORES DO 1° QUOTE NÃO ESTÁ SAINDO VOU DEIXAR SEM MAS ENSINANDO COMO EDITAR.