Sim, ele pode
mas você fez o post no local errado a proxima vez poste no lugar certo!
Proxima vez poste aqui ( http://www.xtibia.com/forum/index.php?showforum=4 )
vo resolve ja seu problema
![]()
va no script do seu vendedor de muniçao para pally e apague tudo e cole isto;
focus = 0talk_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 (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I sell arrows (150gps), bolts (200gps), spears (500gps), Throwing Stars (200gps), Throwing Knifes (200gps), Poison Arrows (150gps), Burst Arrows (300gps) and Power Bolts (500gps), each have 100x, crossbows (200gps), bows (100gps)')
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, 'throwing stars') then
buy(cid,2399,100,200)
elseif msgcontains(msg, 'throwing knifes') then
buy(cid,2410,100,200)
elseif msgcontains(msg, 'poison arrows') then
buy(cid,2545,100,150)
elseif msgcontains(msg, 'burst arrows') then
buy(cid,2546,100,300)
elseif msgcontains(msg, 'power bolts') then
buy(cid,2547,100,500)
elseif msgcontains(msg, 'bow') then
buy(cid,2456,1,100)
elseif msgcontains(msg, 'crossbow') then
buy(cid,2455,1,200)
elseif msgcontains(msg, 'arrows') then
buy(cid,2544,100,150)
elseif msgcontains(msg, 'bolts') then
buy(cid,2543,100,200)
elseif msgcontains(msg, 'spears') then
buy(cid,2389,100,500)
elseif msgcontains(msg, 'bye') and focus == cid 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
espero ter te ajudado
:w4:






info
Grupo: Campones
Registrado: 02/09/06
Posts: 0
Reputação: 0
O npc que vende artigos de munição em geral, poderia vender burst arrows tambem não?