Global_Reg.RegTalkEvent("zudui") --Global_Reg.RegDischargeParty ("lidui") function zudui(player, msg, color, range, size) local mapid = Char.GetData(player,%对象_地图类型%) local map = Char.GetData(player,%对象_地图%) local mapX = Char.GetData(player,%对象_X%) local mapY = Char.GetData(player,%对象_Y%) playerindex = Obj.FindObject(mapid,map,mapX,mapY) local TableLen = #playerindex -- player = playerindex[1] if msg == "P|/zd" then if TableLen >= 5 then player2 = playerindex[2] player3 = playerindex[3] player4 = playerindex[4] player5 = playerindex[5] player22 = Obj.GetCharIndex(player2) player33 = Obj.GetCharIndex(player3) player44 = Obj.GetCharIndex(player4) player55 = Obj.GetCharIndex(player5) player22d = Char.GetData(player22,%对象_组队模式%) player33d = Char.GetData(player33,%对象_组队模式%) player44d = Char.GetData(player44,%对象_组队模式%) player55d = Char.GetData(player55,%对象_组队模式%) if player22d == 0 then Char.JoinParty(player22, player) end if player33d == 0 then Char.JoinParty(player33, player) end if player44d == 0 then Char.JoinParty(player44, player) end if player55d == 0 then Char.JoinParty(player55, player) end NLG.UpdateParty(player) end if TableLen == 4 then player2 = playerindex[2] player3 = playerindex[3] player4 = playerindex[4] player5 = nil player22 = Obj.GetCharIndex(player2) player33 = Obj.GetCharIndex(player3) player44 = Obj.GetCharIndex(player4) player55 = nil player22d = Char.GetData(player22,%对象_组队模式%) player33d = Char.GetData(player33,%对象_组队模式%) player44d = Char.GetData(player44,%对象_组队模式%) player55d = nil if player22d == 0 then Char.JoinParty(player22, player) end if player33d == 0 then Char.JoinParty(player33, player) end if player44d == 0 then Char.JoinParty(player44, player) end NLG.UpdateParty(player) end if TableLen == 3 then player2 = playerindex[2] player3 = playerindex[3] player4 = nil player5 = nil player22 = Obj.GetCharIndex(player2) player33 = Obj.GetCharIndex(player3) player44 = nil player55 = nil player22d = Char.GetData(player22,%对象_组队模式%) player33d = Char.GetData(player33,%对象_组队模式%) player44d = nil player55d = nil if player22d == 0 then Char.JoinParty(player22, player) end if player33d == 0 then Char.JoinParty(player33, player) end NLG.UpdateParty(player) end if TableLen == 2 then player2 = playerindex[2] player3 = nil player4 = nil player5 = nil player22 = Obj.GetCharIndex(player2) player33 = nil player44 = nil player55 = nil player22d = Char.GetData(player22,%对象_组队模式%) player33d = nil player44d = nil player55d = nil if player22d == 0 then Char.JoinParty(player22, player) end NLG.UpdateParty(player) end end return 0 end --[[ function lidui (player) player2 = Char.GetTeamIndex(player, 1) player3 = Char.GetTeamIndex(player, 2) player4 = Char.GetTeamIndex(player, 3) player5 = Char.GetTeamIndex(player, 4) if CharIndex ~= nil then player = nil player2 = nil player3 = nil player4 = nil player5 = nil end if player2 ~= nil then player2 = nil end if player3 ~= nil then player3 = nil end if player4 ~= nil then player4 = nil end if player5 ~= nil then player5 = nil end NLG.SystemMessage(player,"角色名:" .. Char.GetData(player,%对象_名字%) .. "...1") NLG.SystemMessage(player2,"角色名:" .. Char.GetData(player2,%对象_名字%) .. "...2") NLG.SystemMessage(player3,"角色名:" .. Char.GetData(player3,%对象_名字%) .. "...3") NLG.SystemMessage(player4,"角色名:" .. Char.GetData(player4,%对象_名字%) .. "...4") NLG.SystemMessage(player5,"角色名:" .. Char.GetData(player5,%对象_名字%) .. "...5") return 0 end ]]