zct223 發表於 2020-10-10 19:15

大陸JAVA技術分享 技術文章 之 一件組隊

分享一鍵血盟組隊

在C包下 C_NPCAction類下 新增

if (s.matches("yjzd"))
                            {
                                            Iterator<L1PcInstance> localPreparedStatement;
                                    for (localPreparedStatement = World.get().getAllPlayers().iterator(); localPreparedStatement.hasNext();)
                                    {
                                            L1PcInstance tgpc = (L1PcInstance)localPreparedStatement.next();
                                            if (pc.getLocation().isInScreen(tgpc.getLocation()) && !tgpc.isInParty() && tgpc.getClanname().equalsIgnoreCase(pc.getClanname()) && pc.getId() != tgpc.getId())
                                            {
                                                    tgpc.setPartyID(pc.getId());
                                                    tgpc.sendPackets(new S_Message_YN(953, pc.getName()));
                                                    pc.sendPackets(new S_SystemMessage((new StringBuilder("\\fR邀請與你\\fY同盟或無盟\\fR的玩家\\fY【")).append(tgpc.getName()).append("】\\fR加入隊伍!").toString()));
                                            }
                                            if (pc.getLocation().isInScreen(tgpc.getLocation()) && pc.getId() != tgpc.getId() && (tgpc.isInParty() || !tgpc.getClanname().equalsIgnoreCase(pc.getClanname())))
                                           
                                                    pc.sendPackets(new S_SystemMessage((new StringBuilder("\\fR玩家\\fY【")).append(tgpc.getName()).append("】\\fR與你\\fY不同盟\\fR或\\fV已經有隊伍了!").toString()));
                                    }

                                   
                            }       

請注意 else的寫法

此寫法是 執行道具的寫法 依薇版本!!               

大陸JAVA技術 QQ:263075225

zct223 發表於 2020-10-10 19:16

回覆是一種美德!!!

hua20 發表於 2020-10-11 00:02

感謝分享~推上去

19870922 發表於 2020-10-11 02:35

感謝分享

j89211047 發表於 2020-10-12 10:25

謝謝你的分享~~~

youpinpeng 發表於 2020-10-14 19:54

       
謝謝你的分享~~~

zct223 發表於 2020-10-17 08:02

感謝大家

Lineagelike520 發表於 2020-10-18 15:27

謝謝~~~~~

zymj628 發表於 2020-12-26 22:24

感谢分享

diypc 發表於 2021-3-4 16:51

謝謝你的分享~~~

asrr7654 發表於 2021-3-11 01:36

感謝分享

野性覺醒 發表於 2021-3-14 07:56

謝謝大大分享

野性覺醒 發表於 2021-3-25 00:21

感謝大大 無私分享

bennyst 發表於 2021-7-20 08:08

joe41324 發表於 2023-12-9 18:44

感謝分享

egg103 發表於 2024-8-20 00:05

谢谢分享屏幕坏了一个小时了了了了了了

喜歡嗎 發表於 2024-8-20 00:06

感謝大大分享

lin47411 發表於 2024-8-20 22:23

ˇ3QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ

egg103 發表於 2024-10-14 22:55

谢谢分享屏幕坏了一个小时了了

小酷車 發表於 2024-10-25 11:51

謝謝大大的教學 想學習又不知到該從哪裡
頁: [1]
查看完整版本: 大陸JAVA技術分享 技術文章 之 一件組隊