Ir para conteúdo

Featured Replies

Postado

pra que fazer gambiarra? nao e melhor ir no config.lua e editar loginProtectionPeriod = 10 * 1000 - 10 e o tempo em segundos se quizer aumentar e só por ai o tempo em segundos salvar e abrir o ot.

Desculpe, não sabia que existia isso no config.lua.

:O

  • Respostas 35
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • function onStatsChange(cid, attacker, type, combat, value) if(isPlayer(cid) and not isPlayer(attacker) and exhaustion.check(cid, 23585) and (type == STATSCHANGE_MANALOSS or type == STATSCHANGE_HEALTHL

  • Irei editar aqui no meu server até funcionar.  Finalmente.

Postado
  • Autor

pra que fazer gambiarra? nao e melhor ir no config.lua e editar loginProtectionPeriod = 10 * 1000 - 10 e o tempo em segundos se quizer aumentar e só por ai o tempo em segundos salvar e abrir o ot.

desculpe, mais se o meu servidor funcionasse essa opção eu não iria atrás de uma "gambiarra"

 

Cria mais um creaturescript(deixe esse dele também) com a seguinte função dentro:

function onStatsChange(cid, attacker, type, combat, value)
if(isPlayer(cid) and not isPlayer(attacker) and getPlayerStorage(cid, 23585) > 0 and (type == STATSCHANGE_MANALOSS or type == STATSCHANGE_HEALTHLOSS)) then
return false
end
end

Se não der certo tenta esse

function onStatsChange(cid, attacker, type, combat, value)
if(isPlayer(cid) and not isPlayer(attacker) and getPlayerStorage(cid, 23585) > 0 and (type == STATSCHANGE_MANALOSS or type == STATSCHANGE_HEALTHLOSS)) then
value = 0
end
end

No login.lua procura algum registercreatureevent e põe embaixo

registerCreatureEvent(cid, "LoginProtection")
Em creaturescripts.xml fica

<event type="statschange" name="LoginProtection" event="script" value="nomedobloco.lua"/>

 

como funciona o tempo desse script ? 

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.1k

Informação Importante

Confirmação de Termo