- 0
-
Quem Está Navegando
- Nenhum usuário registrado visualizando esta página.
-
Posts
-
Los links estan caidos 😞
-
Olá, seu tópico se encontra com um ou mais links offline. Caso ainda possua o conteúdo, favor postar aqui mesmo no tópico ou mandar MP para algum staff que estaremos normalizando o tópico. Grato pela atenção!
-
Olá, é possível obter o arquivo para esses ícones? Olá, é possível obter o arquivo para esses ícones?
-
Voce usar a conta de admin q vc tem no server, vai em accounts e define o acess_level la. e vc entra auto. Eu tenho uma versão desse votesystem q tentei atualizar e com tutorial so acessar o link na minha assinatura em baixo.
-
Por Heverton Molina · Postado
Gente eu instalei aqui no meu servidor porem não sei qual e a senha pra entrar eu crio o login de admin mas e a senha onde eu coloco? -
Por juniinxt007 · Postado
Todos os Links dele Estao OFF -
Por JefersonFelisbino · Postado
Boa ! O icone dos agathions esta fora do ar "/ estou precisando -
Por juniinxt007 · Postado
Alguem pela misericordia teria o link dos Set S PVP e de todas as armas S coloridas PVP? @AllInOne -
Por L2BloodyWar · Postado
eu tava com um projeto acis 398 mais o java era 11 ai nao sei atualizar e desistir fui olhar essa lucera, mal tem arquivos sobre ele entao eo projeto mais atual ? se alguem tiver uma sourve/rev ja compilada boa fico a dispor no chat! meu intuito e aprender e tbm por online mais bem la na frente ai a 398 era limpa mais falaram que estava muito desatualizada e eu ia ter problema pra add qualquer coisa
-
Pergunta
IronMaiden
Boa noite,alguém me explica porque esse método não funciona no segundo exemplo ( activeChar.isAttackingNow() )
Eu gostaria que o char não clicasse perto do próprio pé em modo de combat.No primeiro exemplo dá tudo certo sem o método, no segundo que é a mesma coisa só com o método não acontece nada.
if (activeChar.isOutOfControl() || dx * dx + dy * dy < 5000)
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
activeChar.sendMessage("You were clicking too fast.");
return;
}
if (activeChar.isAttackingNow() && (activeChar.isOutOfControl() || dx * dx + dy * dy < 75000))
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
activeChar.sendMessage("You were clicking too fast.");
return;
}
O código completo;
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <
*/
package com.l2jfrozen.gameserver.network.clientpackets;
import java.nio.BufferUnderflowException;
import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.ai.CtrlIntention;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.actor.position.L2CharPosition;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
import com.l2jfrozen.gameserver.network.serverpackets.StopMove;
import com.l2jfrozen.gameserver.thread.TaskPriority;
import com.l2jfrozen.gameserver.util.IllegalPlayerAction;
import com.l2jfrozen.gameserver.util.Util;
import com.l2jfrozen.gameserver.model.L2Character;
@SuppressWarnings("unused")
public class MoveBackwardToLocation extends L2GameClientPacket
{
private int _targetX, _targetY, _targetZ, _originX, _originY, _originZ, _moveMovement;
private int _curX, _curY, _curZ; // for geodata
public TaskPriority getPriority()
{
return TaskPriority.PR_HIGH;
}
@Override
protected void readImpl()
{
_targetX = readD();
_targetY = readD();
_targetZ = readD();
_originX = readD();
_originY = readD();
_originZ = readD();
try
{
_moveMovement = readD(); // is 0 if cursor keys are used 1 if mouse is used
}
catch (BufferUnderflowException e)
{
if (Config.ENABLE_ALL_EXCEPTIONS)
e.printStackTrace();
// Ignore for now
if (Config.L2WALKER_PROTEC)
{
L2PcInstance activeChar = getClient().getActiveChar();
activeChar.sendPacket(SystemMessageId.HACKING_TOOL);
Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " trying to use L2Walker!", IllegalPlayerAction.PUNISH_KICK);
}
}
}
@Override
protected void runImpl()
{
L2PcInstance activeChar = getClient().getActiveChar();
if(activeChar == null)
return;
// Move flood protection
if (!getClient().getFloodProtectors().getMoveAction().tryPerformAction("MoveBackwardToLocation"))
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if(activeChar.getPrivateStoreType() != 0 ){
getClient().sendPacket(ActionFailed.STATIC_PACKET); // movements prohibited when in store or atk
return;
}
if (_targetX == _originX && _targetY == _originY && _targetZ == _originZ)
{
activeChar.sendPacket(new StopMove(activeChar));
return;
}
// Correcting targetZ from floor level to head level
_targetZ += activeChar.getTemplate().collisionHeight;
_curX = activeChar.getX();
_curY = activeChar.getY();
_curZ = activeChar.getZ();
if (activeChar.getTeleMode() > 0)
{
if (activeChar.getTeleMode() == 1)
activeChar.setTeleMode(0);
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
activeChar.teleToLocation(_targetX, _targetY, _targetZ, false);
return;
}
if (_moveMovement == 0 && !Config.ALLOW_USE_CURSOR_FOR_WALK)
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
else
{
double dx = _targetX - _curX;
double dy = _targetY - _curY;
// Can't move if character is confused, or trying to move a huge distance
if (activeChar.isOutOfControl() || dx * dx + dy * dy > 98010000) // 9900*9900
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
// Can't move if character is confused, or trying to move a huge distance
if (activeChar.isAttackingNow() && (activeChar.isOutOfControl() || dx * dx + dy * dy < 75000))
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
activeChar.sendMessage("You were clicking too fast.");
return;
}
if (activeChar.isOutOfControl() || dx * dx + dy * dy < 5000)
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
activeChar.sendMessage("You were clicking too fast.");
return;
}
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(_targetX, _targetY, _targetZ, 0));
}
}
@Override
public String getType()
{
return "[C] 01 MoveBackwardToLoc";
}
}
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts recomendados