forked from MagicBane/Server
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.5 KiB
71 lines
2.5 KiB
3 years ago
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||
|
// Magicbane Emulator Project © 2013 - 2022
|
||
|
// www.magicbane.com
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||
|
// Magicbane Emulator Project © 2013 - 2022
|
||
|
// www.magicbane.com
|
||
|
|
||
|
|
||
|
package engine.devcmd.cmds;
|
||
|
|
||
|
import engine.devcmd.AbstractDevCmd;
|
||
|
import engine.net.client.msg.TargetedActionMsg;
|
||
|
import engine.objects.AbstractGameObject;
|
||
|
import engine.objects.PlayerCharacter;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @author Eighty
|
||
|
*
|
||
|
*/
|
||
|
public class CombatMessageCmd extends AbstractDevCmd {
|
||
|
|
||
|
public CombatMessageCmd() {
|
||
|
super("cm");
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected void _doCmd(PlayerCharacter pcSender, String[] args,
|
||
|
AbstractGameObject target) {
|
||
|
if (pcSender == null)
|
||
|
return;
|
||
|
if (args.length != 1) {
|
||
|
this.sendUsage(pcSender);
|
||
|
return;
|
||
|
}
|
||
|
int num = 0;
|
||
|
try {
|
||
|
num = Integer.parseInt(args[0]);
|
||
|
} catch (NumberFormatException e) {
|
||
|
throwbackError(pcSender, "Supplied message number " + args[0] + " failed to parse to an Integer");
|
||
|
return;
|
||
|
}
|
||
|
TargetedActionMsg.un2cnt = num;
|
||
|
throwbackInfo(pcSender, "CombatMessage set to " + num);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected String _getUsageString() {
|
||
|
return "' /cm [cmNumber]'";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected String _getHelpString() {
|
||
|
return "Sets the combat message to the supplied integer value";
|
||
|
}
|
||
|
|
||
|
}
|