📄 l1teleporterinstance.java
字号:
case 50066: { // 海音村-魔法師里歐
price = new String[]{ "55","55","55","132","132","132","198","198","264","440","440","880","7810" };
}
break;
case 50068: { // 沉默洞穴-迪亞諾斯
price = new String[]{ "1500","800","600","1800","1800","1000" };
}
break;
case 50026: { // 古魯丁-商店村傳送師(內)
price = new String[]{ "550","700","810"};
}
break;
case 50033: { // 奇岩-商店村傳送師(內)
price = new String[]{ "560","720","560"};
}
break;
case 50049: { // 歐瑞-商店村傳送師(內)
price = new String[]{ "1150","980","590"};
}
break;
case 50059: { // 銀騎村-商店村傳送師(內)
price = new String[]{ "580","680","680"};
}
break;
default: {
price = new String[]{""};
}
}
player.sendPackets(new S_NPCTalkReturn(objid, html, price));
// 修正傳送師顯示傳送金額 end
} /*刪除else if (action.equalsIgnoreCase("teleportURLA")) {
L1NpcHtml html = new L1NpcHtml(talking.getTeleportURLA());
player.sendPackets(new S_NPCTalkReturn(objid, html));
}刪除*/
// 傳送師狩獵區設定
else if (action.equalsIgnoreCase("teleportURLA")) {
// 刪除L1NpcHtml html = new L1NpcHtml(talking.getTeleportURL());
// 刪除player.sendPackets(new S_NPCTalkReturn(objid, html));
// 修正傳送師顯示傳送金額
String html = "";
String[] price = null;
int npcid = getNpcTemplate().get_npcId();
switch(npcid)
{
case 50020: { // 魔法師史坦利
html = "telekent3";
price = new String[]{ "150","330","330","330","330","330","495","495","495","660","660" };
}
break;
case 50024: { // 魔法師史提夫
html = "telegludin3";
price = new String[]{ "140","308","308","308","462","462","462","462","616","770","770" };
}
break;
case 50036: { // 魔法師爾瑪
html = "telegiran3";
price = new String[]{ "150","150","150","330","330","330","330","495","495","495","660" };
}
break;
case 50039: { // 魔法師萊思利
html = "televala3";
price = new String[]{ "150","330","330","330","495","495","495","495","495","660","660" };
}
break;
case 50044: { // 魔法師西里烏斯
html = "sirius3";
price = new String[]{ "100","220","220","220","330","330","440","440","550","550","550" };
}
break;
case 50051: { // 魔法師吉利烏斯
html = "kirius3";
price = new String[]{ "150","330","495","495","495","660","660","825","825","825","825" };
}
break;
case 50046: { // 魔法師艾勒里斯
html = "elleris3";
price = new String[]{ "100","220","220","220","330","330","440","440","550","550","550" };
}
break;
case 50054: { // 魔法師特萊
html = "telewoods3";
price = new String[]{ "150","150","330","330","495","495","495","495","660","825","825" };
}
break;
case 50056: { // 魔法師麥特
html = "telesilver3";
price = new String[]{ "150","150","330","330","330","330","495","495","495","495","495" };
}
break;
case 50066: { // 魔法師里歐
html = "teleheine3";
price = new String[]{ "110","110","242","242","242","242","363","363","484","484","605" };
}
break;
default: {
price = new String[]{""};
}
}
player.sendPackets(new S_NPCTalkReturn(objid, html, price));
// 修正傳送師顯示傳送金額 end
// 傳送師狩獵區設定 end
} else if (action.equalsIgnoreCase("teleportURLA")) {
L1NpcHtml html = new L1NpcHtml(talking.getTeleportURLA());
player.sendPackets(new S_NPCTalkReturn(objid, html));
}
if (action.startsWith("teleport ")) {
_log.finest((new StringBuilder()).append("Setting action to : ")
.append(action).toString());
doFinalAction(player, action);
}
}
private void doFinalAction(L1PcInstance player, String action) {
int objid = getId();
int npcid = getNpcTemplate().get_npcId();
String htmlid = null;
boolean isTeleport = true;
if (npcid == 50014) { // ディロン
if (!player.getInventory().checkItem(40581)) { // アンデッドのキー
isTeleport = false;
htmlid = "dilongn";
}
} else if (npcid == 50043) { // ラムダ
if (_isNowDely) { // テレポートディレイ中
isTeleport = false;
}
} else if (npcid == 50625) { // 古代人(Lv50クエスト古代の空間2F)
if (_isNowDely) { // テレポートディレイ中
isTeleport = false;
}
}
if (isTeleport) { // テレポート実行
try {
// ミュータントアントダンジョン(君主Lv30クエスト)
if (action.equalsIgnoreCase("teleport mutant-dungen")) {
// 3マス以内のPc
for (L1PcInstance otherPc : L1World.getInstance()
.getVisiblePlayer(player, 3)) {
if (otherPc.getClanid() == player.getClanid()
&& otherPc.getId() != player.getId()) {
L1Teleport.teleport(otherPc, 32740, 32800, (short) 217, 5,
true);
}
}
L1Teleport.teleport(player, 32740, 32800, (short) 217, 5,
true);
}
// 試練のダンジョン(ウィザードLv30クエスト)
else if (action.equalsIgnoreCase("teleport mage-quest-dungen")) {
L1Teleport.teleport(player, 32791, 32788, (short) 201, 5,
true);
} else if (action.equalsIgnoreCase("teleport 29")) { // ラムダ
L1PcInstance kni = null;
L1PcInstance elf = null;
L1PcInstance wiz = null;
// 3マス以内のPc
for (L1PcInstance otherPc : L1World.getInstance()
.getVisiblePlayer(player, 3)) {
L1Quest quest = otherPc.getQuest();
if (otherPc.isKnight() // ナイト
&& quest.get_step(L1Quest.QUEST_LEVEL50) == 1) { // ディガルディン同意済み
if (kni == null) {
kni = otherPc;
}
} else if (otherPc.isElf() // エルフ
&& quest.get_step(L1Quest.QUEST_LEVEL50) == 1) { // ディガルディン同意済み
if (elf == null) {
elf = otherPc;
}
} else if (otherPc.isWizard() // ウィザード
&& quest.get_step(L1Quest.QUEST_LEVEL50) == 1) { // ディガルディン同意済み
if (wiz == null) {
wiz = otherPc;
}
}
}
if (kni != null && elf != null && wiz != null) { // 全クラス揃っている
L1Teleport.teleport(player, 32723, 32850, (short) 2000,
2, true);
L1Teleport.teleport(kni, 32750, 32851, (short) 2000, 6,
true);
L1Teleport.teleport(elf, 32878, 32980, (short) 2000, 6,
true);
L1Teleport.teleport(wiz, 32876, 33003, (short) 2000, 0,
true);
TeleportDelyTimer timer = new TeleportDelyTimer();
GeneralThreadPool.getInstance().execute(timer);
}
} else if (action.equalsIgnoreCase("teleport barlog")) { // 古代人(Lv50クエスト古代の空間2F)
L1Teleport.teleport(player, 32755, 32844, (short) 2002, 5,
true);
TeleportDelyTimer timer = new TeleportDelyTimer();
GeneralThreadPool.getInstance().execute(timer);
}
} catch (Exception e) {
}
}
if (htmlid != null) { // 表示するhtmlがある場合
player.sendPackets(new S_NPCTalkReturn(objid, htmlid));
}
}
class TeleportDelyTimer implements Runnable {
public TeleportDelyTimer() {
}
public void run() {
try {
_isNowDely = true;
Thread.sleep(900000); // 15分
} catch (Exception e) {
_isNowDely = false;
}
_isNowDely = false;
}
}
private boolean _isNowDely = false;
private static Logger _log = Logger
.getLogger(l1j.server.server.model.Instance.L1TeleporterInstance.class
.getName());
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -