GM Rotvic me desculpa ai mais é que tipo nu meu eu fiz isso ]mas dava erro ai eu descobri 1 coisa... não sei se é pq eu uso mtk mais tem que por otra coisa nu meu ot rpa ele teletransporta intão eu fiz 1 copia do seu só arrumando as coisas devidas
ISSO TUDO EH GRAÇAS A GM ROTVIC.. SE FOR ELOGIAR, ELOGIE ELE Ñ EU POIS SÓ COPIEI E ARRUMEI..
CREDITS À VC GM ROTVIC
eh o seguinte!abra um arquivo XML
e coloque o seguinte:
CODE<?xml version="1.0"?>
<npc name="Fargum" script="data/npc/scripts/boat_city.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="129" head="114" body="119" legs="114" feet="114"/>
</npc>
Explicação:
npc name="Fargum" --> Local que você coloca o nome do NPC entre os ""
<look type="129" --> onde ta esse 129, você pode por qualquer número...exemplo, se você colocar 35, o NPC vai ficar com formato de Demon, se não me engano!
script="data/npc/scripts/nome.lua" --> local em que o script está
Agora crie um arquivo lua e coloque dentro da pasta NPC -> Scripts
abra o arquivo lua e coloque:
QUOTE
focus = 0
talk_start = 0
target = 0
following = false
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 ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I can take you to Dragon Land (50gps). Where do you want to go?')
focus = cid
talk_start = os.clock()
end
if string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
end
if msgcontains(msg, 'dragon land') and focus == cid then
if pay(cid,50) then
selfSay('Let\'s go!')
selfSay('/U 5794617 '.. creatureGetName(cid) .. '')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
talk_start = os.clock()
end
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
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
Onde está em Laranja eh a palavra em que o player tem que falar para pode viajar entre ''
no caso do exemplo ele tem que falar 'dragon land'
onde ta em Verde eh o preço da passagem... ou seja o 50 eh o preço da passagem..50 gps, mude para quanto voce quiser! sempre deixando o preço em gps! exemplo, se voce quiser colocar o preço em 1k...coloque 1000 gps
onde está em Azul eh para onde o player vai ser enviado!
Para por 1 cordenada é só escrever ela normal tipo 579 461 7 e na hora de por lá só tire os espaços pra ela fikar assim: 5794617
escolha qualquer posição e faça o msmo
Era akele comando /send quet tava dando erro aqui então eu ajeitei ele dakele jeito
CREDITOS BY GM ROTCIV