Addon Nao Funciona

ExonSeren
em Lixeira Pública

ExonSeren

Exon
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/07/08Posts: 15Char no Tibia: Exon Seren

Bem a minha duvida é a seguinte, eu coloquei cada NPC vende um addon, ai blz eu dividi certim so q o NPC pega o iten e n da o addon

 

ja olhei tudo os id da outfit tudo so q nao da

HELP?

 

aBRAÇOS E VLW





METAS:
[x]1post
[x]5 posts (SERVO)
[x]10 posts (CAMPONÊS)
[x]25 posts (CAÇADOR)
[x]50 posts (CAVALEIRO)
[ ]100 posts (BARONETE)
[ ]200 posts (BARÃO)
[ ]300 posts (VISCONDE)
[ ]400 posts (DUQUE) <---
[ ]600 posts (ARQUEDUQUE)
[ ]800 posts (ARISTOCRATA)
[ ]1000 posts (REGENTE)
[ ]1400 posts (SÁBIO)
[ ]1800 posts (SACERDOTE)
[ ]2500 posts (PRÍNCIPE)

satan666

Antichrist Superstar
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 07/05/08Posts: 612Char no Tibia: leviana luciferiana

help tanbem eu ainda não tenho bola de crystal pra saber como esta o script do npc.

 

 

quer help então de help pra nois.

creationb.jpg

"Um Deus que usasse seu poder para criar seres humanos que de antemão sabia que seriam atormentados eternamente, e que os predestinasse a isso,



não poderia ser sábio, nem justo e tampouco amoroso.

Além de nos submeter a isso vim a nos julgar e condenar por nossos atos aos tormentos do inferno.

pra minha pessoa isso não é um Deus Pai amoroso e bondoso como o chaman, seu padrão seria muito mais inferior do que o de muitos homens."

ExonSeren

Exon
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/07/08Posts: 15Char no Tibia: Exon Seren
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)

 

if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then

selfSay('Ola ' .. creatureGetName(cid) .. '! Eu tenho todos os addons é só falar o nome da roupa e primeiro pro addon 1 e segundo pro addon 2 exemplo: warrior primeiro.')

focus = cid

talk_start = os.clock()

 

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('Desculpe-me, ' .. creatureGetName(cid) .. '! Falo com voce em um minuto.')

 

 

elseif msgcontains(msg, 'citizen primeiro') then

selfSay('Voce tem as 100 Chiken Feathers necessarias para conseguir o addon?')

talk_state = 1

talk_start = os.clock()

 

elseif talk_state == 1 and msgcontains(msg, 'yes') then

if getPlayerItemCount(cid,5890) == 100 then

doPlayerRemoveItem(cid,5890,100)

doPlayerAddAddon(cid, 136, 1)

doPlayerAddAddon(cid, 128, 1)

selfSay('Parabens !!! Voce Adiquiriu um novo addon.')

talk_state = 0

talk_start = os.clock()

else

selfSay('Desculpe Você nao tem o necessario para esse addon.')

talk_state = 0

talk_start = os.clock()

end

 

elseif msgcontains(msg, 'citizen segundo') then

selfSay('Você tem os 100 minotaur leather necessarios para conseguir o addon?')

talk_state = 2

talk_start = os.clock()

 

elseif talk_state == 1 and msgcontains(msg, 'yes') then

if getPlayerItemCount(cid,5878) == 100 then

doPlayerRemoveItem(cid,5878,100)

doPlayerAddAddon(cid, 136, 2)

doPlayerAddAddon(cid, 128, 2)

selfSay('Parabens !!! Voce Adiquiriu um novo addon.')

talk_state = 0

talk_start = os.clock()

else

selfSay('Desculpe Você nao tem o necessario para esse addon.')

talk_state = 0

talk_start = os.clock()

end

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 5 then

selfSay('Ate mais, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

elseif msgcontains(msg, 'nao') and getDistanceToCreature(cid) < 5 then

selfSay('Desculpe, ' .. creatureGetName(cid) .. '! Volte aqui quando tiver os itens nescessarios.')

talk_start = os.clock()

talk_state = 0

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

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 5 then

selfSay('Ate mais.')

focus = 0

end

end

end

 

esse é só o do citizen os otros sao iguais só muda algumas coisas

 

:D





METAS:
[x]1post
[x]5 posts (SERVO)
[x]10 posts (CAMPONÊS)
[x]25 posts (CAÇADOR)
[x]50 posts (CAVALEIRO)
[ ]100 posts (BARONETE)
[ ]200 posts (BARÃO)
[ ]300 posts (VISCONDE)
[ ]400 posts (DUQUE) <---
[ ]600 posts (ARQUEDUQUE)
[ ]800 posts (ARISTOCRATA)
[ ]1000 posts (REGENTE)
[ ]1400 posts (SÁBIO)
[ ]1800 posts (SACERDOTE)
[ ]2500 posts (PRÍNCIPE)

delton

Ex-Xtibian
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 16/11/07Posts: 389Gênero: MasculinoChar no Tibia: Tiger Darm

Tenta esse aqui:

 

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)

if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Ola ' .. creatureGetName(cid) .. '! Eu tenho todos os addons é só falar o nome da roupa e primeiro pro addon 1 e segundo pro addon 2 exemplo: warrior primeiro.')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe-me, ' .. creatureGetName(cid) .. '! Falo com voce em um minuto.')


elseif msgcontains(msg, 'citizen primeiro') then
selfSay('Voce tem as 100 Chiken Feathers necessarias para conseguir o addon?')
talk_state = 1
talk_start = os.clock()

elseif talk_state == 1 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5890) == 100 then
doPlayerRemoveItem(cid,5890,100)
doPlayerAddOutfit(cid, 136, 1)
doPlayerAddOutfit(cid, 128, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end

elseif msgcontains(msg, 'citizen segundo') then
selfSay('Você tem os 100 minotaur leather necessarios para conseguir o addon?')
talk_state = 2
talk_start = os.clock()

elseif talk_state == 1 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5878) == 100 then
doPlayerRemoveItem(cid,5878,100)
doPlayerAddOutfit(cid, 136, 2)
doPlayerAddOutfit(cid, 128, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 5 then
selfSay('Ate mais, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'nao') and getDistanceToCreature(cid) < 5 then
selfSay('Desculpe, ' .. creatureGetName(cid) .. '! Volte aqui quando tiver os itens nescessarios.')
talk_start = os.clock()
talk_state = 0
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
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Ate mais.')
focus = 0
end
end
end

Olá XTibiano:

Sua assinatura estava com um problema na TAG SPOILER e foi movida para a parte "Sobre mim".
Agradecemos a sua compreensão.

Atenciosamente,
JV Chequer

ExonSeren

Exon
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/07/08Posts: 15Char no Tibia: Exon Seren

tipo, oq vc alterou pq eu preciso de mudar em todos os NPCS, pq eu dividi em mts

:D





METAS:
[x]1post
[x]5 posts (SERVO)
[x]10 posts (CAMPONÊS)
[x]25 posts (CAÇADOR)
[x]50 posts (CAVALEIRO)
[ ]100 posts (BARONETE)
[ ]200 posts (BARÃO)
[ ]300 posts (VISCONDE)
[ ]400 posts (DUQUE) <---
[ ]600 posts (ARQUEDUQUE)
[ ]800 posts (ARISTOCRATA)
[ ]1000 posts (REGENTE)
[ ]1400 posts (SÁBIO)
[ ]1800 posts (SACERDOTE)
[ ]2500 posts (PRÍNCIPE)

delton

Ex-Xtibian
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 16/11/07Posts: 389Gênero: MasculinoChar no Tibia: Tiger Darm

Funcionou? Troca doPlayerAddAddon por doPlayerAddOutfit =)

 

Delton~~

Olá XTibiano:

Sua assinatura estava com um problema na TAG SPOILER e foi movida para a parte "Sobre mim".
Agradecemos a sua compreensão.

Atenciosamente,
JV Chequer

ExonSeren

Exon
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/07/08Posts: 15Char no Tibia: Exon Seren

aff nao ta dando, delton vc tem MSN?

me manda via MP ai agnt conversa assim

PLIS

 

o meu é jaogui2005@hotmail.com

se rola do c add

 

Abraços





METAS:
[x]1post
[x]5 posts (SERVO)
[x]10 posts (CAMPONÊS)
[x]25 posts (CAÇADOR)
[x]50 posts (CAVALEIRO)
[ ]100 posts (BARONETE)
[ ]200 posts (BARÃO)
[ ]300 posts (VISCONDE)
[ ]400 posts (DUQUE) <---
[ ]600 posts (ARQUEDUQUE)
[ ]800 posts (ARISTOCRATA)
[ ]1000 posts (REGENTE)
[ ]1400 posts (SÁBIO)
[ ]1800 posts (SACERDOTE)
[ ]2500 posts (PRÍNCIPE)