玩私服首頁 | GM發布私服 | 在線人員: 721935
當前位置:玩私服>私服架設>加入大量天堂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]

 
其他分類
私服技巧
玩家分享
私服架設
私服新手區
 
相關推薦
天堂打稱號★顏色代碼★符號★教您如何使用!
超骨灰級!這些天堂技巧你知道多少?又用過多少?
天堂手動玩家的新手技巧~
怎麼上傳天堂盟徽?不會上傳天堂盟徽嗎?教您如何上傳!!
解決WIN7新注音在遊戲中無法選字的解決方法
WIN7不能玩天堂的解決方法
天堂盟徵看不見詳細的解決方法~!
天堂各職業出生/洗血配點.洗血後配點(王族篇)
天堂各職業出生/洗血配點.洗血後配點(騎士篇)
天堂各職業出生/洗血配點.洗血後配點(法師篇)
天堂各職業出生/洗血配點.洗血後配點(黑妖篇)
天堂各職業出生/洗血配點.洗血後配點(龍騎篇)
天堂各職業出生/洗血配點.洗血後配點(幻術篇)
天堂各職業出生/洗血配點.洗血後配點(妖精篇)
天堂的各種職業出生點法教學!
天堂1法師的幾種配點方法
天堂1如何雙開和多開?教你一招,百分百可以多開。
優化MYSQL數據庫減少天堂私服當機的機會!
天堂私服玩家不知道的秘密!!
天堂打稱號顏色代碼表讓你一目了然!
   

網站地圖關於玩私服玩私服列表免責聲明刊登廣告私服合作私服百科玩私服粉絲團玩私服 GOOGLE+
玩私服 © http://www.playsf.net/ Corporation All Rights Reserved.