Ir para conteúdo

Da Uma Ajuda Ae


Bladedj

Posts Recomendados

qro saber oque significa o termo <eof>

pq quando rodo meu script aparece <eof> expecter near 'elseif'

se alguem souber

 

 

significa End Of File...

quer dizer que vc abriu X IF's e fechou apenas Y

 

exemplos:

 

código certo:

if a > b then
.  if c = d then
.  .  c = c + 1
.  .  d = d - 1
.  .  e = f
.  .  if f = g then
.  .  .  g = e+1
.  .  end
.  end
end

 

código com erro de <eof>

if a > b then
.  if c = d then
.  .  c = c + 1
.  .  d = d - 1
.  .  e = f
.  .  if f = g then
.  .  .  g = e+1
.  .  end
.  elseif z < x then
.  .  a = 0
.  .  z = 0
.  end
.
.
.
.
.
.
<eof>

 

se sanou sua dúvida, reporte o tópico... caso contrário, poste o script que retorna o erro

Editado por brainless
Link para o comentário
Compartilhar em outros sites

eis aqui o script de um npc para 7.81, o que estou tentando fazer é assim vc fala com o npc e ele manda você trazer o iten do determinado "cara" que você quer ser e entao pronto e ai quando for falar com o npc ele fale simplesmente que você ja fez tal coisa e não podera repetir. O servidor é de narutibia tenhu muitos sistemas feitos por mim funcionando mas este não consegui fazer direito...

 

the id of the creature we are attacking, following, etc.

 

focus = 0

talk_start = 0

target = 0

following = false

attacking = false

talk_state = 20

cname = ''

vocation = 0

mainlevel = 400

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('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)

end

if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then

if getPlayerSex(cid) == 1 or getPlayerSex(cid) == 2 or getPlayerSex(cid) == 17 or getPlayerSex(cid) == 18 or getPlayerSex(cid) == 19 or getPlayerSex(cid) == 20 then

selfSay('Hello, ' .. creatureGetName(cid) .. '! So, you want to get in the Akatsuki?')

focus = cid

talk_state = 21

talk_start = os.clock()

 

else

selfSay('What are you doing here? You don\'t have the right clan to get in the akatsuki!.')

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() end

 

if talk_state == 21 then

if msgcontains(msg, 'yes') then -- confirmando decisao

level = getPlayerLevel(cname)

end

if level >= mainlevel then

selfSay('Great! tell me what member you want to be?')

talk_state = 8

end

else

selfSay('Sorry, you don\'t have all the requeriments to be one member...')

talk_state = 21

end

else

-- selfSay('So, come back when you have level '.. mainlevel ..'.')

talk_state = 21

end

 

elseif talk_state == 8 then -- confirming vocation

if msgcontains(msg, 'pain') and focus == cid then

end

if getPlayerStorageValue(cid,0004) == -4 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7845,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

end

 

if msgcontains(msg, 'Pain rune') or msgcontains(msg, 'pain rune') and focus == cid then

talk_start = os.clock()

queststatus = getPlayerStorageValue(cid,0004)

if queststatus == -4 then

itemstatus = doPlayerRemoveItem(cid,2294)

if itemstatus == -4 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0004,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('mar de areia, akatsuki final rinnegan no jutsu, akat impulse, akatsuki no jutsu and rinnegan.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 161')

learnSpell(cid,'mar de areia',0)

learnSpell(cid,'akatsuki final rinnegan no jutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'rinnegan',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7845,2)

setPlayerStorageValue(cid,7845,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'konan') and focus == cid then

if getPlayerStorageValue(cid,0005) == -5 then

selfSay('Hum.. to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7846,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Konan Rune') or msgcontains(msg, 'konan rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0005)

if queststatus == -5 then

itemstatus = doPlayerRemoveItem(cid,2295)

if itemstatus == -5 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0005,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!')

selfSay('Here is your new habilities.')

selfSay('dragao de chakra, suiton tsunami no jutsu, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 168')

learnSpell(cid,'dragao de chakra',0)

learnSpell(cid,'suiton tsunami no jutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7846,2)

setPlayerStorageValue(cid,7846,level)

end

end

else

selfSay('Now you never go out of this clan.')

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'hidan') and focus == cid then

if getPlayerStorageValue(cid,0006) == -6 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7847,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Hidan Rune') or msgcontains(msg, 'hidan rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0006)

if queststatus == -6 then

itemstatus = doPlayerRemoveItem(cid,2296)

if itemstatus == -6 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0006,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('ritual jashin, sugakra, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 170')

learnSpell(cid,'ritual jashin',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'sugakra',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7847,2)

setPlayerStorageValue(cid,7847,level)

end

else

selfSay('Now you never go out of this clan.')

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'tobi') and focus == cid then

if getPlayerStorageValue(cid,0007) == -7 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7848,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

if msgcontains(msg, 'Tobi Rune') or msgcontains(msg, 'tobi rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0007)

if queststatus == -7 then

itemstatus = doPlayerRemoveItem(cid,2297)

if itemstatus == -7 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0007,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('amaterasu, katon karyuudan, mangekyou sharingan, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 164.')

learnSpell(cid,'amaterasu',0)

learnSpell(cid,'katon karyuudan',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'mangekyou sharingan',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7848,2)

setPlayerStorageValue(cid,7848,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'zetsu') and focus == cid then

if getPlayerStorageValue(cid,0008) == -8 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7849,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Zetsu Rune') or msgcontains(msg, 'zetsu rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0008)

if queststatus == -8 then

itemstatus = doPlayerRemoveItem(cid,2299)

if itemstatus == -8 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0008,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('camuflate, zetsu gan no jutsu, corda de mil metros, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 169.')

learnSpell(cid,'camuflate',0)

learnSpell(cid,'zetsu gan no jutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'corda de mil metros',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7849,2)

setPlayerStorageValue(cid,7849,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'sasori') and focus == cid then

if getPlayerStorageValue(cid,0009) == -9 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7850,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Sasori Rune') or msgcontains(msg, 'sasori rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0009)

if queststatus == -9 then

itemstatus = doPlayerRemoveItem(cid,2300)

if itemstatus == -9 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0009,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('sabaku sousou, corda de mil metros, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 162.')

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'sabaku sousou',0)

learnSpell(cid,'corda de mil metros',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7850,2)

setPlayerStorageValue(cid,7850,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'deidara') and focus == cid then

if getPlayerStorageValue(cid,0010) == -10 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7851,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Deidara Rune') or msgcontains(msg, 'deidara rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0010)

if queststatus == -10 then

itemstatus = doPlayerRemoveItem(cid,2304)

if itemstatus == -10 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0010,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('big explosion, katsu, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 165.')

learnSpell(cid,'big explosion',0)

learnSpell(cid,'katsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7851,2)

setPlayerStorageValue(cid,7851,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'itachi') and focus == cid then

if getPlayerStorageValue(cid,0011) == -11 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7852,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Itachi Rune') or msgcontains(msg, 'itachi rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0011)

if queststatus == -11 then

itemstatus = doPlayerRemoveItem(cid,2306)

if itemstatus == -11 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0011,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('amaterasu, katon karyuudan, mangekyou sharingan, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 167.')

learnSpell(cid,'amaterasu',0)

learnSpell(cid,'katon karyuudan',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'mangekyou sharingan',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7852,2)

setPlayerStorageValue(cid,7852,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'kisame') and focus == cid then

if getPlayerStorageValue(cid,0012) == -12 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7853,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Kisame Rune') or msgcontains(msg, 'kisame rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0012)

if queststatus == -12 then

itemstatus = doPlayerRemoveItem(cid,2309)

if itemstatus == -12 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0012,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('tubarchakra, sugakra, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 166.')

learnSpell(cid,'tubarchakra',0)

learnSpell(cid,'sugakra',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7853,2)

setPlayerStorageValue(cid,7853,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if level >= mainlevel then

if msgcontains(msg, 'kakuzu') and focus == cid then

if getPlayerStorageValue(cid,0013) == -13 then

selfSay('Hum.. you have to kill the monsters akatsuker whose name is one that you want to take the position that you like more and bring the rune that contains inside.')

setPlayerStorageValue(cid,7854,1)

else

selfSay('Sorry, but I you already are in the akatsuki...')

end

end

 

 

if msgcontains(msg, 'Kakuzu Rune') or msgcontains(msg, 'kakuzu rune') and focus == cid then

talk_start = os.clock()

queststatus = setPlayerStorageValue(cid,0013)

if queststatus == -13 then

itemstatus = doPlayerRemoveItem(cid,2312)

if itemstatus == -13 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0013,1)

selfSay('Very good! Welcome to the akatsuki ' .. creatureGetName(cid) .. '!.')

selfSay('Here is your new habilities.')

selfSay('chidori nagashi, cruzadajutsu,kazeno tzul, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 163.')

learnSpell(cid,'chidori nagashi',0)

learnSpell(cid,'cruzadajutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'kazeno tzul',0)

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7854,2)

setPlayerStorageValue(cid,7854,level)

end

else

selfSay('Now you never go out of this clan.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

 

else

selfSay('Anh?')

end

 

 

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

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) > 5 then

selfSay('Good bye then.')

focus = 0

end

end

end

end

-- the id of the creature we are attacking, following, etc.

 

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

selfSay('Leave, ' .. creatureGetName(cid) .. '! .')

focus = cid

talk_start = os.clock()

 

else

selfSay('What are you doing here? You aren\'t a member of akatsuki.')

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() end

--=====================================================

 

if msgcontains(msg, 'aeuaheuahe') and focus == cid then

if getPlayerStorageValue(cid,0001) == -1 then

selfSay('Hum.. You want a mission... So... Oh I have this, the name is \'Mizuki Mission\': Mizuki stole the Scroll of sealing yesterday. I need you to catch the scroll and bring to me.')

setPlayerStorageValue(cid,1234,1)

else

selfSay('Sorry, but I don\'t have more missions...')

end

end

 

if msgcontains(msg, 'euaheuahue') and focus == cid then

if getPlayerStorageValue(cid,0001) == -1 then

selfSay('Hum.. You want a mission... So... Oh I have this, the name is \'Mizuki Mission\': Mizuki stole the Scroll of sealing yesterday. I need you to catch the scroll and bring to me.')

setPlayerStorageValue(cid,1234,1)

 

else

selfSay('Sorry, but I don\'t have more missions...')

end

end

 

if msgcontains(msg, 'euaheuahue') and focus == cid then

if getPlayerStorageValue(cid,0001) == -1 then

selfSay('Hum.. You want a mission... So... Oh I have this, the name is \'Mizuki Mission\': Mizuki stole the Scroll of sealing yesterday. I need you to catch the scroll and bring to me.')

setPlayerStorageValue(cid,1234,1)

 

else

selfSay('Sorry, but I don\'t have more missions...')

end

end

 

if msgcontains(msg, 'euaheuahue') and focus == cid then

if getPlayerStorageValue(cid,0001) == -1 then

selfSay('Hum.. You want a mission... So... Oh I have this, the name is \'Mizuki Mission\': Mizuki stole the Scroll of sealing yesterday. I need you to catch the scroll and bring to me.')

setPlayerStorageValue(cid,1234,1)

 

else

selfSay('Sorry, but I don\'t have more missions...')

end

end

 

if msgcontains(msg, 'euaheuahue') or msgcontains(msg, 'scroll') or msgcontains(msg, 'scroll sealing') or msgcontains(msg, 'sealing scroll') and focus == cid then

talk_start = os.clock()

queststatus = getPlayerStorageValue(cid,0001)

if queststatus == -1 then

itemstatus = doPlayerRemoveItem(cid,6212)

if itemstatus == -1 then

selfSay('I think that he is in the florest.')

else

setPlayerStorageValue(cid,0001,1)

selfSay('Thank you! You find the scroll!')

selfSay('Here is your payment.')

buy(cid,2152,10,0)

setPlayerStorageValue(cid,1234,0)

setPlayerStorageValue(cid,1235,level)

end

else

selfSay('Don\'t worry! The Scroll of Sealing is on rigorous protection in the museum.')

end

end

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

 

if getPlayerStorageValue(cid,0003) >= 1 then

if msgcontains(msg, 'ramen') and focus == cid then

talk_start = os.clock()

queststatus = getPlayerStorageValue(cid,0003)

queststatus2 = getPlayerStorageValue(cid,0015)

 

if queststatus2 == -1 then

itemstatus = doPlayerRemoveItem(cid,2625)

 

if itemstatus == -1 then

selfSay('Where is my ramen??')

else

setPlayerStorageValue(cid,0003,queststatus+1)

setPlayerStorageValue(cid,0015,1)

selfSay('Oh! Thanks!')

selfSay('/makesay ' .. creatureGetName(cid) .. ',/z 41')

end

else

selfSay('Anh?')

end

end

else

selfSay('Anh?')

end

 

 

 

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then

selfSay('Bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

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) > 5 then

selfSay('Good bye then.')

focus = 0

end

end

end

end

 

ow elaborei um script mais curto so q da o erro <eof>

 

da uma olhada porfavor:

focus = 0

talk_start = 0

target = 0

following = false

attacking = false

talk_state = 20

cname = ''

vocation = 0

mainlevel = 400

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)

end

if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then

if getPlayerSex(cid) == 1 or getPlayerSex(cid) == 2 or getPlayerSex(cid) == 17 or getPlayerSex(cid) == 18 or getPlayerSex(cid) == 19 or getPlayerSex(cid) == 20 then

selfSay('Hello, ' .. creatureGetName(cid) .. '! So, you want to get in the Akatsuki?')

talk_state = 20

focus = cid

talk_start = os.clock()

else

selfSay('Sorry, but you alredy chose your position. If not, talk to the Admin.')

talk_state = 0

focus = cid

end

end

 

elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('Sorry, ' .. cname .. '! I talk to you in a minute.')

 

elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then

selfSay('Cya, ' .. 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, 'yes') then -- confirmando decisao

level = getPlayerLevel(cname)

 

 

 

if level >= mainlevel then

selfSay('Great! tell me what member you want to be?')

talk_state = 1

else

selfSay('Sorry, you don\'t have all the requeriments to be one Akatsuki member...')

talk_state = 20

end

else

-- selfSay('So, come back when you have level '.. mainlevel ..'.')

talk_state = 20

end

 

elseif talk_state == 1 then -- telling vilage

talk_state = 2

 

if msgcontains(msg, 'pain') then

selfSay('hum, kill the monster named pain and bring to me his rune. if you have the rune say: pain rune')

talk_state = 2

 

elseif msgcontains(msg, 'konan') then

selfSay('hum, kill the monster named konan and bring to me his rune. if you have the rune say: konan rune')

talk_state = 2

 

elseif msgcontains(msg, 'hidan') then

selfSay('hum, kill the monster named hidan and bring to me his rune. if you have the rune say: hidan rune')

talk_state = 2

 

elseif msgcontains(msg, 'tobi') then

selfSay('hum, kill the monster named tobi and bring to me his rune. if you have the rune say: tobi rune')

talk_state = 2

 

elseif msgcontains(msg, 'zetsu') then

selfSay('hum, kill the monster named zetsu and bring to me his rune. if you have the rune say zetsu rune')

talk_state = 2

 

elseif msgcontains(msg, 'sasori') then

selfSay('hum, kill the monster named sasori and bring to me his rune. if you have the rune say sasori rune')

talk_state = 2

 

elseif msgcontains(msg, 'deidara') then

selfSay('hum, kill the monster named deidara and bring to me his rune. if you have the rune say deidara rune')

talk_state = 2

 

elseif msgcontains(msg, 'itachi') then

selfSay('hum, kill the monster named itachi and bring to me his rune. if you have the rune say itachi rune')

talk_state = 2

 

elseif msgcontains(msg, 'kisame') then

selfSay('hum, kill the monster named kisame and bring to me his rune. if you have the rune say kisame rune')

talk_state = 2

 

elseif msgcontains(msg, 'kakuzu') then

selfSay('hum, kill the monster named kakuzu and bring to me his rune. if you have the rune say kakuzu rune')

talk_state = 2

 

else

selfSay('Sorry, this member does not exist')

vocation = 0

talk_state = 1

end

 

elseif talk_state == 2 then -- telling vilage

 

 

if msgcontains(msg, 'pain rune') then

selfSay('Very good, let me take the rune! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2294)

talk_state = 4

 

elseif msgcontains(msg, 'konan rune') then

selfSay('Very good, let me take the rune! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2295)

talk_state = 6

 

elseif msgcontains(msg, 'hidan rune') then

selfSay('Right your son of the b---! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2296)

talk_state = 7

 

elseif msgcontains(msg, 'tobi rune') then

selfSay('I\'m with hunger, get out of here! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2297)

talk_state = 5

 

elseif msgcontains(msg, 'zetsu rune') then

selfSay('Get out of here! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2299)

talk_state = 8

 

elseif msgcontains(msg, 'sasori rune') then

selfSay('Oh my God! You\'ll be and master killer! are you sure')

itemstatus = doPlayerRemoveItem(cid,2299)

talk_state = 9

 

elseif msgcontains(msg, 'deidara rune') then

selfSay('Hmm, i going put fire in your ass! get out of here! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2304)

talk_state = 10

 

elseif msgcontains(msg, 'itachi rune') then

selfSay('Humm, Mangekyou Sharingan! don\'t worry i\'m just kidding! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2306)

talk_state = 11

 

elseif msgcontains(msg, 'kisame rune') then

selfSay('Humm... are you sure?')

itemstatus = doPlayerRemoveItem(cid,2309)

talk_state = 12

 

elseif msgcontains(msg, 'kakuzu rune') then

selfSay('o.O! are you sure?')

itemstatus = doPlayerRemoveItem(cid,2312)

talk_state = 13

 

 

else

selfSay('Sorry, this clan does not exists.')

vocation = 0

talk_state = 2

end

 

 

elseif talk_state == 4 then -- confirming vocation

if msgcontains(msg, 'yes') and talk_state == 4 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7845,1)

setPlayerStorageValue(cid,50,1)

learnSpell(cid,'mar de areia',0)

learnSpell(cid,'akatsuki final rinnegan no jutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'rinnegan',0)

selfSay('Here is your new habilities.')

selfSay('mar de areia, akatsuki final rinnegan no jutsu, akat impulse, akatsuki no jutsu and rinnegan.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 161')

talk_state = 20

focus = 0

end

end

 

 

if talk_state == 5 then

if msgcontains(msg, 'yes') and talk_state == 5 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7846,1)

setPlayerStorageValue(cid,51,1)

learnSpell(cid,'dragao de chakra',0)

learnSpell(cid,'suiton tsunami no jutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

selfSay('Here is your new habilities.')

selfSay('dragao de chakra, suiton tsunami no jutsu, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 168')

talk_state = 20

focus = 0

end

end

 

 

 

 

if talk_state == 6 then

if msgcontains(msg, 'yes') and talk_state == 6 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7847,1)

setPlayerStorageValue(cid,52,1)

selfSay('Here is your new habilities.')

selfSay('ritual jashin, sugakra, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 170')

learnSpell(cid,'ritual jashin',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'sugakra',0)

talk_state = 20

focus = 0

end

end

 

 

 

if talk_state == 7 then

if msgcontains(msg, 'yes') and talk_state == 7 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7848,1)

setPlayerStorageValue(cid,53,1)

selfSay('Here is your new habilities.')

selfSay('amaterasu, katon karyuudan, mangekyou sharingan, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 164')

learnSpell(cid,'amaterasu',0)

learnSpell(cid,'katon karyuudan',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'mangekyou sharingan',0)

talk_state = 20

focus = 0

end

end

 

 

if talk_state == 8 then

if msgcontains(msg, 'yes') and talk_state == 8 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7849,1)

setPlayerStorageValue(cid,54,1)

learnSpell(cid,'camuflate',0)

learnSpell(cid,'zetsu gan no jutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'corda de mil metros',0)

selfSay('Here is your new habilities.')

selfSay('camuflate, zetsu gan no jutsu, corda de mil metros, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 169.')

talk_state = 20

focus = 0

end

end

 

 

if talk_state == 9 then

if msgcontains(msg, 'yes') and talk_state == 9 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7850,1)

setPlayerStorageValue(cid,55,1)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'sabaku sousou',0)

learnSpell(cid,'corda de mil metros',0)

selfSay('Here is your new habilities.')

selfSay('sabaku sousou, corda de mil metros, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 162.')

talk_state = 20

focus = 0

end

end

 

 

if talk_state == 10 then

if msgcontains(msg, 'yes') and talk_state == 10 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7851,1)

setPlayerStorageValue(cid,56,1)

learnSpell(cid,'big explosion',0)

learnSpell(cid,'katsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

selfSay('big explosion, katsu, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 165.')

talk_state = 20

focus = 0

end

end

 

 

 

if talk_state == 11 then

if msgcontains(msg, 'yes') and talk_state == 11 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7852,1)

setPlayerStorageValue(cid,57,1)

learnSpell(cid,'amaterasu',0)

learnSpell(cid,'katon karyuudan',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'mangekyou sharingan',0)

selfSay('Here is your new habilities.')

selfSay('amaterasu, katon karyuudan, mangekyou sharingan, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 167.')

talk_state = 20

focus = 0

end

end

 

if talk_state == 12 then

if msgcontains(msg, 'yes') and talk_state == 12 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7853,1)

setPlayerStorageValue(cid,58,1)

learnSpell(cid,'tubarchakra',0)

learnSpell(cid,'sugakra',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

selfSay('Here is your new habilities.')

selfSay('tubarchakra, sugakra, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 166.')

talk_state = 20

focus = 0

end

end

if talk_state == 13 then

if msgcontains(msg, 'yes') and talk_state == 13 then

buy(cid,6227,1,0)

buy(cid,6272,1,0)

buy(cid,2195,1,0)

setPlayerStorageValue(cid,7854,1)

setPlayerStorageValue(cid,59,1)

learnSpell(cid,'chidori nagashi',0)

learnSpell(cid,'cruzadajutsu',0)

learnSpell(cid,'akat impulse',0)

learnSpell(cid,'akatsuki no jutsu',0)

learnSpell(cid,'kazeno tzul',0)

selfSay('Here is your new habilities.')

selfSay('chidori nagashi, cruzadajutsu,kazeno tzul, akat impulse and akatsuki no jutsu.')

selfSay('/makesay ' .. creatureGetName(cid) .. ',!cmot3416 163.')

talk_state = 20

focus = 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) > 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

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...