Npc 1 : copie qualquer arquivo e renomeio para Rodolfo e cole isto:
vip city = {x=280, y=86, z=4}ice island = {x=561, y=53, z=7}
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos, cid, item, frompos, item2, topos)
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('Hiho ' .. getCreatureName(cid) .. '! Eu posso te levar para Vip City,Ice Island. Lembrando que a viagem custa 50 gps.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'vip city') then
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
doTeleportThing(cid,vip city)
doSendMagicEffect(vip city,10)
selfSay("Let's GO")
focus = 0
talk_start = 0
else
selfSay("Sorry, you don\'t have enough money.")
end
elseif msgcontains(msg, 'ice island') then
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
doTeleportThing(cid,ice island)
doSendMagicEffect(ice island,10)
selfSay("Let's GO")
focus = 0
talk_start = 0
else
selfSay("Sorry, you don\'t have enough money.")
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Adeus ' .. creatureGetName(cid) .. ', Volte Sempre.')
focus = 0
talk_start = 0
elseif msg ~= "" then
selfSay('Como? Eu não entendi!')
talk_state = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo!!...')
end
focus = 0
talk_start = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good Bye')
focus = 0
talk_start = 0
end
end
end
em xml copie qualquer arquivo renomeio para Rodolfo e cole isto:
<?xml version="1.0" encoding="UTF-8"?><npc name="Capitao Rodolfo" script="data/npc/scripts/Rodolfo.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="132" head="20" body="39" legs="45" feet="7" addons="0"/>
<parameters>
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="hi" />
<parameter key="keyword_reply1" value="Hello!." />
</parameters>
</npc>
NPC 2: copie qualquer arquivo e renomeio para Andre e cole isto:
jungle = {x=132, y=175, z=7}ilha perdida = {x=174, y=173, z=7}
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos, cid, item, frompos, item2, topos)
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('Hiho ' .. getCreatureName(cid) .. '! Eu posso te levar para Jungle City e Ilha perdida. Lembrando que a viagem custa 50 gps.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'jungle') then
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
doTeleportThing(cid,jungle)
doSendMagicEffect(jungle,10)
selfSay("Let's GO")
focus = 0
talk_start = 0
else
selfSay("Sorry, you don\'t have enough money.")
end
elseif msgcontains(msg, 'ilha perdida') then
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
doTeleportThing(cid,ilha perdida)
doSendMagicEffect(ilha perdida,10)
selfSay("Let's GO")
focus = 0
talk_start = 0
else
selfSay("Sorry, you don\'t have enough money.")
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Adeus ' .. creatureGetName(cid) .. ', Volte Sempre.')
focus = 0
talk_start = 0
elseif msg ~= "" then
selfSay('Como? Eu não entendi!')
talk_state = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo!!...')
end
focus = 0
talk_start = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good Bye')
focus = 0
talk_start = 0
end
end
end
em xml copie qualquer arquivo renomeio para Andre e cole isto:
<?xml version="1.0" encoding="UTF-8"?><npc name="Capitao Andre" script="data/npc/scripts/Andre.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="132" head="20" body="39" legs="45" feet="7" addons="0"/>
<parameters>
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="hi" />
<parameter key="keyword_reply1" value="Hello!." />
</parameters>
</npc>






info
Grupo: Campones
Registrado: 23/01/10
Posts: 6
Reputação: 0
Char no Tibia: Knight The Aldora
PLEASE 2 NPC BOAT DESCRIÇOES
1 QUE LEVE PARA Vip City(280,86,4) Ice Island (561,53,7)
2° leve para jungle city(,132,175,7)ilha perdida(174,173,7)"/>