Bom galera não se isso vocês vão gostar, mas está aqui !
NPC
1° PASSO - Você irá nessa pasta:
\data\npc\scripts
2° PASSO - Você verá a legenda.
Vermelho, pode editar, não mudará os comandos.
Azul, comandos, cuidado você pode deixar os outros com raiva. Por exemplo: "Hi" é um comando, e mudar para "Oi". Fica muito estranho !
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I sell scarfs (1k) and aols (10k).')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'aol') then
buy(cid,2173,1,10000)
elseif msgcontains(msg, 'scarf') then
buy(cid,2661,1,1000)
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
Bom... é isso, nos outros NPC's é a mesma coisa. Não mudem os nomes dos itens ou comandos, é uma dica.
Se gostarem do tópico, estarei colocando alguns NPC's que eu traduzi.
MONSTROS
1° PASSO - Vá na pasta:
\data\monster
2° PASSO - Escolha o monstro que quer traduzir e clique com o botão direito e coloca EDITAR. OBS: Muitos não falam, então tome cuidado. Só os que tem escrito: voices.
Legendas: Vermelho pode editar, Azul não pode.
VAMOS ABRIR O ARQUIVO DO DEMON.
Você verá isso, quase no final.
<voices interval="1000" chance="10"><voice sentence="Sua alma serah minha!"/>
<voice sentence="HAHUAHUAHUAHUA"/>
</voices>
O meu já está traduzido, mas é assim para maioria dos montros !
Sabe quando o bixo fala em vermelho? Então ele irá mudar essa fala !
ACTIONS
A pedido de favorefty.
1° PASSO - Vai na pasta:
\data\actions\scripts
2° PASSO - Clica no arquivo desejado, por exemplo, vou colocar 2 arquivos. Primeiro o arquivo door.lua. Não vou colocar o arquivo todo!. Só para explicar como é.
3° PASSO - LEGENDAS: Vermelho, pode editar. Azul, não pode editar.
OBS: O meu já está traduzido, mas você deve achar "It is locked." e você muda para, está trancada.
E cuidado nesse neese tradutor, porque está no mapa Yourutz, isso muda em cada mapa, as posições.
Isso é só para ensinar como faz, não copiar.
function onUse(cid, item, frompos, item2, topos)
doorpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253} -- mod by Yurez
doorplayer = getThingfromPos(doorpos)
if doorplayer.itemid > 0 then
doPlayerSendCancel(cid,"Alguem esta obstruindo a porta.")
return 1
end
if item.itemid == 1209 then
if item.actionid == 0 then
doTransformItem(item.uid,1211)
else
doPlayerSendTextMessage(cid,22,"Esta trancada.")
end
elseif item.itemid == 1211 then
doTransformItem(item.uid,1209)
elseif item.itemid == 1250 then
if item.actionid == 0 then
doTransformItem(item.uid,1251)
Agora esse arquivo será de mudar, quando você estiver cheio. Por exemplo: Você come 10 carnes e fala, You are full !?
Vou te ensinar como você traduz.
Vai em:
\data\actions\scripts
1° PASSO - Abra o arquivo, food.lua. Agora desça tudo e você verá no quadro abaixo.
2° PASSO - LEGENDAS. Vermelho pode editar, Azul não pode mexer.
elsereturn 0
end
if (getPlayerFood(cid) + food > MAX_FOOD) then
doPlayerSendCancel(cid,"Voce esta cheio.")
return 1
end
doPlayerFeed(cid,food)
doRemoveItem(item.uid,1)
return 1
end
Bom querem mais alguma tradução?
Eu coloco Aqui =D
Obrigado, espero que gostem e que não exista um tópico igual a esse