Eu so axu que poderia por também de 5min em 5 min para poder flar com ele pq tipu imagina o nb poe clean na hotkey e aperta q nem loko ![]()
- Fórum
- OTServ
- Recursos
- Scripting
- NPCs, monsters e raids
- Npc Clean.....inovado.
3
1.4k
28 de outubro de 2008 às 17:46
2 meses depois...
info
Grupo: Campones
Registrado: 16/11/08
Posts: 62
Reputação: 0
Char no Tibia: Bardy dy asturian

13 de dezembro de 2008 às 19:40
Lgl xou de bola resumondo xdb


info
Grupo: Campones
Registrado: 21/10/08
Posts: 2
Reputação: 0
Cansado dos players do seu server ficarem enxendo seu saco para dar clean.Ai vai a solução.
Npc XML
<?xml version="1.0"?>
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="128" head="0" body="0" legs="0" feet="0" addons="3"/>
</npc>
NPC SCRIPT
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 faço clean.So falar clean.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay(' ' .. creatureGetName(cid) .. 'Ja falo com você.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'clean') then
selfSay("/clean")
end
end
end
function onCreatureChangeOutfit(creature)
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Server limpo.')
focus = 0
end
end
No meu server esta assim: voce fala hi.ele vai falar para vooce falar clean intaum voce fala e pronto.
Espero q gostem.Se gostar dexa um up aki. :smile_positivo:
ALL LOVES ME