天堂123首頁 | GM發布私服 | 在線人員: 854028
當前位置:天堂123>私服架設>加入大量天堂GM命令大全!

加入大量天堂GM命令大全!

發表時間:2016-10-17

開啟 src/l1j/server/config.java
搜尋

public static double RATE_SHOP_PURCHASING_PRICE;

複製代碼
修改為

public static double RATE_SHOP_PURCHASING_PRICE;
// 新增遊戲管理員 .rates 線上調整機率、倍率
public static double RATE_XP_ORG;
public static double RATE_LA_ORG;
public static double RATE_KARMA_ORG;
public static double RATE_DROP_ADENA_ORG;
public static double RATE_DROP_ITEMS_ORG;
public static double RATE_WEIGHT_LIMIT_ORG;
// 新增遊戲管理員 .rates 線上調整機率、倍率

複製代碼
再搜尋

CREATE_CHANCE_HISTORY_BOOK = Integer.parseInt(rateSettings
.getProperty("CreateChanceHistoryBook", "50"));

複製代碼
修改為

CREATE_CHANCE_HISTORY_BOOK = Integer.parseInt(rateSettings
.getProperty("CreateChanceHistoryBook", "50"));
// 新增遊戲管理員 .rates 線上調整機率、倍率
RATE_XP_ORG = RATE_XP;
RATE_LA_ORG = RATE_LA;
RATE_KARMA_ORG = RATE_KARMA;
RATE_DROP_ADENA_ORG = RATE_DROP_ADENA;
RATE_DROP_ITEMS_ORG = RATE_DROP_ITEMS;
RATE_WEIGHT_LIMIT_ORG = RATE_WEIGHT_LIMIT;
// 新增遊戲管理員 .rates 線上調整機率、倍率

複製代碼
再搜尋

private Config() {
}

複製代碼
修改為

// 新增遊戲管理員 .rates 線上調整機率、倍率
public static void reset() {
_log.info("正在重新讀取機率配置.");
try {
RATE_XP = RATE_XP_ORG;
RATE_DROP_ADENA = RATE_DROP_ADENA_ORG;
RATE_DROP_ITEMS = RATE_DROP_ITEMS_ORG;
RATE_LA = RATE_LA_ORG;
RATE_KARMA = RATE_KARMA_ORG;
RATE_WEIGHT_LIMIT = RATE_WEIGHT_LIMIT_ORG;
} catch (Exception e) {
_log.severe(e.toString());
}
}
// 新增遊戲管理員 .rates 線上調整機率、倍率
private Config() {
}

複製代碼
新增檔案 src/l1j/server/server/command/executor/L1Rates.java (ANSI as UTF-8)

package l1j.server.server.command.executor;
import java.util.StringTokenizer;
import java.util.Collection;
import java.util.logging.Logger;
import l1j.server.Config;
import l1j.server.server.model.L1World;
import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_SystemMessage;
import l1j.server.server.serverpackets.S_WhoAmount;
public class L1Rates implements L1CommandExecutor {
private static Logger _log = Logger.getLogger(L1Rates.class.getName());
private L1Rates() {
}
public static L1CommandExecutor getInstance() {
return new L1Rates();
}
@Override
public void execute(L1PcInstance pc, String cmdName, String arg) {
String changed = "Error";
double data = 0;
try {
StringTokenizer stringtokenizer = new StringTokenizer(arg);
String param = stringtokenizer.nextToken();
if (param.equalsIgnoreCase("RESET")) {
Config.reset();
changed = "RESET";
} else {
String value = stringtokenizer.nextToken();
data = Double.parseDouble(value);
if (param.equalsIgnoreCase("XP")) {
Config.setParameterValue("RateXp", "" + (Config.RATE_XP_ORG * data));
changed = "XP";
} else if (param.equalsIgnoreCase("ADENA")) {
Config.setParameterValue("RateDropAdena", "" + (Config.RATE_DROP_ADENA_ORG * data));
changed = "ADENA";
} else if (param.equalsIgnoreCase("DROP")) {
Config.setParameterValue("RateDropItems", "" + (Config.RATE_DROP_ITEMS_ORG * data));
changed = "DROP";
} else if (param.equalsIgnoreCase("LAW")) {
Config.setParameterValue("RateLawful", "" + (Config.RATE_LA_ORG * data));
changed = "LAW";
} else if (param.equalsIgnoreCase("KARMA")) {
Config.setParameterValue("RateKarma", "" + (Integer.valueOf(value) * Config.RATE_KARMA_ORG));
changed = "KARMA";
} else if (param.equalsIgnoreCase("WEIGHT")) {
int rate = (int)(data * Config.RATE_WEIGHT_LIMIT_ORG);
Config.setParameterValue("Weightrate", "" + rate);
changed = "WEIGHT";
} else if (param.equalsIgnoreCase("ALL")) {
Config.setParameterValue("RateXp", "" + (Config.RATE_XP_ORG * data));
Config.setParameterValue("RateDropAdena", "" + (Config.RATE_DROP_ADENA_ORG * data));
Config.setParameterValue("RateDropItems", "" + (Config.RATE_DROP_ITEMS_ORG * data));
Config.setParameterValue("RateLawful", "" + (Config.RATE_LA_ORG * data));
Config.setParameterValue("RateKarma", "" + (Config.RATE_KARMA_ORG * data));
int rate = (int)(data * Config.RATE_WEIGHT_LIMIT_ORG);
Config.setParameterValue("Weightrate", "" + rate);
changed = "ALL";
} else {
pc.sendPackets(new S_SystemMessage("請輸入 .rates [XP,ADENA,DROP,LAW,KARMA,WEIGHT,ALL] [數值,RESET]"));
pc.sendPackets(new S_SystemMessage("經驗值: " + (int)Config.RATE_XP) + " 倍");
pc.sendPackets(new S_SystemMessage("金幣掉落: " + (int)Config.RATE_DROP_ADENA) + " 倍");
pc.sendPackets(new S_SystemMessage("物品掉落: " + (int)Config.RATE_DROP_ITEMS) + " 倍");
pc.sendPackets(new S_SystemMessage("正義值: " + (int)Config.RATE_LA) + " 倍");
pc.sendPackets(new S_SystemMessage("友好度: " + (int)Config.RATE_KARMA) + " 倍");
pc.sendPackets(new S_SystemMessage("負重率: " + (int)Config.RATE_WEIGHT_LIMIT) + " 倍");
}
}
} catch(Exception e) {
pc.sendPackets(new S_SystemMessage("請輸入 .rates [XP,ADENA,DROP,LAW,KARMA,WEIGHT,ALL] [數值,RESET]"));
pc.sendPackets(new S_SystemMessage("經驗值: " + (int)Config.RATE_XP) + " 倍");
pc.sendPackets(new S_SystemMessage("金幣掉落: " + (int)Config.RATE_DROP_ADENA) + " 倍");
pc.sendPackets(new S_SystemMessage("物品掉落: " + (int)Config.RATE_DROP_ITEMS) + " 倍");
pc.sendPackets(new S_SystemMessage("正義值: " + (int)Config.RATE_LA) + " 倍");
pc.sendPackets(new S_SystemMessage("友好度: " + (int)Config.RATE_KARMA) + " 倍");
pc.sendPackets(new S_SystemMessage("負重率: " + (int)Config.RATE_WEIGHT_LIMIT) + " 倍");
}
if (!changed.equals("Error")) {
if (changed.equals("RESET")) {
broadcastToAll("遊戲管理員將" + changed + "的倍率重新設定為 1.0 倍");
} else {
broadcastToAll("遊戲管理員將" + changed + "的倍率更改為 " + data + " 倍");
}
}
}

private void broadcastToAll(String s) {
L1World.getInstance().broadcastPacketToAll(new S_SystemMessage(s));
}
}

複製代碼
增加資料庫數據

INSERT INTO `commands` VALUES ('rates', '200', 'L1Rates');

複製代碼
遊戲中使用指令 .rates [XP,ADENA,DROP,LAW,KARMA,WEIGHT,ALL] [數值,RESET]

 
其他分類
私服技巧
玩家分享
私服架設
私服新手區
 
相關推薦
優化MYSQL數據庫減少天堂私服當機的機會!
天堂私服玩家不知道的秘密!!
天堂私服GM指令簡易列表!
一個為兒子買天幣的媽媽~淚流滿面!
一段被騙天堂帳號的回憶
揭密天堂私服電腦容易中毒的原因,以及某些私服業者惡意的行為!!
天堂私服玩家無法進入論壇與遊戲的解決方法之一!
天堂私服內LH2喝水設定詳細教學
天堂私服內建自動喝水LHZ使用教學
防止外掛特殊況狀使用喝水功能!
如何在天堂私服盟戰中發揮技巧~
教你Lineage3.0天堂不能玩私服的解決方法!
自我檢測無法玩天堂私服的原因!!
小妙招幾步驟可以幫助你更快速的玩天堂遊戲喔!!
玩天堂不關機延長電腦硬碟壽命的方法
總是打不贏別人嗎?看看天堂打架技巧教戰守則吧!!
天堂打稱號★顏色代碼★符號★教您如何使用!
超骨灰級!這些天堂技巧你知道多少?又用過多少?
怎麼上傳天堂盟徽?不會上傳天堂盟徽嗎?教您如何上傳!!
天堂各職業出生/洗血配點.洗血後配點(王族篇)
   


網站地圖關於天堂123天堂123列表免責聲明刊登廣告巴哈姆湯私服瘋私服百科天堂123粉絲團天堂123 GOOGLE+
天堂123 © http://www.playsf.net/ Corporation All Rights Reserved.