[NPC] Sannin Konoha e Sannin Sound.
Página 1 de 1
[NPC] Sannin Konoha e Sannin Sound.
Olá galera, olha eu aqui denovo hoje vim trazer pra vocês 2 NPC's totalmente sem bugs, e corretos.
São eles: Sannin Konoha (Jyraia) e Sannin Sound (Orochimaru).
Esses dois NPC's são como quase todos de vocação, é fácil de editar, mesmo se você não for scripter.
Sannin Sound
Sannin Konoha
São eles: Sannin Konoha (Jyraia) e Sannin Sound (Orochimaru).
Esses dois NPC's são como quase todos de vocação, é fácil de editar, mesmo se você não for scripter.
Sannin Sound
- Spoiler:
- 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 ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
if getPlayerStorageValue(cid,853) < 1 then
selfSay('Hello ' .. creatureGetName(cid) .. 'Se Voce Deseja Virar o Sannin Sound diga "sim".')
focus = cid
talk_start = os.clock()
else
selfSay('Hey! Leave out of there! You are a renegade ninja!')
focus = 0
talk_start = 0
end
elseif string.find(msg, '(%a*)hi(%a*)') 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, 'sim') and focus == cid then
buy(cid,2526,1,0)
buy(cid,6270,1,0)
setPlayerStorageValue(cid,200,1)
setPlayerStorageValue(cid,5,1)
setPlayerVocation(cid,4)
learnSpell(cid,'senei jashu',0)
learnSpell(cid,'kuchyose renegade no jutsu',0)
learnSpell(cid,'sannin impulse',0)
learnSpell(cid,'dark chidori',0)
learnSpell(cid,'kawarimi',0)
selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 218')
doPlayerSetVocation(cid,4)
doPlayerSendTextMessage(cid,22,"You have been promoted to a Sannin Sound.")
talk_start = os.clock()
end
if msgcontains(msg, 'brown bread') and focus == cid then
buy(cid,2691,1,
talk_start = os.clock()
end
if msgcontains(msg, 'ham') and focus == cid then
buy(cid,2671,1,
talk_start = os.clock()
end
if msgcontains(msg, 'carrot') and focus == cid then
buy(cid,2362,1,
talk_start = os.clock()
end
if msgcontains(msg, 'meat') and focus == cid then
buy(cid,2666,1,
talk_start = os.clock()
end
if msgcontains(msg, 'apple') and focus == cid then
buy(cid,2674,1,
talk_start = os.clock()
end
if msgcontains(msg, 'brown mushroom') and focus == cid then
buy(cid,2789,1,
talk_start = os.clock()
end
if msgcontains(msg, 'egg') and focus == cid then
buy(cid,2695,1,
talk_start = os.clock()
end
if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 3 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
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) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 3 then
selfSay('Good bye then.')
focus = 0
end
end
end
end
Sannin Konoha
- Spoiler:
- 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 ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
if getPlayerStorageValue(cid,853) < 1 then
selfSay('Ola ' .. creatureGetName(cid) .. 'Se Voce Deseja Virar o Sannin Konoha diga "sim".')
focus = cid
talk_start = os.clock()
else
selfSay('Hey! Leave out of there! You are a renegade ninja!')
focus = 0
talk_start = 0
end
elseif string.find(msg, '(%a*)hi(%a*)') 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, 'sim') and focus == cid then
buy(cid,2526,1,0)
buy(cid,6270,1,0)
setPlayerStorageValue(cid,200,1)
setPlayerStorageValue(cid,5,1)
setPlayerVocation(cid,4)
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('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 81')
doPlayerSetVocation(cid,4)
doPlayerSendTextMessage(cid,22,"You have been promoted to a Jyraia.")
talk_start = os.clock()
end
if msgcontains(msg, 'brown bread') and focus == cid then
buy(cid,2691,1,
talk_start = os.clock()
end
if msgcontains(msg, 'ham') and focus == cid then
buy(cid,2671,1,
talk_start = os.clock()
end
if msgcontains(msg, 'carrot') and focus == cid then
buy(cid,2362,1,
talk_start = os.clock()
end
if msgcontains(msg, 'meat') and focus == cid then
buy(cid,2666,1,
talk_start = os.clock()
end
if msgcontains(msg, 'apple') and focus == cid then
buy(cid,2674,1,
talk_start = os.clock()
end
if msgcontains(msg, 'brown mushroom') and focus == cid then
buy(cid,2789,1,
talk_start = os.clock()
end
if msgcontains(msg, 'egg') and focus == cid then
buy(cid,2695,1,
talk_start = os.clock()
end
if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 3 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
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) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 3 then
selfSay('Good bye then.')
focus = 0
end
end
end
end
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|