Po cara muito util para aqueles ots que nao veem com npc de rings.
Valeu ae
Po cara muito util para aqueles ots que nao veem com npc de rings.
Valeu ae
Rox, mas tipo, como faz pra mudar o valor q vende cada um? e como faz pra vender só axe/sword/club e life ring?
Vlw :laughing:
info
Grupo: Artesão
Registrado: 14/02/07
Posts: 144
Reputação: +3
Char no Tibia: Buster of Flame

Rox, mas tipo, como faz pra mudar o valor q vende cada um? e como faz pra vender só axe/sword/club e life ring?Vlw :laughing:
e simples
if msgcontains(msg, 'life ring') then
buy(cid,2168,1,3000)
elseif msgcontains(msg, 'sword ring') then
buy(cid,2207,1,2000)
elseif msgcontains(msg, 'ring of healing') then
buy(cid,2214,1,4000)
elseif msgcontains(msg, 'club ring') then
buy(cid,2209,1,2000)
elseif msgcontains(msg, 'axe ring') then
buy(cid,2208,1,3000)
elseif msgcontains(msg, 'power ring') then
buy(cid,2166,1,3000)
elseif msgcontains(msg, 'energy ring') then
buy(cid,2167,1,5000)
elseif msgcontains(msg, 'time ring') then
buy(cid,2169,1,6000)
aki vc muda td q vc ker o cid n muda ,, o premero numero e o id do item tbm n muda o 1 e a quantidade e o 3 numero e o preçu tipow se vc por 10000 vai ser 10k ser por 1000 vai ser um
espero ter ajudado
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: 25/11/07
Posts: 29
Reputação: 0
Char no Tibia: PsyKina

cara nao entendi aonde eu boto cada coisa vc pode me explicar me mandando um email para johann_castor@hotmail.com
eu estava pensando fazer esse npc mas tinha um perguiça enorme de o fazer XD vlw
info
Grupo: Campones
Registrado: 10/06/07
Posts: 37
Reputação: 0
hey vc sabe como q cria um npc de quests , ex: vc da pra ele 100 carlin sword ai vc ganha uma soft boots se vc souber fala cmg
Ty vo ussa ele no ot
:smile_positivo:
info
Grupo: Campones
Registrado: 15/07/10
Posts: 15
Reputação: 0
Char no Tibia: Sir Eurides

eu to com problemas pois o meu nao fala nada =X
info
Grupo: Artesão
Registrado: 14/02/07
Posts: 144
Reputação: +3
Char no Tibia: Buster of Flame
e um npc comum com addon
fiz ele no map dorion 7.9 do xedegux intao eu n testei em outros servidores
ele vendi roh,tr,lr,sr,ar,cr e uns ae q eu achu q eskeci ^^
tomara de ajude lah vai
<?xml version="1.0"?>
<npc name="Senhor Dos Aneis" script="data/npc/scripts/rings.lua" access="3" lookdir="3">
<health now="1" max="1"/>
<look type="146" head="0" body="40" legs="114" feet="0" corpse="3128"/>
</npc>
agora o script dele
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) .. '! I sell life ring (2k), ring of healing (4k), club ring (2k), axe ring (3k), power ring (3k), energy ring (5k), time ring (6k) and sword ring (3k).')
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, 'life ring') then
buy(cid,2168,1,3000)
elseif msgcontains(msg, 'sword ring') then
buy(cid,2207,1,2000)
elseif msgcontains(msg, 'ring of healing') then
buy(cid,2214,1,4000)
elseif msgcontains(msg, 'club ring') then
buy(cid,2209,1,2000)
elseif msgcontains(msg, 'axe ring') then
buy(cid,2208,1,3000)
elseif msgcontains(msg, 'power ring') then
buy(cid,2166,1,3000)
elseif msgcontains(msg, 'energy ring') then
buy(cid,2167,1,5000)
elseif msgcontains(msg, 'time ring') then
buy(cid,2169,1,6000)
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
TOMARA Q VC USEM NO SERVE DE VCS ^^