entaum to editand um ot de naruto e existe um npc q eh o sannin eh como se fosse um npc akatsuki ele da a vocação entendem!...No entando naum lido mto com scripts e quando no jogo falo hi pra ele ele naum me responde alguem pode me ajuda as scripts dele estão ake se alguem pude modifika e me passa serei grato ;D
Ajuda aew Galera por favor
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
talk_state = 20
cname = ''
vocation = 0
mainlevel = 250
gstat = 0 -- guild status
grank = '' -- guild rank
gname = '' -- guild name
pname = '' -- name of some other player
maxnamelen = 30
maxranklen = 20
maxnicklen = 20
leaderlevel = 50
NONE = 0
INVITED = 1
MEMBER = 2
VICE = 3
leader = 4
allow_pattern = '^[a-zA-Z0-9 -]+$'
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Bye.')
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)
cname = creatureGetName(cid)
msg = string.lower(msg)
posK = {x=388, y=117, z=7}
posS = {x=388, y=117, z=7}
posM = {x=799, y=420, z=7}
if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
if getPlayerSex(cid) == 0 or getPlayerSex(cid) == 28 then
selfSay('Ola! ' .. cname .. '! Você quer ser Sannin? Se quiser fale "sim"')
talk_state = 20
focus = cid
talk_start = os.clock()
else
selfSay('Sorry, but you alredy chose your village. If not, talk to the Admin.')
talk_state = 0
focus = cid
end
elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe, ' .. cname .. '! Eu falo com você em 1 minuto.')
elseif string.find(msg, '(%a*)FLW(%a*)') and getDistanceToCreature(cid) < 4 then
selfSay('Ate +, ' .. cname .. '!')
talk_state = 20
focus = 0
talk_start = 0 elseif focus == cid then
talk_start = os.clock()
if talk_state == 20 then
if msgcontains(msg, 'sim') then -- confirmando decisao
level = getPlayerLevel(cname)
if level >= mainlevel then
selfSay('Otimo! Temos 2 Sannins... Konoha ou Som, qual quer?')
talk_state = 1
else
selfSay('Desculpe você não tem força suficiente para ser SANNIN...')
talk_state = 20
end
else
-- selfSay('Volte quando estiver no level '.. mainlevel ..'.')
talk_state = 20
end
elseif talk_state == 1 then -- telling vilage
talk_state = 2
if msgcontains(msg, 'konoha') then
selfSay('O sannin de konoha se chama Jiraya, se quiser fale JIRAYA')
talk_state = 2
elseif msgcontains(msg, 'som') then
selfSay('O sannin do som se chama Orochimaru, se quiser fale OROCHIMARU')
talk_state = 2
else
selfSay('Desculpe esse Sannin n existe...')
vocation = 0
talk_state = 1
end
elseif talk_state == 2 then -- telling vilage
if msgcontains(msg, 'jiraya') then
selfSay('Sannin q sumona Sapos, tem certeza q quer?')
talk_state = 4
elseif msgcontains(msg, 'orochimaru') then
selfSay('Sannin q sumona cobras, tem certeza q quer?')
talk_state = 5
else
selfSay('Sorry, this clan does not exists.')
vocation = 0
talk_state = 2
end
elseif talk_state == 4 then -- confirming vocation
if msgcontains(msg, 'sim') and talk_state == 4 then
setPlayerVocation(cid,7)
buy(cid,2381,1,0)
learnSpell(cid,'jiraya no jutsu',0)
learnSpell(cid,'sannin impulse',0)
learnSpell(cid,'oodama rasengan',0)
learnSpell(cid,'rasengan',0)
learnSpell(cid,'kuchyose',0)
learnSpell(cid,'old sharingan',0)
learnSpell(cid,'kawarimi',0)
selfSay('Pronto ' .. creatureGetName(cid) .. 'Você Aprendeu os jutsus: kawarimi, rasengan, oodama rasengan, jiraya no jutsu, sannin impulse !')
if getPlayerSex(cid) == 0 then
selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 81')
Travel(cid, 0, 388, 117, 7)
talk_state = 20
focus = 0
else
end
end
end
if talk_state == 5 then
if msgcontains(msg, 'sim') and talk_state == 5 then
setPlayerVocation(cid,7)
buy(cid,2471,1,0)
setPlayerStorageValue(cid,500,1)
setPlayerStorageValue(cid,5,1)
selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 172')
learnSpell(cid,'onda sonora',0)
learnSpell(cid,'sannin impulse',0)
learnSpell(cid,'selo do orochimaru',0)
learnSpell(cid,'selo maldito',0)
learnSpell(cid,'kuchyose',0)
learnSpell(cid,'sound wave',0)
learnSpell(cid,'old sharingan',0)
learnSpell(cid,'kawarimi',0)
selfSay('Pronto ' .. creatureGetName(cid) .. 'Você Aprendeu os jutsus: kawarimi, selo maldito, selo do orochimaru, onda sonora, sannin impulse !')
Travel(cid, 0, 388, 117, 7)
talk_state = 20
focus = 0
else
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 focus == 0 then
randmove = math.random(1,50)
if randmove == 1 then
selfMove(0)
end
if randmove == 2 then
selfMove(1)
end
if randmove == 3 then
selfMove(2)
end
if randmove == 4 then
selfMove(3)
end
end
if (os.clock() - talk_start) > 45 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
end
end