Ir para conteúdo
  • Cadastre-se

(Resolvido)Pedido EXIT SIMPLES


Ir para solução Resolvido por wandersonnc,

Posts Recomendados

Oi este meu primeiro pedido , simples gostaria apenas de um script que deslg o player apos X tempo em uma tile , n precisa rsponder n precisa fazer nada apenas kick ele apos x tempo com batle ou sem SIMPLES obg aguardo Respostas

Link para o post
Compartilhar em outros sites
  • Respostas 10
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

idletile.lua (data/creaturescripts/scripts): function onThink(cid, interval)     local kicktime = 10     local tileactionid = 54321     local idletime = getPlayerIdleTime(cid) + interval          if getTileThingByPos(getCreaturePosition(cid)).actionid == tileactionid then         if getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE) then return true end         doPlayerSetIdleTime(cid, idletime)         if idletime > kicktime * 60 * 1000 then             doRemoveCreature(cid)       

idletile.lua (data/creaturescripts/scripts):

function onThink(cid, interval)
    local kicktime = 10
    local tileactionid = 54321
    local idletime = getPlayerIdleTime(cid) + interval
    
    if getTileThingByPos(getCreaturePosition(cid)).actionid == tileactionid then
        if getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE) then return true end
        doPlayerSetIdleTime(cid, idletime)
        if idletime > kicktime * 60 * 1000 then
            doRemoveCreature(cid)
        end
    end

    return true
end




Tag - creaturescripts.xml (data/creaturescripts):

<event type="think" name="IdleTile" event="script" value="idletile.lua"/>



Registre o creature event em login.lua (data/creaturescripts/scripts):

registerCreatureEvent(cid, "IdleTile")


Adicione o action ID (declarado na variável local tileactionid do script, que como exemplo foi 54321) ao tile que você deseja.

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

desde ja vou dar o rep+ pela tentativa , porem vou testar e dou a resposta obg. =D


  Em 25/12/2014 em 22:49, Suicide disse:

idletile.lua (data/creaturescripts/scripts):

function onThink(cid, interval)
    local kicktime = 10
    local tileactionid = 54321
    local idletime = getPlayerIdleTime(cid) + interval
    
    if getTileThingByPos(getCreaturePosition(cid)).actionid == tileactionid then
        if getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE) then return true end
        doPlayerSetIdleTime(cid, idletime)
        if idletime > kicktime * 60 * 1000 then
            doRemoveCreature(cid)
        end
    end

    return true
end



Tag - creaturescripts.xml (data/creaturescripts):

<event type="think" name="IdleTile" event="script" value="idletile.lua"/>


Registre o creature event em login.lua (data/creaturescripts/scripts):

registerCreatureEvent(cid, "IdleTile")

Adicione o action ID (declarado na variável local tileactionid do script, que como exemplo foi 54321) ao tile que você deseja.

Mostrar mais  

CARA OTIMO SCRIPT MAIS N FUNFO , PRECISO APENAS DE UM SCRIPT Q AO PISAR EM X TILE ESTANDO LA COM BATLE OU N APOS 1 MIN E KIKADO SO ISSO , TENTEI ESTE E N DEU CERTO , TEM Q KIKAR ELE MESMO Q ESTEJA COM BATLE

Editado por wandersonnc (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

movement

kick_time = 60 -- tempo que precisa ficar no tile para ser deslogado


function kick_time_by_pos(cid, ml, kicktime, postile)
	if not isCreature(cid) then return true end
	if ml == kicktime then
		return doRemoveCreature(cid)
	end
	if getThingPos(cid).x ~= postile.x or getThingPos(cid).y ~= postile.y or getThingPos(cid).z ~= postile.z then
		return true
	end
	addEvent(kick_time_by_pos, 1, cid, ml+1, kicktime, postile)
end

function function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	return kick_time_by_pos(cid, 0, kick_time * 10000, position)
end
<movevent type="StepIn" actionid="" event="script" value=".lua"/>

whatsapp-4in.png (18) 98134-9991

 

icon-skype.png miillerdomingues@hotmail.com

 

Link para o post
Compartilhar em outros sites
  Em 29/12/2014 em 02:23, Gantz disse:

 

movement

kick_time = 60 -- tempo que precisa ficar no tile para ser deslogado


function kick_time_by_pos(cid, ml, kicktime, postile)
	if not isCreature(cid) then return true end
	if ml == kicktime then
		return doRemoveCreature(cid)
	end
	if getThingPos(cid).x ~= postile.x or getThingPos(cid).y ~= postile.y or getThingPos(cid).z ~= postile.z then
		return true
	end
	addEvent(kick_time_by_pos, 1, cid, ml+1, kicktime, postile)
end

function function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	return kick_time_by_pos(cid, 0, kick_time * 10000, position)
end
<movevent type="StepIn" actionid="" event="script" value=".lua"/>
Expand   Mostrar mais  

Me explica um pouco a mais do script tipo onde fica o id q vou por na tile , e este 60 representa 1 min ?

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96842
    Tópicos
    519594
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo