- UID
- 137702
- 閱讀權限
- 20
- 主題
- 32
- 帖子
- 64
- 精華
- 1
- A幣
- 338
- 在線時間
- 111 小時
- 最後登錄
- 2024-11-12
初窺門道
- 主題
- 32
- 帖子
- 64
- 精華
- 1
- 綜合社群主題發文量
- 0
- 電玩社群主題發文量
- 0
- 娛樂社群主題發文量
- 0
- 技術社群主題發文量
- 32
- 閱讀權限
- 20
- 註冊時間
- 2021-11-15
TA的每日心情 | 奮鬥 2024-1-28 13:17 |
---|
簽到天數: 1 天 連續簽到: 1 天 [LV.1]初來乍到
|
本帖最後由 chenhui540 於 2023-7-8 08:40 編輯
源碼部分:
case TD_MC_Openning: {//地圖ID:106020001
showIntro(c, "Effect/Direction2.img/open/back0");
showIntro(c, "Effect/Direction2.img/open/back1");
showIntro(c, "Effect/Direction2.img/open/chat");
showIntro(c, "Effect/Direction2.img/open/frame");
showIntro(c, "Effect/Direction2.img/open/light");
showIntro(c, "Effect/Direction2.img/open/line");
showIntro(c, "Effect/Direction2.img/open/out");
showIntro(c, "Effect/Direction2.img/open/pepeKing");
showIntro(c, "Effect/Direction2.img/open/violeta0");
showIntro(c, "Effect/Direction2.img/open/violeta1");
break;
}
case TD_MC_gasi: {//地圖ID:106020502
showIntro(c, "Effect/Direction2.img/gasi/gasi1");
showIntro(c, "Effect/Direction2.img/gasi/gasi2");
showIntro(c, "Effect/Direction2.img/gasi/gasi22");
showIntro(c, "Effect/Direction2.img/gasi/gasi3");
showIntro(c, "Effect/Direction2.img/gasi/gasi4");
showIntro(c, "Effect/Direction2.img/gasi/gasi5");
showIntro(c, "Effect/Direction2.img/gasi/gasi6");
showIntro(c, "Effect/Direction2.img/gasi/gasi7");
showIntro(c, "Effect/Direction2.img/gasi/gasi8");
break;
}
case TD_MC_gasi2: {
c.getSession().write(UIPacket.IntroLock(false));//關閉動畫鎖屏
break;
}
腳本部分:
/*
名字: 菇菇歌唱森林
地圖: 藍菇菇樹林2
描述: 100020400
*/
var quest = [2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2344, 2345];
function enter(pi) {
for (var i = 0; i < quest.length; i++)
if (pi.getQuestStatus(quest[i]) > 0) {
if (pi.getQuestStatus(quest[i]) < 2) {
pi.getPlayer().changeMap(pi.getMap(106020001), pi.getMap(106020001).getPortal(0)); //動畫地圖
return true;
}
pi.getPlayer().changeMap(pi.getMap(106020000), pi.getMap(106020000).getPortal(3)); //菇菇森林路口
return true;
}
pi.playerMessage(6, "[Portal]菇菇王國禁止外來者訪問。");
return false;
}
/*
名字: 荊棘解除劑
地圖: 荊棘解除劑
描述: 任務消耗品
*/
function start() {
if (im.getPlayer().getMap().getId() == 106020500) {
im.gainItem(2430015, -1);
if (im.getQuestStatus(2324) < 1) {
im.forceStartQuest(2324);
}
im.getQuestRecord(2324).setCustomData(1);
im.getPlayer().updateQuest(im.getQuestRecord(2324), true);
im.getPlayer().changeMap(im.getMap(106020502), im.getMap(106020502).getPortal(0)); //城壁邊邊
im.dispose();
return;
}
im.dispose();
im.openNpc(1300011);
}
雪吉拉和企鵝國王的由事件腳本控制
/*
名字: 菇菇王國
地圖: 東邊城塔
描述: 106021400
*/
var mobid = [3300005, 3300006, 3300007];
var mapEff = ["pepeKing/pepe/pepeB", "pepeKing/pepe/pepeG", "pepeKing/pepe/pepeW"];
function init() {//服務端讀取
em.setProperty("state", 0);
}
function setup(level, lobbyid) {//開始事件,時間
em.setProperty("state", 1);
var eim = em.newInstance("KingPepeAndYetis");
eim.startEventTimer(10 * 60000);
return eim;
}
function playerEntry(eim, player) {//傳送進事件地圖
var map = eim.getMapInstance(106021500);
num = Math.floor(Math.random() * 3);
map.resetFully();
var mob = em.getMonster(mobid[num]);//召喚怪物
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(-28, -67));
player.changeMap(map, map.getPortal(1));
map.broadcastMessage(Packages.tools.packet.EtcPacket.MapEff(mapEff[num]));
map.broadcastMessage(Packages.tools.packet.EtcPacket.MapEff("pepeKing/chat/nugu"));
}
function scheduledTimeout(eim) {//規定時間結束
eim.disposeIfPlayerBelow(100, 106021400);
}
function monsterValue(eim, mobId) {//殺怪後觸發
if (mobId == 3300005 || mobId == 3300006 || mobId == 3300007) {
eim.broadcastPlayerMsg(6, "你消滅了雪吉拉和企鵝國王。");
eim.getMapInstance(106021500).broadcastMessage(Packages.tools.packet.EtcPacket.showEffect("quest/party/clear"));
eim.getMapInstance(106021500).broadcastMessage(Packages.tools.packet.EtcPacket.playSound("Party1/Clear"));
eim.startEventTimer(3 * 60000);
}
return 1;
}
function playerDisconnected(eim, player) {//活動中角色斷開連接觸發
playerExit(eim, player);
}
function changedMap(eim, player, mapid) {//不在此地圖中事件結束
if (mapid != 106021500) {
playerExit(eim, player);
}
}
function playerExit(eim, player) {//角色退出時觸發
eim.unregisterPlayer(player);
if (eim.disposeIfPlayerBelow(0, 0)) {
em.setProperty("state", 0);
}
}
function allMonstersDead(eim) {}//怪物死亡觸發和刪除這個怪在活動中的資訊
function leftParty(eim, player) {}//離開小組觸發
function disbandParty(eim) {}//小組退出時觸發
function playerDead(eim, player) {}//玩家死亡時觸發
function playerRevive(eim, player) {}//玩家角色复時觸發
function cancelSchedule() {}//清除事件
|
|