{
Functions.sendDebugMessage(activeChar, "USAGE: //setnpcstate state");
return false;
}
int state;
GameObject target = activeChar.getTarget();
try
{
state = Integer.parseInt(wordList[1]);
}
catch (NumberFormatException e)
{
Functions.sendDebugMessage(activeChar, "You must specify state");
return false;
}
if (!target.isNpc())
{
Functions.sendDebugMessage(activeChar, "You must target an NPC");
return false;
}
NpcInstance npc = (NpcInstance) target;
npc.setNpcState(state);
break;
case admin_setareanpcstate:
try
{
final String val = fullString.substring(15).trim();
String[] vals = val.split(" ");
int range = NumberUtils.toInt(vals[0], 0);
int astate = vals.length > 1 ? NumberUtils.toInt(vals[1], 0) : 0;
for (NpcInstance n : activeChar.getAroundNpc(range, 200))
{
n.setNpcState(astate);
}
}
catch (Exception e)
{
Functions.sendDebugMessage(activeChar, "Usage: //setareanpcstate [range] [state]");
}
break;
case admin_showmovie:
if (wordList.length < 2)
{
Functions.sendDebugMessage(activeChar, "USAGE: //showmovie id");
return false;
}
int id;
try
{
id = Integer.parseInt(wordList[1]);
}
catch (NumberFormatException e)
{
Functions.sendDebugMessage(activeChar, "You must specify id");
return false;
}
activeChar.showQuestMovie(id);
break;
case admin_setzoneinfo:
if (wordList.length < 2)
{
Functions.sendDebugMessage(activeChar, "USAGE: //setzoneinfo id");
return false;
}
int stateid;
try
{
stateid = Integer.parseInt(wordList[1]);
}
catch (NumberFormatException e)
{
Functions.sendDebugMessage(activeChar, "You must specify id");
return false;
}
activeChar.broadcastPacket(new ExChangeClientEffectInfo(stateid));
break;
case admin_eventtrigger:
if (wordList.length < 2)
{
Functions.sendDebugMessage(activeChar, "USAGE: //eventtrigger id");
return false;
}
int triggerid;
try
{
triggerid = Integer.parseInt(wordList[1]);
}
catch (NumberFormatException e)
{
Functions.sendDebugMessage(activeChar, "You must specify id");
return false;
}
activeChar.broadcastPacket(new EventTrigger(triggerid, true));
break;
case admin_debug:
GameObject ob = activeChar.getTarget();
if (!ob.isPlayer())
{
Functions.sendDebugMessage(activeChar, "Only player target is allowed");
return false;
}
Player pl = ob.getPlayer();
List<String> _s = new ArrayList<>();
_s.add("==========TARGET STATS:");
_s.add("==Magic Resist: " + pl.calcStat(Stats.MAGIC_RESIST, null, null));
_s.add("==Magic Power: " + pl.calcStat(Stats.MAGIC_POWER, 1, null, null));
_s.add("==Skill Power: " + pl.calcStat(Stats.SKILL_POWER, 1, null, null));
_s.add("==Cast Break Rate: " + pl.calcStat(Stats.CAST_INTERRUPT, 1, null, null));
_s.add("==========Powers:");
_s.add("==Bleed: " + pl.calcStat(Stats.BLEED_POWER, 1, null, null));
_s.add("==Poison: " + pl.calcStat(Stats.POISON_POWER, 1, null, null));
_s.add("==Stun: " + pl.calcStat(Stats.STUN_POWER, 1, null, null));
_s.add("==Root: " + pl.calcStat(Stats.ROOT_POWER, 1, null, null));
_s.add("==Mental: " + pl.calcStat(Stats.MENTAL_POWER, 1, null, null));
_s.add("==Sleep: " + pl.calcStat(Stats.SLEEP_POWER, 1, null, null));
_s.add("==Paralyze: " + pl.calcStat(Stats.PARALYZE_POWER, 1, null, null));
_s.add("==Cancel: " + pl.calcStat(Stats.CANCEL_POWER, 1, null, null));
_s.add("==Debuff: " + pl.calcStat(Stats.DEBUFF_POWER, 1, null, null));
_s.add("==========PvP Stats:");
_s.add("==Phys Attack Dmg: " + pl.calcStat(Stats.PVP_PHYS_DMG_BONUS, 1, null, null));
_s.add("==Phys Skill Dmg: " + pl.calcStat(Stats.PVP_PHYS_SKILL_DMG_BONUS, 1, null, null));
_s.add("==Magic Skill Dmg: " + pl.calcStat(Stats.PVP_MAGIC_SKILL_DMG_BONUS, 1, null, null));
_s.add("==Phys Attack Def: " + pl.calcStat(Stats.PVP_PHYS_DEFENCE_BONUS, 1, null, null));
_s.add("==Phys Skill Def: " + pl.calcStat(Stats.PVP_PHYS_SKILL_DEFENCE_BONUS, 1, null, null));
_s.add("==Magic Skill Def: " + pl.calcStat(Stats.PVP_MAGIC_SKILL_DEFENCE_BONUS, 1, null, null));
_s.add("==========Reflects:");
_s.add("==Phys Dmg Chance: " + pl.calcStat(Stats.REFLECT_AND_BLOCK_DAMAGE_CHANCE, null, null));
_s.add("==Phys Skill Dmg Chance: " + pl.calcStat(Stats.REFLECT_AND_BLOCK_PSKILL_DAMAGE_CHANCE, null, null));
_s.add("==Magic Skill Dmg Chance: " + pl.calcStat(Stats.REFLECT_AND_BLOCK_MSKILL_DAMAGE_CHANCE, null, null));
_s.add("==Counterattack: Phys Dmg Chance: " + pl.calcStat(Stats.REFLECT_DAMAGE_PERCENT, null, null));
_s.add("==Counterattack: Phys Skill Dmg Chance: " + pl.calcStat(Stats.REFLECT_PSKILL_DAMAGE_PERCENT, null, null));
_s.add("==Counterattack: Magic Skill Dmg Chance: " + pl.calcStat(Stats.REFLECT_MSKILL_DAMAGE_PERCENT, null, null));
_s.add("==========MP Consume Rate:");
_s.add("==Magic Skills: " + pl.calcStat(Stats.MP_MAGIC_SKILL_CONSUME, 1, null, null));
_s.add("==Phys Skills: " + pl.calcStat(Stats.MP_PHYSICAL_SKILL_CONSUME, 1, null, null));
_s.add("==Music: " + pl.calcStat(Stats.MP_DANCE_SKILL_CONSUME, 1, null, null));
_s.add("==========Shield:");
_s.add("==Shield Defence: " + pl.calcStat(Stats.SHIELD_DEFENCE, null, null));
_s.add("==Shield Defence Rate: " + pl.calcStat(Stats.SHIELD_RATE, null, null));
_s.add("==Shield Defence Angle: " + pl.calcStat(Stats.SHIELD_ANGLE, null, null));
_s.add("==========Etc:");
_s.add("==Fatal Blow Rate: " + pl.calcStat(Stats.FATALBLOW_RATE, null, null));
_s.add("==Phys Skill Evasion Rate: " + pl.calcStat(Stats.PSKILL_EVASION, null, null));
_s.add("==Counterattack Rate: " + pl.calcStat(Stats.COUNTER_ATTACK, null, null));
_s.add("==Pole Attack Angle: " + pl.calcStat(Stats.POLE_ATTACK_ANGLE, null, null));
_s.add("==Pole Target Count: " + pl.calcStat(Stats.POLE_TARGET_COUNT, 1, null, null));
_s.add("==========DONE.");
for (String s : _s)
{
Functions.sendDebugMessage(activeChar, s);
}
break;
case admin_uievent:
if (wordList.length < 5)
{
Functions.sendDebugMessage(activeChar, "USAGE: //uievent isHide doIncrease startTime endTime Text");
return false;
}
int hide;
int increase;
int startTime;
int endTime;
String text;
try
{
hide = Integer.parseInt(wordList[1]);
increase = Integer.parseInt(wordList[2]);
startTime = Integer.parseInt(wordList[3]);
endTime = Integer.parseInt(wordList[4]);
text = wordList[5];
}
catch (NumberFormatException e)
{
Functions.sendDebugMessage(activeChar, "Invalid format");
return false;
}
activeChar.broadcastPacket(new ExSendUIEvent(activeChar, hide, increase, startTime, endTime, text));
break;
case admin_opensod:
if (wordList.length < 1)
{
Functions.sendDebugMessage(activeChar, "USAGE: //opensod minutes");
return false;
}
SoDManager.openSeed(Integer.parseInt(wordList[1]) * 60 * 1000L);
break;
case admin_closesod:
SoDManager.closeSeed();
break;
case admin_setsoistage:
if (wordList.length < 1)
{
Functions.sendDebugMessage(activeChar, "USAGE: //setsoistage stage[1-5]");
return false;
}
SoIManager.setCurrentStage(Integer.parseInt(wordList[1]));
break;
case admin_soinotify:
if (wordList.length < 1)
{
Functions.sendDebugMessage(activeChar, "USAGE: //soinotify [1-3]");
return false;
}
switch (Integer.parseInt(wordList[1]))
{
case 1:
SoIManager.notifyCohemenesKill();
break;
case 2:
SoIManager.notifyEkimusKill();
break;
case 3:
SoIManager.notifyHoEDefSuccess();
break;
}
break;
case admin_forcenpcinfo:
GameObject obj2 = activeChar.getTarget();
if (!obj2.isNpc())
{
Functions.sendDebugMessage(activeChar, "Only NPC target is allowed");
return false;
}
((NpcInstance) obj2).broadcastCharInfo();