复制内容到剪贴板
代码:
NL.RegPartyEvent(nil,"MyPartyEvent");
--Delegate.RegInit("Mypart_Init");
function MyPartyEvent(CharIndex, TargetCharIndex, Type)
Char.SetWindowTalkedEvent(nil, "MypartM_WindowTalked", CharIndex);
if(Type==0)then
local msg = "\\n\\n"..Char.GetData(CharIndex,%对象_名字%).." 申请加入您的队伍。\\n\\n是否同意其入队申请呢?\\n\\n同意入队请选择『是』,拒绝入队请选择『否』。\\n"
local addpartymsg = NLG.ShowWindowTalked(TargetCharIndex,CharIndex,%窗口_信息框%,%按钮_是否%,1,msg);
--MypartM_sg(Mypart_index, TargetCharIndex);
--MypartM_WindowTalked(CharIndex, TargetCharIndex,1,%按钮_否%,msg);
return 0;
end
return 1;
end
-- function MypartM_sg(_NpcIndex,_PlayerIndex)
-- local msg = "\\n\\n"..Char.GetData(_PlayerIndex,%对象_名字%).." 申请加入您的队伍。\\n\\n是否同意其入队申请呢?\\n\\n同意入队请选择『是』,拒绝入队请选择『否』。\\n"
-- local addpartymsg = NLG.ShowWindowTalked(_PlayerIndex,_NpcIndex,%窗口_信息框%,%按钮_是否%,1,msg);
-- return;
-- end
function MypartM_WindowTalked(_me,_tome,_seqno,_select,_data)
--NLG.SystemMessage(_me,_select);
if(tonumber(_seqno)==1 and tonumber(_select)==%按钮_否% and _data~="")then
NLG.SystemMessage(_me,"队长拒绝了您的入队申请!");
return;
end
--Char.JoinParty(_me,_tome);
return;
end
-- function initmypart_Init(index)
-- return 1;
-- end
-- function Mypart_create()
-- if (Mypart_index == nil) then
-- Mypart_index = NL.CreateNpc(nil, "initmypart_Init");
-- Char.SetData(Mypart_index,%对象_形象%,10414);
-- Char.SetData(Mypart_index,%对象_原形%,10414);
-- Char.SetData(Mypart_index,%对象_X%,18);
-- Char.SetData(Mypart_index,%对象_Y%,1);
-- Char.SetData(Mypart_index,%对象_地图%,777);
-- Char.SetData(Mypart_index,%对象_方向%,4);
-- Char.SetData(Mypart_index,%对象_名字%,"组队离队NPC");
-- NLG.UpChar(Mypart_index);
----Char.SetTalkedEvent(nil, "MypartM_sg", Mypart_index);
-- Char.SetWindowTalkedEvent(nil, "MypartM_WindowTalked", Mypart_index);
-- end
-- end
-- function Mypart_Init()
-- Mypart_create();
-- end
就是点组队后,队长会弹出是否同意组队的对话框,但是,我弄了好久没解决如何触发队长的选择,用npc的方式触发失败,至今没解决,希望知道的帮忙解决下啊。截图在我另一个帖子有发过的。