Ir para conteúdo

Posts Recomendados

LEIA

aee

como eu tava com esse problema resolvi postar !

para todos que tabeim o tem..

é asim ele cria um arquivo numa pasta que vc cria dentro da pasta data

e dentro da data vc cria um .lua chamado players ficando players.lua

ai voce ve os players que se cadastraraum e faiz um backp dois players cadastrados e exclui todo resto mais naum deu mt certo alias, voce pode fazer um opção que pega acc para que voce naum precisa procurar mais eu sou meio noob e naum sei fazer isso

e tem algum erro no code alguem pode ajeita e encrementa minha idea?

flwww

 

focus = 0talk_start = 0target = 0following = falseattacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos) 	 if focus == cid then          selfSay('Good bye then.')          focus = 0          talk_start = 0 	 endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str) 	 return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction 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 deseja salvar esse xar? :' .. creatureGetName(cid) .. '')    focus = cid    talk_start = os.clock() 	 elseif msgcontains(msg, 'hi') 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, 'no') then  selfSay('entao venha com o xar desejado ate mim')  if msgcontains(msg, 'yes') then  f = assert(io.open("./data/inativos/players.lua", "w"))  f = io.open("./data/inativos/players.lua", "w")  f:write(", ' .. creatureGetName(cid) .. '")  elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then 	 selfSay('Good bye, ' .. creatureGetName(cid) .. '!') 	 focus = 0 	 talk_start = 0  end	endendfunction onCreatureChangeOutfit(creature)endfunction onThink()if (os.clock() - talk_start) > 30 thenif focus > 0 thenselfSay('Next Please...')endfocus = 0endif focus ~= 0 thenif getDistanceToCreature(focus) > 5 thenselfSay('Good bye then.')focus = 0endendif focus == 0 thencx, cy, cz = selfGetPosition()randmove = math.random(1,20)if randmove == 1 thennx = cx + 1endif randmove == 2 thennx = cx - 1endif randmove == 3 thenny = cy + 1endif randmove == 4 thenny = cy - 1endif randmove >= 5 thennx = cxny = cyendmoveToPosition(nx, ny, cz)--summons = 30--summons2 = 30endend

 

Link para o comentário
https://xtibia.com/forum/topic/31802-76-tire-seus-xares-inativos/
Compartilhar em outros sites

  • 6 months later...
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...