upkingPhoenix, sempre ressurgindo das cinzasUMarquês
info
Grupo: Marquês
Registrado: 24/10/06
Posts: 1k
Reputação: +14
Char no Tibia: Lord Night Rider
17 de julho de 2007 às 23:20
-- Npc by Upking
local focus = 0
local 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)
-- greeting phrase
if string.find(msg, '(%a*)hi(%a*)') and focus == 0 and string.len(msg) == 2 and getDistanceToCreature(cid) < 4 then
selfSay('Oi ' .. creatureGetName(cid) .. '! Eu compro as seguintes joias:Black Pearl , White Pearl , Small Amethyst , Small Emerald ,Small Ruby,Small Diamons,Small Sapphire.')
selfSay('Diga info para saber informações sobre o npc')
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()
-- Mensages:
buy_error = 'Sorry, you dont have enough money.'
buy_ok = 'Here you are.'
buy_no = 'Ok. Maybe another time.'
--
sell_error = 'Sorry, you dont have that item.'
sell_ok = 'Thanks for this item.'
sell_no = 'Ok. Maybe another time.'
--
-- Joias
if msgcontains(msg, 'sell') and msgcontains(msg, 'small diamond') or msgcontains(msg, 'small diamonds') then
info
Grupo: Marquês
Registrado: 24/10/06
Posts: 1k
Reputação: +14
Char no Tibia: Lord Night Rider
preços = tibia global
por favor nao tirem os créditos
se kiserem testar em otro serv testa aew e posta aqui pra ver se funcionou