aew cara OTIMO script
tipow tteria como fazer unq vendesse os itens de addon? c tive me manda uma pm
flws
info
Grupo: Campones
Registrado: 06/04/07
Posts: 61
Reputação: 0

aew cara OTIMO script
tipow tteria como fazer unq vendesse os itens de addon? c tive me manda uma pm
flws
info
Grupo: Artesão
Registrado: 14/02/07
Posts: 144
Reputação: +3
Char no Tibia: Buster of Flame

aew cara OTIMO scripttipow tteria como fazer unq vendesse os itens de addon? c tive me manda uma pm
flws
cara facim ^^
ta vendu antes de cada ( ) ta escrito sell e so vc colocar buy em tds so q ele vendi pelo msm preço q ele compra
espero ter ajudado ^^
Editado Abril 30 por thedarkhell
info
Grupo: Herói
Registrado: 12/11/05
Posts: 715
Reputação: +1
Char no Tibia: Lord'Skyxt

Tópico contendo somente 1 NpC,
essa seção é para DataPacks com 3 ou mais Npcs,
~o{Tópico Movido}o~,
Abraços.
info
Grupo: Campones
Registrado: 06/05/08
Posts: 22
Reputação: 0
Char no Tibia: Phoenix of Death

te amo me poupou defica 5 anos fazendo isso ![]()
info
Grupo: Artesão
Registrado: 14/02/07
Posts: 144
Reputação: +3
Char no Tibia: Buster of Flame
aee fiz um npc q compra itens de addon como no mapa do xedegux n da pra faze addon com eles e melhor vende td ne^^ eu usu no meu ot e td mundo gosta! poe os itens pra dropa nos bixus certus q fica rox
<?xml version="1.0"?>
<npc name="Patense" script="data/npc/scripts/addonloot.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="145" head="0" body="57" legs="114" feet="0" addon="3" know="3"/>
</npc>
lembrandu q vc tem q criar um script com o nome addonloot e por issu nele
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 (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! Olá eu compro itens de addon, por favor fale o nome do item!.')
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, 'bat wing') then
sell(cid,5894,1,500)
elseif msgcontains(msg, 'bear paw') then
sell(cid,5896,1,500)
elseif msgcontains(msg, 'wolf paw') then
sell(cid,5897,1,500)
elseif msgcontains(msg, 'behemoth claw') then
sell(cid,5930,1,600)
elseif msgcontains(msg, 'behemoth fang') then
sell(cid,5893,1,600)
elseif msgcontains(msg, 'demon dust') then
sell(cid,5906,1,500)
elseif msgcontains(msg, 'demon horn') then
sell(cid,5954,1,500)
elseif msgcontains(msg, 'vampire dust') then
sell(cid,5905,1,500)
elseif msgcontains(msg, 'beholder eye') then
sell(cid,5898,1,600)
elseif msgcontains(msg, 'brown piece of cloth') then
sell(cid,5913,1,500)
elseif msgcontains(msg, 'yellow piece of cloth') then
sell(cid,5914,1,600)
elseif msgcontains(msg, 'white piece of cloth') then
sell(cid,5909,1,700)
elseif msgcontains(msg, 'red piece of cloth') then
sell(cid,5911,1,700)
elseif msgcontains(msg, 'blue piece of cloth') then
sell(cid,5912,1,800)
elseif msgcontains(msg, 'green piece of cloth') then
sell(cid,5910,1,1000)
elseif msgcontains(msg, 'green dragon leather') then
sell(cid,5877,1,500)
elseif msgcontains(msg, 'red dragon leather') then
sell(cid,5948,1,500)
elseif msgcontains(msg, 'lizard leather') then
sell(cid,5876,1,600)
elseif msgcontains(msg, 'minotaur leather') then
sell(cid,5878,1,700)
elseif msgcontains(msg, 'red dragon scale') then
sell(cid,5882,1,700)
elseif msgcontains(msg, 'green dragon scale') then
sell(cid,5920,1,700)
elseif msgcontains(msg, 'lizard scale') then
sell(cid,5881,1,1000)
elseif msgcontains(msg, 'nose ring') then
sell(cid,5804,1,2000)
elseif msgcontains(msg, 'hook') then
sell(cid,6097,1,900)
elseif msgcontains(msg, 'mandrake') then
sell(cid,5015,1,9000)
elseif msgcontains(msg, 'soul stone') then
sell(cid,5809,1,20000)
elseif msgcontains(msg, 'ferumbras hat') then
sell(cid,5903,1,20000)
elseif msgcontains(msg, 'brutus bloodbeard hat') then
sell(cid,6099,1,20000)
elseif msgcontains(msg, 'fish fin') then
sell(cid,5895,1,1000)
elseif msgcontains(msg, 'giant spider silk') then
sell(cid,5879,1,500)
elseif msgcontains(msg, 'ape fur') then
sell(cid,5883,1,2000)
elseif msgcontains(msg, 'hydra egg') then
sell(cid,4850,1,3000)
elseif msgcontains(msg, 'honeycomb') then
sell(cid,5902,1,500)
elseif msgcontains(msg, 'bye') 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 focus > 0 then
x, y, z = creatureGetPosition(focus)
myx, myy, myz = selfGetPosition()
if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then
selfTurn(0)
end
if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then
selfTurn(2)
end
if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then
selfTurn(1)
end
if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then
selfTurn(3)
end
if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(1)
end
if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(3)
end
if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(2)
end
if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(0)
end
if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(1)
end
if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(3)
end
if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(2)
end
if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(0)
end
if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(1)
end
if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(3)
end
if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(2)
end
if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(0)
end
end
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 Q AJUDE USEM PLZ!!
DUVIDAS - MATARAIA.NO-IP.INFO 7.81