muito bom, mais não seria legal se o Segurança atacasse PKs?
Parabens
Aprovado :smile_positivo:
Por lucasatak, 26 de jan. de 2009 em NPCs, monsters e raids
info
Grupo: Campones
Registrado: 08/05/08
Posts: 17
Reputação: 0
Char no Tibia: Slash'Bloker

muito bom, mais não seria legal se o Segurança atacasse PKs?
Parabens
Aprovado :smile_positivo:
Editado Fevereiro 6 por pinguyn
info
Grupo: Campones
Registrado: 19/06/11
Posts: 10
Reputação: -4
Char no Tibia: Chupa Meu Pinto

.........
info
Grupo: Artesão
Registrado: 07/05/08
Posts: 120
Reputação: +14
Fala galera to trazendo aqui 3 npc pra condominio eles n fazem nada apenas ficam lá e conversam com você
Vamo lá,primeiro vá em data/npc/scripts copie qualquer arquivo,cole,renomeio para Porteiro e cole isto \/
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('Tchau, Volte sempre.')
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) .. 'Voce Está Em Um Condominio Com Casas Caras,Compre Uma,Vale a Pena!".')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe, ' .. creatureGetName(cid) .. '!Ja Falo Com Você Um Minuto!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sim') then
selfSay('20k pra cima!')
talk_state = 1
elseif msgcontains(msg, 'yes') then
selfSay('Descendo Mais 1 Poco Tem Mais Casas!')
talk_state = 2
elseif talk_state == 1 then
if msgcontains(msg, 'si') then
if pay(cid,0) then
selfSay('Oque custa?.')
else
selfSay('Desculpe,Nao Posso Te Dar Dinheiro!.')
end
end
talk_state = 0
elseif talk_state == 2 then
if msgcontains(msg, 'yes') then
if pay(cid,0) then
selfSay('COMPRA UMA POR FAVOR!.')
else
selfSay('Mal Educado.')
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Tchau, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo Porfavor...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Tchau, Tchau Amigo.')
focus = 0
end
end
end
Agora vá em data/npc/ e copie qualquer arquivo .XML cole,renomeio para Porteiro Ze e cole isto \/
<npc name="Porteiro Ze" script="data/npc/scripts/Porteiro.lua" autowalk="1" floorchange="0" access="5">
<health now="100" max="100"/>
<look type="143" head="25" body="21" legs="22" feet="12" addons="2"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
</parameters>
</npc>
2° Agora vá em data/npc/scripts copie qualquer arquivo,cole,renomeio para Zelador e cole isto \/
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('Tchau, Volte sempre.')
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 Sou o Zelador Mario, Prazer!".')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe, ' .. creatureGetName(cid) .. '!Ja Falo Com Você Um Minuto!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'prazer') then
selfSay('Eu e o Zé Trocamos De Turno.')
talk_state = 1
elseif msgcontains(msg, 'sim') then
selfSay('Compre uma Casa e ajude nois!!')
talk_state = 2
elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if pay(cid,0) then
selfSay('Qual Vc quer é só escolher por ai!.')
else
selfSay('Desculpe,Nao Posso Te Dar Dinheiro!.')
end
end
talk_state = 0
elseif talk_state == 2 then
if msgcontains(msg, 'sim') then
if pay(cid,0) then
selfSay('COMPRA UMA POR FAVOR!.')
else
selfSay('Mal Educado.')
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Tchau, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo Porfavor...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Tchau, Tchau Amigo.')
focus = 0
end
end
end
Agora vá em data/npc/copie qualquer arquivo.XML cole,renomeio para Zelador Mario e cole isto \/
<npc name="Zelador Mario" script="data/npc/scripts/Zelador.lua" autowalk="1" floorchange="0" access="5">
<health now="100" max="100"/>
<look type="143" head="50" body="52" legs="67" feet="30" addons="0"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
</parameters>
</npc>
3° Agora vá em data/npc/scripts copie qualquer arquivo ,cole ,renomeio para Securanca COM C,e cole isto \/
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('Tchau, Volte sempre.')
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) .. 'Posso Ajudar?".')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe, ' .. creatureGetName(cid) .. '!Ja Falo Com Você Um Minuto!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sim') then
selfSay('Em Que?')
talk_state = 1
elseif msgcontains(msg, '?Como visito o condominio?') then
selfSay('Pague 5k apenas.')
talk_state = 2
elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if pay(cid,0) then
selfSay('Obrigado.')
else
selfSay('Desculpe,Nao Posso Te Dar Dinheiro!.')
end
end
talk_state = 0
elseif talk_state == 2 then
if msgcontains(msg, 'yes') then
if pay(cid,0) then
selfSay('COMPRA UMA POR FAVOR!.')
else
selfSay('Mal Educado.')
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Tchau, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo Porfavor...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Tchau, Tchau Amigo.')
focus = 0
end
end
end
Agora vá em data/npc copie qualquer arquivo.XML,cole,renomeio para Seguranca COM C TAMBEM! e cole isto \/
<npc name="Seguranca" script="data/npc/scripts/Seguranca.lua" autowalk="1" floorchange="0" access="5">
<health now="100" max="100"/>
<look type="128" head="1" body="1" legs="1" feet="1" addons="0"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
</parameters>
</npc>
ATENÇÃO!
PORTEIRO ZE SEM ACENTO,ZELADOR MARIO SEM ACENTO, SEGURANCA SEM Ç
Valeuu comentem aee!
Abraço!