Aeee
To disponibilizando o The Oracle !
Totalmente Editado e com NOVAS ADIÇÕES FODAS =]
--1º Ele da exp 5000 Mil de exp quando voce passa por ele
--2º Ele aviza a todos que um novo player começou a jogar e fala o nome do Player
entaum ai vai o code
Pasta do ot/Data/Npc Copie um Bloco de Notas,
e ponha o nome de: "The_Oracle"
focus = 0talk_start = 0target = 0following = falseattacking = falsetalk_state = 0cname = ''vocation = 0mainlevel = 8function onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos) if focus == cid then selfSay('Ateh mais.') 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) cname = creatureGetName(cid)msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Ola ' .. cname .. 'Pra onde voce deseja ir?') talk_state = 0 focus = cid talk_start = os.clock()elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Pera ' .. cname .. ',me da um minuto porfavor.') elseif msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 4 then selfSay('Ateh mais, ' .. cname .. '!') talk_state = 0 focus = 0 talk_start = 0 elseif focus == cid then talk_start = os.clock() if talk_state == 0 then if msgcontains(msg, 'yes') then -- vamos para main land xD level = getPlayerLevel(cname) if level >= mainlevel then selfSay('Escolha knight, sorcerer, druid ou paladin') talk_state = 1 else selfSay('Desculpa, Voce Precisa de lv ' .. mainlevel .. '.') talk_state = 0 end else selfSay('Volte com o lv ' .. mainlevel .. '.') talk_state = 0 end elseif talk_state == 1 then -- telling vocation talk_state = 2 if msgcontains(msg, 'sorcerer') then selfSay('voce tem certesa?') vocation = 1 elseif msgcontains(msg, 'druid') then selfSay('voce tem certesa?') vocation = 2 elseif msgcontains(msg, 'paladin') then selfSay('voce tem certesa?') vocation = 3 elseif msgcontains(msg, 'knight') then selfSay('voce tem certesa?') vocation = 4 else selfSay('essa vocação não existe.') vocation = 0 talk_state = 1 end elseif talk_state == 2 then -- confirme sua vocação if msgcontains(msg, 'yes') then selfSay('Voce tem certesa que deseja ir a city?') talk_state = 3 else selfSay('escolha uma vocação') talk_state = 1 end elseif talk_state == 3 then -- telling city name if msgcontains(msg, 'yes') then selfSay('Bem-vindo a cidade') setPlayerVocation(cid,vocation) setPlayerMasterPos(cid,X,Y,Z) -- o X,Y,Z do seu templo selfSay('/send ' .. cname .. ', X Y Z') selfSay('/giveexp 5000 ' .. cname .. '') selfSay('/B Temos um novo Player o : ' .. cname .. ' ') talk_state = 0 focus = 0 talk_start = 0 else selfSay('Sorry, there is no such city.') talk_state = 3 end end endendfunction onCreatureChangeOutfit(creature)endfunction onThink() if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Proximo') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Ateh mais.') focus = 0 end endend
Pasta do ot/Data/Npc Copie um XML,
e ponha o nome de: "The Oracle"
<?xml version="1.0" ?><npc name="The Oracle" script="data/npc/scripts/the_oracle.lua" access="3"><look type="1448" head="57" body="59" legs="40" feet="76" /></npc>
Agora na Pasta do ot/Data/World abra e add essa Tag
<npc name="The Oracle" x="X" y="Y" z="Z" dir="2" />
X,Y,Z são as pocições os tiles do mapa é isso que mede tudo
X = De la <- para ca ->
Y = De cima para baixo
Z = Os andares 7 Terreo 6 um andar a cima 8 um andar a baixo
======//=======//======//=====//=======
DIR = o lado que o npc esta virado
1 = Lado D. (->)
2 = Baixo (\/)
3 = Lado E. (<-)
4 = Cima (/\)
Flww pessoal ate mais espero ter ajudado !
Duvida???
POsTe
Atenciosamente, Dudu
vlww