99Max综合娱乐网站(旧版)

 找回密码
 立即注册
查看: 1126|回复: 0

/add 代码

  [复制链接]

升级   45.67%

发表于 2009-8-13 19:14:51 | 显示全部楼层 |阅读模式
package com.aionemu.gameserver.utils.chathandlers.admincommands;

import com.aionemu.gameserver.model.gameobjects.Player;
import com.aionemu.gameserver.model.gameobjects.components.PlayerEquipment;
import com.aionemu.gameserver.network.aion.serverpackets.SM_CI;
import com.aionemu.gameserver.services.PlayerService;
import com.aionemu.gameserver.world.World;
import com.google.inject.Inject;

public class AddEquipment extends AdminCommand
{

@Inject
private World world;

public AddEquipment()
{
super(\"add\");
}

public void executeCommand(Player admin, String[] params)
{
PlayerEquipment playerEquipment = admin.getPlayerEquipment();
if (playerEquipment == null) {
playerEquipment = new PlayerEquipment();
}
if (params.length == 1) {
if (params[0].equals(\"神力金属套\"))
{
playerEquipment.setArmor(110600421);
playerEquipment.setGloves(111600396);
playerEquipment.setBoots(114600386);

playerEquipment.setPauldron(112600378);
playerEquipment.setPants(113600391); break label1276:
}

if (params[0].equals(\"神力长袍套\"))
{
playerEquipment.setArmor(110100435);
playerEquipment.setGloves(111100364);
playerEquipment.setBoots(114100386);

playerEquipment.setPauldron(112100334);
playerEquipment.setPants(113100368); break label1276:
}

if (params[0].equals(\"神力皮革套\")) {
playerEquipment.setArmor(110300393);
playerEquipment.setGloves(111300363);
playerEquipment.setBoots(114300395);
playerEquipment.setPauldron(112300336);
playerEquipment.setPants(113300382); break label1276: }
if (params[0].equals(\"神力锁甲套\")) {
playerEquipment.setArmor(110500424);
playerEquipment.setGloves(111500406);
playerEquipment.setBoots(114500413);
playerEquipment.setPauldron(112500377);
playerEquipment.setPants(113500407); break label1276: }
if (params[0].equals(\"大族长金属套\")) {
playerEquipment.setArmor(110600465);
playerEquipment.setGloves(111600437);
playerEquipment.setBoots(114600424);
playerEquipment.setPauldron(112600418);
playerEquipment.setPants(113600434); break label1276: }
if (params[0].equals(\"大族长长袍套\")) {
playerEquipment.setArmor(110100479);
playerEquipment.setGloves(111100410);
playerEquipment.setBoots(114100426);
playerEquipment.setPauldron(112100375);
playerEquipment.setPants(113100409); break label1276: }
if (params[0].equals(\"大族长皮革套\")) {
playerEquipment.setArmor(110300440);
playerEquipment.setGloves(111300412);
playerEquipment.setBoots(114300439);
playerEquipment.setPauldron(112300375);
playerEquipment.setPants(113300425); break label1276: }
if (params[0].equals(\"大族长锁甲套\")) {
playerEquipment.setArmor(110500468);
playerEquipment.setGloves(111500449);
playerEquipment.setBoots(114500455);
playerEquipment.setPauldron(112500413);
playerEquipment.setPants(113500448); break label1276: }
if (params[0].equals(\"闪光白龙王金属套\")) {
playerEquipment.setArmor(110600735);
playerEquipment.setGloves(111600708);
playerEquipment.setBoots(114600695);
playerEquipment.setPauldron(112600684);
playerEquipment.setPants(113600701); break label1276: }
if (params[0].equals(\"闪光白龙王长袍套\")) {
playerEquipment.setArmor(110100819);
playerEquipment.setGloves(111100727);
playerEquipment.setBoots(114100756);
playerEquipment.setPauldron(112100688);
playerEquipment.setPants(113100737); break label1276: }
if (params[0].equals(\"闪光白龙王皮革套\")) {
playerEquipment.setArmor(110300771);
playerEquipment.setGloves(111300729);
playerEquipment.setBoots(114300769);
playerEquipment.setPauldron(112300688);
playerEquipment.setPants(113300754); break label1276: }
if (params[0].equals(\"闪光白龙王锁甲套\")) {
playerEquipment.setArmor(110500747);
playerEquipment.setGloves(111500716);
playerEquipment.setBoots(114500735);
playerEquipment.setPauldron(112500676);
playerEquipment.setPants(113500727); break label1276: }
if (params[0].equals(\"闪光暗龙王金属套\")) {
playerEquipment.setArmor(110600749);
playerEquipment.setGloves(111600722);
playerEquipment.setBoots(114600709);
playerEquipment.setPauldron(112600698);
playerEquipment.setPants(113600715); break label1276: }
if (params[0].equals(\"闪光暗龙王长袍套\")) {
playerEquipment.setArmor(110100833);
playerEquipment.setGloves(111100741);
playerEquipment.setBoots(114100770);
playerEquipment.setPauldron(112100702);
playerEquipment.setPants(113100751); break label1276: }
if (params[0].equals(\"闪光暗龙王皮革套\")) {
playerEquipment.setArmor(110300785);
playerEquipment.setGloves(111300743);
playerEquipment.setBoots(114300783);
playerEquipment.setPauldron(112300702);
playerEquipment.setPants(113300768); break label1276: }
if (params[0].equals(\"闪光暗龙王锁甲套\")) {
playerEquipment.setArmor(110500761);
playerEquipment.setGloves(111500730);
playerEquipment.setBoots(114500749);
playerEquipment.setPauldron(112500690);
playerEquipment.setPants(113500741); break label1276: }
if (params[0].equals(\"乌云贸易团的羽毛\"))
break label1276;
if (params[0].equals(\"塔罗雄之羽\"))
break label1276;
if (params[0].equals(\"深渊之羽\"))
break label1276;
if (params[0].equals(\"达尤玲玲之羽\"))
break label1276;
if (params[0].equals(\"暗黑之羽\"))
break label1276;
if (params[0].equals(\"黑云贸易团飞羽\"))
break label1276;
if (params[0].equalsIgnoreCase(\"hero\")) {
admin.setHero(true); break label1276: }
if (params[0].equalsIgnoreCase(\"disHero\")) {
admin.setHero(false); break label1276:
}
PlayerService.sendMessage(admin, \"没有这个道具或暂时没有实现!\");
return;
}
if (params.length == 2) {
if (\"武器\".equalsIgnoreCase(params[0])) {
playerEquipment.setWarmer(Integer.parseInt(params[1])); break label1276: }
if (\"盾牌\".equalsIgnoreCase(params[0])) {
playerEquipment.setShield(Integer.parseInt(params[1])); break label1276: }
if (\"头盔\".equalsIgnoreCase(params[0])) {
playerEquipment.setHelmet(Integer.parseInt(params[1])); break label1276: }
if (\"盔甲\".equalsIgnoreCase(params[0])) {
playerEquipment.setArmor(Integer.parseInt(params[1])); break label1276: }
if (\"手套\".equalsIgnoreCase(params[0])) {
playerEquipment.setGloves(Integer.parseInt(params[1])); break label1276: }
if (\"鞋子\".equalsIgnoreCase(params[0])) {
playerEquipment.setBoots(Integer.parseInt(params[1])); break label1276: }
if (\"左耳环\".equalsIgnoreCase(params[0])) {
playerEquipment.setLearrings(Integer.parseInt(params[1])); break label1276: }
if (\"右耳环\".equalsIgnoreCase(params[0])) {
playerEquipment.setRearrings(Integer.parseInt(params[1])); break label1276: }
if (\"左戒指\".equalsIgnoreCase(params[0])) {
playerEquipment.setLring(Integer.parseInt(params[1])); break label1276: }
if (\"右戒指\".equalsIgnoreCase(params[0])) {
playerEquipment.setRring(Integer.parseInt(params[1])); break label1276: }
if (\"项链\".equalsIgnoreCase(params[0])) {
playerEquipment.setNecklace(Integer.parseInt(params[1])); break label1276: }
if (\"肩甲\".equalsIgnoreCase(params[0])) {
playerEquipment.setPauldron(Integer.parseInt(params[1])); break label1276: }
if (\"裤子\".equalsIgnoreCase(params[0])) {
playerEquipment.setPants(Integer.parseInt(params[1])); break label1276: }
if (\"左灵魂石\".equalsIgnoreCase(params[0])) {
playerEquipment.setLshard(Integer.parseInt(params[1])); break label1276: }
if (\"右灵魂石\".equalsIgnoreCase(params[0])) {
playerEquipment.setRshard(Integer.parseInt(params[1])); break label1276: }
if (\"称号\".equalsIgnoreCase(params[0])) {
admin.setLegionName(params[1]); break label1276:
}
PlayerService.sendMessage(admin, \"命令参数错误,没有这个类型的道具:\" + params[0]);
return;
}

PlayerService.sendMessage(admin, \"命令参数应该为单个参数的套装名或翅膀名,其他请用物品类型和ID刷出!\");
return;

label1276: admin.setPlayerEquipment(playerEquipment);
admin.setProtectionActive(true);
PlayerService.sendPacket(admin, new SM_CI(admin, true));
this.world.despawn(admin);
this.world.setPosition(admin, admin.getWorldId(), admin.getX(), admin.getY(), admin.getZ(), admin.getHeading());
this.world.spawn(admin);
}
}
温馨提示:
1. 本站模拟器源于网络,经 99Max.mE 二次开发,仅供个人学习娱乐使用,切勿用于商业用途,否则后果自负!
2. 如需更好体验游戏内容,请前往官方游戏!不具备合法的运营模式,都是强盗,请勿擅自搭建私服!
3. 如本站内容有侵犯您的权益,请发送信息至QQ:372607220 或 EMAIL:372607220@qq.com ,我们会及时删除。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|99Max综合娱乐网站(旧版) ( 沪ICP备11024206号-1 )

GMT+8, 2025-4-7 03:39 , Processed in 0.180832 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表