Tópico contendo somente 1 NpC,
essa seção é para DataPacks com 3 ou mais Npcs,
~o{Tópico Movido}o~,
Abraços.
info
Grupo: Herói
Registrado: 12/11/05
Posts: 715
Reputação: +1
Char no Tibia: Lord'Skyxt

Tópico contendo somente 1 NpC,
essa seção é para DataPacks com 3 ou mais Npcs,
~o{Tópico Movido}o~,
Abraços.
info
Grupo: Campones
Registrado: 20/08/06
Posts: 2
Reputação: 0
Gênero: Masculino
Primeiro va na pasta data/npc e copie qualquer npc de la.
Ai vc abre e coloca isso aki o:
Ai vc feixa e renomeia o npc com o nome "Treinador.xml".
agora va na pasta data/npc/scripts e copie qualquer arquivo de la.Apage tudo e coloque o seguinte:
-- the id of the creature we are attacking, following, etc.focus = 0talk_start = 0target = 0following = falseattacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction onCreatureSay(cid, type, msg) msg = string.lower(msg) if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Ola vendo Treiners para vc treinar. Cada um por 1k.') selfSay('Vc quer?') focus = cid talk_start = os.clock() endif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. creatureGetName(cid) .. '! Te atendo agorinha') end if msgcontains(msg, 'yes') and focus == cid then buy(cid,3520,1,1000) selfSay('/m treiner') talk_start = os.clock() end if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 endendfunction onCreatureChangeOutfit(creature)endfunction onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 endif focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 endendendFexe e depois renomei o arquivo e coloque o nome "treina.lua"
agora na na pasta data/world e abra o arquivo NPC.XML e coloque o seguinte:
Agora va na pasta data/monster abre qualquer monstro com wordpad de la.Renomeie para "Treiner" salve-o Treiner.xml.Abra ele e apage tudo e coloque o seguinte:
Salve ,Fexe e esta pronto seu npc q vende treiner cada 1 por 1k.
Comentem!!!