魔力宝贝

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

[GA] FindGroup.lua--智能组队

[复制链接]
发表于 前天 02:04 | 显示全部楼层 |阅读模式
FindGroupNpcName = "智能组队"--寻求组队Npc名字
FindGroupNpcMetamo = 100658--寻求组队Npc形象
FindGroupNpcMap = {1000,1500}--寻求组队Npc所在地图组
FindGroupNpcPosX = {1,2}--寻求组队NpcX坐标组
FindGroupNpcPosY = {3,4}--寻求组队NpcY坐标组
FindGroupNpcDir = {6,4}--寻求组队Npc方向组

FindGroupMic = 1 --新队列创建后是否全服广播 1为广播否则不广播
ClassBalance = 1 --是否关闭职业歧视 1为关闭否则启用
AnnCostGold = 100000 --全服广播需要的魔币

FindGroupExplainMsg = "\n★特点:除练级点外全世界可以输入/2呼出本功能\n★功能:选择创建队伍可以建立一个全世界可查询的队伍队列,其余玩家可以选择加入队列来寻找自己想参加的队伍,当队伍人员达到要求时系统会自动帮你传送到练级or任务的起始点\n\n★注意事项:穿越之羽可以免去除等级外的任务前置要求,要好好利用哦(穿越之羽可以通过签到任务,商城购买获得)" --功能介绍文字
FindGroupTalkMsg = "/ZD" --寻求组队对话指令
FindGroupTalkStart = "OK" --寻求组队确认指令
FindGroupTalkStartLimetTime = 30 --就位确认秒数
FindGroupTalkDisAbleRdmMap = 0 --是否允许在随机地图使用此指令 1为允许 否则不允许
FindGroupTalkDisAbleMap = {} --寻求组队指令不生效地图
FindGroupTalkDisAbleMap[59865] = 1 --将地图编号100设置为不生效
FindGroupTalkDisAbleMap[11003] = 1 --将地图编号100设置为不生效
FindGroupTalkDisAbleMap[11015] = 1 --将地图编号100设置为不生效
FindGroupTalkDisAbleMap[15005] = 1 --将地图编号100设置为不生效
FindGroupTalkDisAbleMap[15595] = 1 --将地图编号100设置为不生效
FindGroupTalkDisAbleMap[15542] = 1 --将地图编号100设置为不生效
FindGroupTalkDisAbleMap[59670] = 1 --将地图编号100设置为不生效
FindGroupTalkDisAbleMap[33600] = 1 --将地图编号100设置为不生效
--注:只允许在拥有寻求组队Npc的地图进行创建和加入队伍

FindGroupTarget = {} --寻求组队传送目标 至少使用6组
--FindGroupTarget[1]的1 表示寻求组队传送目标的编号
--{a,b,c,d,e} 为5个传送目标的设置
--设置a 为传送目标的文字说明
--设置b 为传送目标的具体说明
--设置c 为传送目标的地图id
--设置d 为传送目标的x坐标
--设置e 为传送目标的y坐标
--FindGroupTarget[1] = {"试炼之塔☆30-40☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔一层 \n费用:100\n需求等级:30级\n需求道具:无\n前置任务:无",40563,101,102}
--FindGroupTarget[2] = {"试炼之塔☆40-50☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔二层 \n费用:200\n需求等级:40级\n需求道具:无\n前置任务:无",40563,115,100}
--FindGroupTarget[3] = {"试炼之塔☆50-60☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔三层 \n费用:300\n需求等级:50级\n需求道具:无\n前置任务:无",40563,130,98}
--FindGroupTarget[4] = {"试炼之塔☆60-70☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔四层 \n费用:400\n需求等级:60级\n需求道具:无\n前置任务:无",40563,143,95}
--FindGroupTarget[5] = {"试炼之塔☆70-80☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔五层 \n费用:500\n需求等级:70级\n需求道具:无\n前置任务:无",40563,157,94}
--FindGroupTarget[6] = {"试炼之塔☆80-90☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔六层 \n费用:600\n需求等级:80级\n需求道具:无\n前置任务:无",40563,171,93}
--FindGroupTarget[7] = {"试炼之塔☆90-100☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔七层 \n费用:700\n需求等级:90级\n需求道具:无\n前置任务:无",40563,189,88}
--FindGroupTarget[8] = {"试炼之塔☆100-110☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔八层 \n费用:800\n需求等级:100级\n需求道具:无\n前置任务:无",40563,200,89}
--FindGroupTarget[9] = {"☆试炼之塔☆顶层☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:试炼之塔顶层 \n费用:900\n需求等级:100\n需求道具:无\n前置任务:无",15542,17,18}
FindGroupTarget[1] = {"长老树精☆1转☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:打倒长老树精 \n费用:300\n需求等级:20\n需求道具:无\n前置任务:无",15507,29,14}
FindGroupTarget[2] = {"熊男☆怀旧系列任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:打倒熊男  \n说明:获得熊男的戒指\n费用:100\n需求等级:20\n需求道具:无\n前置任务:无",11004,17,20}
FindGroupTarget[3] = {"露比☆学习攻、魔吸☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:打倒露比 \n费用:500\n需求等级:20\n需求道具:无\n前置任务:无",3208,11,11}
FindGroupTarget[4] = {"法尔肯☆学习攻、魔反☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败法尔肯 \n费用:500\n需求等级:20\n需求道具:无\n前置任务:无",13001,14,7}
FindGroupTarget[5] = {"神兽☆2转☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败神兽 \n费用:800\n需求等级:40\n需求道具:无\n前置任务:一转",16511,26,28}
FindGroupTarget[6] = {"犹大☆开启者☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败犹大 \n费用:800\n需求等级:40\n需求道具:无\n前置任务:神兽的任务",24001,10,10}
FindGroupTarget[7] = {"双王☆3转☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败双王 \n费用:900\n需求等级:60\n需求道具:无\n前置任务:二转",24068,21,19}
FindGroupTarget[8] = {"冰召☆BBA任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败佛利波罗 \n费用:900\n需求等级:65\n需求道具:无\n前置任务:传说中的勇者",400,527,211}
FindGroupTarget[9] = {"风鸣之塔☆AKS任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败阿卡斯 \n费用:900\n需求等级:70\n需求道具:无\n前置任务:冰雪的牢城",4146,8,9}
FindGroupTarget[10] = {"六曜之塔☆LBLS任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败李贝留斯 \n费用:900\n需求等级:80\n需求道具:无\n前置任务:风鸣之塔",4146,8,9}
FindGroupTarget[11] = {"小帕☆小P任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:击败帕鲁凯斯 \n费用:1000\n需求等级:80\n需求道具:无\n前置任务:六曜之塔",43217,33,17}
FindGroupTarget[12] = {"龙拯☆龙9任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「龙之拯救者」 \n费用:2000\n需求等级:80\n需求道具:无\n前置任务:帕鲁凯斯的亡灵",43570,11,7}
FindGroupTarget[13] = {"北国☆任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「北国行者」 \n费用:2000\n需求等级:85\n需求道具:无\n前置任务:沉默之龙",43753,24,27}
FindGroupTarget[14] = {"解放☆任务☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「解放者」 \n费用:1000\n需求等级:90\n需求道具:无\n前置任务:盲目之龙",43700,70,72}
FindGroupTarget[15] = {"兰、艾八☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「兰国第八等勋章」或「艾尔巴第八等勋章」 \n费用:2200\n需求等级:75\n需求道具:无\n前置任务:无",33101,42,26}
FindGroupTarget[16] = {"艾七☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「艾尔巴第七等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:艾八",33500,34,51}
FindGroupTarget[17] = {"兰七☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「兰国第七等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:兰八",33500,81,71}
FindGroupTarget[18] = {"兰、艾六☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「兰国第六等勋章」或「艾尔巴第六等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:兰七、艾七",33103,14,12}
FindGroupTarget[19] = {"艾五☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「艾尔巴第五等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:艾六",33200,135,115}
FindGroupTarget[20] = {"兰五☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「兰国第五等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:兰六",33500,59,64}
FindGroupTarget[21] = {"兰、艾四☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「兰国第四等勋章」或「艾尔巴第四等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:兰五、艾五",43151,13,16}
FindGroupTarget[22] = {"兰、艾三☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「兰国第三等勋章」或「艾尔巴第三等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:兰四、艾四",43753,9,32}
FindGroupTarget[23] = {"兰、艾二☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:取得永久称号「兰国第二等勋章」或「艾尔巴第二等勋章」 \n费用:2500\n需求等级:75\n需求道具:无\n前置任务:兰三、艾三",43500,117,103}
FindGroupTarget[24] = {"兰一☆勋章系列☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的地:遗迹1楼(兰一艾一) \n费用:3500\n需求等级:80\n需求道具:无\n前置任务:兰二或艾二\n\n*玩家可以用穿越之羽无视前置任务,如成功传送则消耗一枚穿越之羽",33600,28,26}

--------************------



--FindGroupTarget[34] = {"冰岛☆练级☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:冰岛练级 \n费用:2000\n需求等级:60\n需求道具:无\n前置任务:完成二转",15400,53,46}
--FindGroupTarget[35] = {"内心☆练级☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:内心练级 \n费用:5000\n需求等级:120\n需求道具:无\n前置任务:",30192,7,9}
--FindGroupTarget[36] = {"砍精☆练级☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:砍精练级 \n费用:10000\n需求等级:90\n需求道具:无\n前置任务:",32052,102,102}
--FindGroupTarget[37] = {"里洞☆练级☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:里洞练级 \n费用:1000\n需求等级:20\n需求道具:无\n前置任务:",32511,2,29}
--FindGroupTarget[38] = {"彩叶原☆练级☆","☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆\n目的:彩叶原100-160练级 \n费用:30000\n需求等级:100\n需求道具:无\n前置任务:",32217,59,28}

FindGroupTargetLimet = {} --寻求组队传送目标限制
--FindGroupTargetLimet[1]的1 表示限制寻求组队传送目标1的条件 如果完全不限制此目标的传送则不需要写
--{a,b,c,d,e,f,g,h} 为具体的4个限制条件
--条件a 为每名队友需缴纳的魔币 不需要缴纳写0
--条件b 为每名队友需缴纳的道具id 不需要道具写0
--条件c 为每名队友需缴纳的道具数量 id为0时不检测
--条件d 设置需求的最低等级 输入数字 如不限制可输入0
--条件e 设置需求携带的道具 输入如{200,210} 表明必须同时携带编号为200和210的道具 不会收取道具 如不限制必须写nil
--条件f 设置需求的NowEvent 输入如{5} 表明必须NowEvent5的标识为1 如不限制必须写nil
--条件g 设置需求的EndEvent 输入如{91,92} 表明必须EndEvent91和EndEvent92的标识都为1 如不限制必须写nil
--条件h 喊话时追加内容。
--FindGroupTargetLimet[1] = {100,0,1,30,nil,nil,nil}--哈洞
--FindGroupTargetLimet[2] = {200,0,1,40,nil,nil,nil}--灵堂
--FindGroupTargetLimet[3] = {300,0,1,50,nil,nil,nil}--狗洞
--FindGroupTargetLimet[4] = {400,0,1,60,nil,nil,nil}--深绿
--FindGroupTargetLimet[5] = {500,0,1,70,nil,nil,nil}--海底
--FindGroupTargetLimet[6] = {600,0,1,80,nil,nil,nil}--魔法大学
--FindGroupTargetLimet[7] = {700,0,1,90,nil,nil,nil}--雪山
--FindGroupTargetLimet[8] = {800,0,1,100,nil,nil,nil}--炎洞
--FindGroupTargetLimet[9] = {900,0,1,100,nil,nil,nil}--水洞
FindGroupTargetLimet[1] = {300,0,1,20,nil,nil,nil}--树精长老
FindGroupTargetLimet[2] = {100,0,1,20,nil,nil,nil}--熊男
FindGroupTargetLimet[3] = {500,0,1,20,nil,nil,nil}--露比
FindGroupTargetLimet[4] = {500,0,1,20,nil,nil,nil}--法尔肯
FindGroupTargetLimet[5] = {800,0,1,40,nil,nil,nil}--神兽
FindGroupTargetLimet[6] = {800,0,1,40,nil,nil,nil}--犹大
FindGroupTargetLimet[7] = {900,0,1,60,nil,nil,nil}--双王
FindGroupTargetLimet[8] = {900,0,1,65,nil,nil,nil}--冰召
FindGroupTargetLimet[9] = {900,0,1,70,nil,nil,nil}--風鳴之塔
FindGroupTargetLimet[10] = {900,0,1,80,nil,nil,nil}--六曜之塔
FindGroupTargetLimet[11] = {1000,0,1,80,nil,nil,nil}--小P
FindGroupTargetLimet[12] = {2000,0,1,80,nil,nil,nil}--龙拯
FindGroupTargetLimet[13] = {2000,0,1,85,nil,nil,nil}--北国
FindGroupTargetLimet[14] = {2000,0,1,90,nil,nil,nil}--解放
FindGroupTargetLimet[15] = {2500,0,1,75,nil,nil,nil}--兰8
FindGroupTargetLimet[16] = {2500,0,1,75,nil,nil,nil}--兰7
FindGroupTargetLimet[17] = {2500,0,1,75,nil,nil,nil}--艾7
FindGroupTargetLimet[18] = {2500,0,1,75,nil,nil,nil}--兰6
FindGroupTargetLimet[19] = {2500,0,1,75,nil,nil,nil}--兰5
FindGroupTargetLimet[20] = {2500,0,1,75,nil,nil,nil}--艾5
FindGroupTargetLimet[21] = {2500,0,1,75,nil,nil,nil}--兰4
FindGroupTargetLimet[22] = {2500,0,1,75,nil,nil,nil}--兰3
FindGroupTargetLimet[23] = {2500,0,1,75,nil,nil,nil}--兰2
FindGroupTargetLimet[24] = {3500,0,1,80,{16438},nil,nil,"需要完成有隶属的项链才可以建立和加入队伍"}--兰1

NoLimetItemTemp = {54596,0} --取消条件e,f,g限制 并降低条件d限制所需道具 不符合条件时会自动收取1个此道具
NoLimetItemForever = {0,10} --取消条件e,f,g限制 并降低条件d限制限制所需道具 不会收取此道具
--{itemid,leveldown} itemid为道具id leveldown为可降低的限制等级

JobName = {}
JobName[0] = "游民"
JobName[10] = "剑士"
JobName[20] = "战斧斗士"
JobName[30] = "骑士"
JobName[40] = "弓箭手"
JobName[50] = "士兵"
JobName[60] = "传教士"
JobName[70] = "魔术师"
JobName[80] = "咒术师"
JobName[90] = "封印师"
JobName[100] = "饲养员"
JobName[110] = "驯兽师"
JobName[120] = "盗贼"
JobName[130] = "巫师"
JobName[140] = "格斗士"
JobName[150] = "忍者"



-------------------------------------------------
Delegate.RegDelLoginEvent("FindGroupValue8")
Delegate.RegDelAllOutEvent("FindGroupValue8")
Delegate.RegDelTalkEvent("FindGroupValue9")
FindGroupValue1 = FindGroupValue1 or {}
FindGroupValue2 = FindGroupValue2 or {}
FindGroupValue3 = FindGroupValue3 or {}
FindGroupValue4 = FindGroupValue4 or {}
FindGroupValue5 = FindGroupValue5 or {}
FindGroupValue6 = FindGroupValue6 or {}
FindGroupValue7 = {}
for k,v in pairs(FindGroupNpcMap) do
        FindGroupValue7[v] = 1
end

function FindGroupValue8(player)
        FindGroupValue14(player)
end

function FindGroupValue9(player,FindGroupValue28,color,range,size)
        if FindGroupValue28 == FindGroupTalkMsg then
                local FindGroupValue25 = Char.GetData(player,%对象_MAP%)
                local FindGroupValue26 = Char.GetData(player,%对象_地图%)
                if FindGroupTalkDisAbleRdmMap ~= 1 and FindGroupValue25 == 1 then
                        NLG.SystemMessage(player,"不允许在迷宫中使用寻求组队指令。")
                        return
                elseif FindGroupValue25 == 0 and FindGroupTalkDisAbleMap[FindGroupValue26] then
                        NLG.SystemMessage(player,"本地图不允许使用寻求组队指令。")
                        return
                else
                        if Char.GetData(FindGroupValue24,(%对象_序%)) == (%对象类型_怪%) then
                                local FindGroupValue27
                                if FindGroupValue2[player] == player then
                                        FindGroupValue27 = "2\n            ******寻求组队******\n\n◎使用说明◎\n☆管理队列☆\n◆重新创建队列◆\n☆解散队列☆\n◎☆◆☆立刻出发☆◆☆◎"
                                else
                                        FindGroupValue27 = "2\n            ******寻求组队******\n\n◎使用说明◎\n☆查看现有队列☆\n◆创建新的队列◆\n☆离开队列☆"
                                end
                                NLG.ShowWindowTalked(player,FindGroupValue24,2,2,0,FindGroupValue27)
                        else
                                NLG.SystemMessage(player,"非法的Npc索引")
                        end
                end
        elseif FindGroupValue28 == FindGroupTalkStart then
                if FindGroupValue2[player] and FindGroupValue2[player] ~= player then
                        if FindGroupValue4[player] then
                                if FindGroupValue4[player][1] then
                                        NLG.SystemMessage(player,"您已经就位确认过了。")
                                else
                                        if FindGroupValue4[player][2] >= os.time() then
                                                FindGroupValue4[player][1] = 1
                                                FindGroupValue6[FindGroupValue2[player]][2] = FindGroupValue6[FindGroupValue2[player]][2] + 1
                                                for k,v in pairs(FindGroupValue1[FindGroupValue2[player]][6]) do
                                                        NLG.SystemMessage(v,FindGroupValue11(player).."已经就位确认。")
                                                end
                                                NLG.SystemMessage(FindGroupValue2[player],FindGroupValue11(player).."已经就位确认。")
                                                if FindGroupValue6[FindGroupValue2[player]][2] >= (FindGroupValue1[FindGroupValue2[player]][4]-1) then
                                                        FindGroupValue19(FindGroupValue2[player])
                                                end
                                        else
                                                NLG.SystemMessage(player,"您的就位确认已过期。")
                                        end
                                end
                        else
                                NLG.SystemMessage(player,"尚未开始就位确认或您的就位确认已过期。")
                        end
                else
                        NLG.SystemMessage(player,"您没有队列或您是队长。")
                end
        end
end

function FindGroupValue10(class)
        if ClassBalance == 1 then
                return 6
        elseif class == 70 then
                return 5
        elseif class == 70 or class == 140 then
                return 4
        elseif class == 70 or class == 140 or class == 40 then
                return 3
        elseif class == 70 or class == 140 or class == 40 or class == 10 or class == 20 or class == 30 or class == 60 then
                return 2
        else
                return 1
        end
end

function FindGroupValue11(player)
        local FindGroupValue28 = ""
        if Char.GetData(player,(%对象_序%)) == (%对象类型_人%) then
                local FindGroupValue29 = JobName[Char.GetData(player,%对象_职类ID%)] or "其他职业"
                FindGroupValue28 = Char.GetData(player,%对象_名字%).."(Lv"..Char.GetData(player,%对象_等级%)..FindGroupValue29..")"
        end
        return FindGroupValue28
end

function FindGroupValue12(player,FindGroupValue47,levellimet,FindGroupValue45)
        local FindGroupValue30 = nil
        local FindGroupValue31 = nil
        if type(FindGroupTargetLimet[FindGroupValue47][2]) == "number" and FindGroupTargetLimet[FindGroupValue47][2] > 0 then
                if Char.ItemNum(player,FindGroupTargetLimet[FindGroupValue47][2]) >= FindGroupTargetLimet[FindGroupValue47][3] then
                else
                        FindGroupValue30 = 3
                end
        end
        if Char.GetData(player,%对象_等级%) >= levellimet then               
        else
                FindGroupValue30 = 4
        end
        if type(FindGroupTargetLimet[FindGroupValue47][5]) == "table" then
                for k,v in pairs(FindGroupTargetLimet[FindGroupValue47][5]) do
                        if Char.ItemNum(player,v) > 0 then
                       
                        else
                                FindGroupValue30 = 5
                        end
                end
        end
        if type(FindGroupTargetLimet[FindGroupValue47][6]) == "table" then
                for k,v in pairs(FindGroupTargetLimet[FindGroupValue47][6]) do
                        if Char.NowEvent(player,v) == 1 then
                       
                        else
                                FindGroupValue30 = 6
                        end
                end
        end
        if type(FindGroupTargetLimet[FindGroupValue47][7]) == "table" then
                for k,v in pairs(FindGroupTargetLimet[FindGroupValue47][7]) do
                        if Char.EndEvent(player,v) == 1 then
                       
                        else
                                FindGroupValue30 = 7
                        end
                end
        end
        if FindGroupValue45 > FindGroupValue10(Char.GetData(player,%对象_职类ID%)) then
                FindGroupValue30 = 1
        end       
        if type(FindGroupTargetLimet[FindGroupValue47][1]) == "number" and FindGroupTargetLimet[FindGroupValue47][1] > 0 then
                if Char.GetData(player,%对象_金币%) >= FindGroupTargetLimet[FindGroupValue47][1] then
                else
                        FindGroupValue30 = 2
                end
        end
        if FindGroupValue30 == nil then
                FindGroupValue30 = 0
        elseif FindGroupValue30 >= 1 and FindGroupValue30 <=3 then
               
        elseif FindGroupValue30 >= 4 and FindGroupValue30 <=7 then
                if Char.ItemNum(player,NoLimetItemForever[1]) > 0 then
                        if Char.GetData(player,%对象_等级%) >= levellimet - NoLimetItemForever[2] then
                                FindGroupValue30 = 0
                        else
                                FindGroupValue30 = 4
                        end
                elseif Char.ItemNum(player,NoLimetItemTemp[1]) > 0 then
                        if Char.GetData(player,%对象_等级%) >= levellimet - NoLimetItemTemp[2] then
                                FindGroupValue30 = 0
                                FindGroupValue31 = 1
                        else
                                FindGroupValue30 = 4
                        end
                end
        end
        return FindGroupValue30,FindGroupValue31
end

function FindGroupValue13(player)
        local FindGroupValue32 = Char.GetData(player,(%对象_序%))
        local FindGroupValue33 = Char.GetData(player,(%对象_战斗中%))
        if FindGroupValue32 == (%对象类型_人%) then
                if FindGroupValue33 == 0 then
                        return 1
                end
        end
        return nil
end

function FindGroupValue14(player)
        if FindGroupValue2[player] then
                if FindGroupValue2[player] == player then
                        for k,v in pairs(FindGroupValue1[player][6]) do
                                FindGroupValue4[v] = nil
                                FindGroupValue2[v] = nil
                                NLG.SystemMessage(v,"您所在队列已经解散。")
                        end
                        FindGroupValue1[player] = nil
                        FindGroupValue2[player] = nil
                        FindGroupValue5[player] = nil
                        FindGroupValue6[player] = nil
                        NLG.SystemMessage(player,"您已经解散队列。")
                else
                        if type(FindGroupValue1[FindGroupValue2[player]]) == "table" then
                                if type(FindGroupValue1[FindGroupValue2[player]][6]) == "table" then
                                        for k,v in pairs(FindGroupValue1[FindGroupValue2[player]][6]) do
                                                if player == v then
                                                        table.remove(FindGroupValue1[FindGroupValue2[player]][6],k)
                                                        break
                                                end
                                        end
                                        NLG.SystemMessage(FindGroupValue2[player],Char.GetData(player,%对象_名字%).."已经离开您的队列。")
                                end
                        end
                        if FindGroupValue4[player] then
                                if FindGroupValue4[player][1] then
                                        FindGroupValue6[FindGroupValue2[player]][2] = FindGroupValue6[FindGroupValue2[player]][2] - 1
                                end
                        end
                        FindGroupValue4[player] = nil
                        FindGroupValue2[player] = nil
                        NLG.SystemMessage(player,"您已经离开队列。")
                end
        end
        FindGroupValue1[player] = nil
        FindGroupValue2[player] = nil
        FindGroupValue3[player] = {}
end

function FindGroupValue15(player,FindGroupValue47,levellimet,FindGroupValue45,teamnumber,FindGroupValue28)
        local FindGroupValue25 = Char.GetData(player,%对象_MAP%)
        local FindGroupValue26 = Char.GetData(player,%对象_地图%)
        if FindGroupValue25 == 0 and FindGroupValue7[FindGroupValue26] then
                local FindGroupValue34 = levellimet
                if type(FindGroupTargetLimet[FindGroupValue47][4]) == "number" then
                        if FindGroupValue34 < FindGroupTargetLimet[FindGroupValue47][4] then
                                FindGroupValue34 = FindGroupTargetLimet[FindGroupValue47][4]
                        end
                end
                local FindGroupValue35 = FindGroupValue45
                if FindGroupValue35 > FindGroupValue10(Char.GetData(player,%对象_职类ID%)) then
                        FindGroupValue35 = FindGroupValue10(Char.GetData(player,%对象_职类ID%))
                end
                local FindGroupValue36 = FindGroupValue12(player,FindGroupValue47,FindGroupValue34,FindGroupValue45)
                if FindGroupValue36 == 0 then
                        FindGroupValue14(player)
                        FindGroupValue1[player] = {FindGroupValue47,FindGroupValue34,FindGroupValue35,teamnumber,FindGroupValue28,{}}
                        FindGroupValue2[player] = player
                        FindGroupValue5[player] = 1
                        NLG.SystemMessage(player,"您的队列已经创建成功。请耐心等待其他玩家加入。")
                        if FindGroupMic == 1 and teamnumber > 1 then
                                local annmsg = FindGroupValue11(player).." 正在寻找"..(teamnumber-1).."名至少Lv"..levellimet.."的勇士一起前往"..FindGroupTarget[FindGroupValue47][1].."!"
                                if FindGroupTargetLimet[FindGroupValue47] then
                                        if FindGroupTargetLimet[FindGroupValue47][8] then
                                                annmsg = annmsg..FindGroupTargetLimet[FindGroupValue47][8]
                                        end
                                end
                                NLG.SystemMessage(-1,annmsg)
                        end
                        if teamnumber == 1 then
                                FindGroupValue18(player)
                        end
                elseif FindGroupValue36 == 1 then
                        NLG.SystemMessage(player,"您的职业不符合队长的需求。")
                elseif FindGroupValue36 == 2 then
                        NLG.SystemMessage(player,"您的魔币不足。")
                elseif FindGroupValue36 == 3 then
                        NLG.SystemMessage(player,"您没有所需的消耗道具。")
                elseif FindGroupValue36 == 4 then
                        NLG.SystemMessage(player,"您的等级太低。")
                elseif FindGroupValue36 == 5 then
                        NLG.SystemMessage(player,"您没有所需的道具。")
                elseif FindGroupValue36 == 6 then
                        NLG.SystemMessage(player,"您没有完成前置任务。")
                elseif FindGroupValue36 == 7 then
                        NLG.SystemMessage(player,"您没有完成前置任务。")
                else
                        NLG.SystemMessage(player,"其他未知错误。")
                end
        else
                NLG.SystemMessage(player,"只能在"..FindGroupNpcName.."所在的地图创建队列。")
        end
end

function FindGroupValue16(player)
        local FindGroupValue37 = {}
        for k,v in pairs(FindGroupValue1) do
                if FindGroupValue5[k] then
                        if player ~= k then
                                local FindGroupValue36 = FindGroupValue12(player,v[1],v[2],v[3])
                                if FindGroupValue36 == 0 then
                                        table.insert(FindGroupValue37,k)
                                end
                        end
                end
        end
        return FindGroupValue37
end

function FindGroupValue17(player,groupindex)
        if FindGroupValue5[groupindex] then
                local FindGroupValue25 = Char.GetData(player,%对象_MAP%)
                local FindGroupValue26 = Char.GetData(player,%对象_地图%)
                if FindGroupValue25 == 0 and FindGroupValue7[FindGroupValue26] then
                        if type(FindGroupValue1[groupindex]) == "table" then
                                local FindGroupValue36 = FindGroupValue12(player,FindGroupValue1[groupindex][1],FindGroupValue1[groupindex][2],FindGroupValue1[groupindex][3])
                                if FindGroupValue36 == 0 then
                                        FindGroupValue14(player)
                                        table.insert(FindGroupValue1[groupindex][6],player)
                                        FindGroupValue2[player] = groupindex
                                        NLG.SystemMessage(player,"加入队列成功。")
                                        NLG.SystemMessage(groupindex,FindGroupValue11(player).."加入了您的队列。")               
                                        if #FindGroupValue1[groupindex][6] >= FindGroupValue1[groupindex][4]-1 then
                                                FindGroupValue18(groupindex)
                                        end
                                elseif FindGroupValue36 == 1 then
                                        NLG.SystemMessage(player,"您的职业不符合队长的需求。")
                                elseif FindGroupValue36 == 2 then
                                        NLG.SystemMessage(player,"您的魔币不足。")
                                elseif FindGroupValue36 == 3 then
                                        NLG.SystemMessage(player,"您没有所需的消耗道具。")
                                elseif FindGroupValue36 == 4 then
                                        NLG.SystemMessage(player,"您的等级太低。")
                                elseif FindGroupValue36 == 5 then
                                        NLG.SystemMessage(player,"您没有所需的道具。")
                                elseif FindGroupValue36 == 6 then
                                        NLG.SystemMessage(player,"您没有完成前置任务。")
                                elseif FindGroupValue36 == 7 then
                                        NLG.SystemMessage(player,"您没有完成前置任务。")
                                end
                        else
                                NLG.SystemMessage(player,"您选择的队伍已被解散。")
                        end
                else
                        NLG.SystemMessage(player,"只能在"..FindGroupNpcName.."所在的地图加入队列。")
                end
        else
                NLG.SystemMessage(player,"您选择的队伍已经出发。")
        end
end

function FindGroupValue18(groupindex)
        FindGroupValue5[groupindex] = nil
        if FindGroupValue1[groupindex][4] >= 2 then
                FindGroupValue6[groupindex] = {os.time()+FindGroupTalkStartLimetTime,0}
                for k,v in pairs(FindGroupValue1[groupindex][6]) do
                        FindGroupValue4[v] = {nil,os.time()+FindGroupTalkStartLimetTime}
                        NLG.SystemMessage(v,"前往"..FindGroupTarget[FindGroupValue1[groupindex][1]][1].."的队伍已有"..(#FindGroupValue1[groupindex][6]).."名队员并准备出发,请您在"..FindGroupTalkStartLimetTime.."秒内离开战斗并输入 "..FindGroupTalkStart.." 就位。否则视为您拒绝此队列。")
                end
                NLG.SystemMessage(groupindex,"您的队伍已经满员并开始就位确认,。")
        else
                NLG.SystemMessage(groupindex,"单人队伍立即出发。")
                FindGroupValue19(groupindex)
        end
end

function FindGroupValue19(groupindex)
        local FindGroupValue38 = 0
        local FindGroupValue36
        local FindGroupValue39 = {}
        for k,v in pairs(FindGroupValue1[groupindex][6]) do
                if FindGroupValue13(v) then
                        FindGroupValue36,FindGroupValue39[v] = FindGroupValue12(v,FindGroupValue1[groupindex][1],FindGroupValue1[groupindex][2],FindGroupValue1[groupindex][3])
                        if FindGroupValue36 == 0 then
                               
                        else
                                FindGroupValue38 = nil
                                NLG.SystemMessage(v,"队列已完成,但您处于无法出发的状态。")
                                FindGroupValue14(v)
                        end
                else
                        FindGroupValue38 = nil
                        NLG.SystemMessage(v,"队列已完成,但您处于无法出发的状态。")
                        FindGroupValue14(v)
                end
        end
        if FindGroupValue13(groupindex) then
                FindGroupValue36,FindGroupValue39[groupindex] = FindGroupValue12(groupindex,FindGroupValue1[groupindex][1],FindGroupValue1[groupindex][2],FindGroupValue1[groupindex][3])
                if FindGroupValue36 == 0 then
               
                else
                        FindGroupValue38 = nil
                        NLG.SystemMessage(v,"队列已完成,但您无法出发。")
                        FindGroupValue14(v)
                end
        else
                FindGroupValue38 = nil
                NLG.SystemMessage(groupindex,"队列已完成,但您无法出发。")
                FindGroupValue14(groupindex)
        end
        if FindGroupValue38 then
                table.insert(FindGroupValue1[groupindex][6],groupindex)
                for k,v in pairs(FindGroupValue1[groupindex][6]) do
                        if FindGroupTargetLimet[FindGroupValue1[groupindex][1]] then
                                if FindGroupTargetLimet[FindGroupValue1[groupindex][1]][1] > 0 then
                                        Char.SetData(v,%对象_金币%,Char.GetData(v,%对象_金币%)-FindGroupTargetLimet[FindGroupValue1[groupindex][1]][1])
                                        NLG.SystemMessage(v,"交出了"..FindGroupTargetLimet[FindGroupValue1[groupindex][1]][1].."魔币。")
                                end
                                if FindGroupTargetLimet[FindGroupValue1[groupindex][1]][2] > 0 then
                                        Char.DelItem(v,FindGroupTargetLimet[FindGroupValue1[groupindex][1]][2],FindGroupTargetLimet[FindGroupValue1[groupindex][1]][3])
                                end
                                if FindGroupValue39[v] then
                                        Char.DelItem(v,NoLimetItemTemp[1],1)
                                end                               
                        end
                        if Char.PartyNum(v) > 1 then
                                Char.DischargeParty(v)
                        end
                        NLG.UpChar(v)
                        Char.Warp(v,0,FindGroupTarget[FindGroupValue1[groupindex][1]][3],FindGroupTarget[FindGroupValue1[groupindex][1]][4],FindGroupTarget[FindGroupValue1[groupindex][1]][5])
                end
                for k,v in pairs(FindGroupValue1[groupindex][6]) do
                        if groupindex ~= v then
                                Char.JoinParty(v,groupindex)
                        end
                end
                FindGroupValue14(groupindex)
        end
end

function FindGroupValue20(npc,player)
        --if NLG.CanTalk(npc,player) then
                local FindGroupValue28
                if FindGroupValue2[player] == player then
                        FindGroupValue28 = "2\n            ******寻求组队******\n\n◎使用说明◎\n☆管理队列☆\n◆重新创建队列◆\n☆解散队列☆\n〖立刻出发〗\n【重新广播】"
                else
                        FindGroupValue28 = "2\n            ******寻求组队******\n\n◎使用说明◎\n☆查看现有队列☆\n◆创建新的队列◆\n☆离开队列☆"
                end
                NLG.ShowWindowTalked(player,npc,2,2,0,FindGroupValue28)
        --end
end

function FindGroupValue21(npc,player,Seqno,Select,Data)
        --if NLG.CanTalk(npc,player) then
                if Select ~= 2 then
                        if Seqno == 0 then
                                if tonumber(Data) == 1 then
                                        NLG.ShowWindowTalked(player,npc,0,2,999,FindGroupExplainMsg)
                                elseif tonumber(Data) == 2 then
                                        if FindGroupValue2[player] == player then
                                                if FindGroupValue5[player] then
                                                        FindGroupValue21(npc,player,700,0,0)
                                                else
                                                        NLG.SystemMessage(player,"就位确认状态不能移除队员。")
                                                end
                                        else
                                                FindGroupValue21(npc,player,509,32,0)
                                        end
                                elseif tonumber(Data) == 3 then
                                        FindGroupValue21(npc,player,9,32,0)
                                elseif tonumber(Data) == 4 then
                                        FindGroupValue14(player)
                                elseif tonumber(Data) == 5 then
                                        if FindGroupValue2[player] == player then
                                                if FindGroupValue5[player] then
                                                        FindGroupValue1[player][4] = #FindGroupValue1[player][6]+1
                                                        FindGroupValue18(player)
                                                else
                                                        NLG.SystemMessage(player,"正在就位确认。")
                                                end
                                        end
                                elseif tonumber(Data) == 6 then
                                        if Char.GetData(player,%对象_金币%) >= AnnCostGold then
                                                if FindGroupValue2[player] == player then
                                                        if FindGroupValue5[player] then
                                                                Char.SetData(player,%对象_金币%,Char.GetData(player,%对象_金币%)-AnnCostGold)
                                                                NLG.UpChar(player)
                                                                NLG.SystemMessage(player,"交出了 "..AnnCostGold.."魔币。")
                                                                local annmsg = FindGroupValue11(player).." 正在寻找"..(FindGroupValue1[player][4]-1).."名至少Lv"..FindGroupValue1[player][2].."的勇士一起前往"..FindGroupTarget[FindGroupValue1[player][1]][1].."!"
                                                                if FindGroupTargetLimet[FindGroupValue1[player][1]] then
                                                                        if FindGroupTargetLimet[FindGroupValue1[player][1]][8] then
                                                                                annmsg = annmsg..FindGroupTargetLimet[FindGroupValue1[player][1]][8]
                                                                        end
                                                                end
                                                                NLG.SystemMessage(-1,annmsg)
                                                        else
                                                                NLG.SystemMessage(player,"队伍已经在就位确认了。")
                                                        end
                                                else
                                                        NLG.SystemMessage(player,"你不是队长。")
                                                end
                                        else
                                                NLG.SystemMessage(player,"需要"..AnnCostGold.."魔币。")
                                        end
                                end
                        elseif Seqno >= 9 and Seqno <= 99 then
                                if tonumber(Data) <= 0 then
                                        local FindGroupValue40 = Seqno-10
                                        local FindGroupValue41
                                        local FindGroupValue42
                                        local FindGroupValue43 = 2
                                        local FindGroupValue28 = "2\n ◆◆◆◆◆◆请选择您的目的地◆◆◆◆◆◆\n"
                                        if Select == 32 then
                                                FindGroupValue42 = Seqno+1
                                                FindGroupValue41 = FindGroupValue40+1
                                        elseif Select == 16 then
                                                FindGroupValue42 = Seqno-1
                                                FindGroupValue41 = FindGroupValue40-1
                                        end
                                        for i = 1,6 do
                                                if type(FindGroupTarget[(FindGroupValue41*6+i)]) == "table" then
                                                        FindGroupValue28 = FindGroupValue28.."\n"..i.."."..FindGroupTarget[(FindGroupValue41*6+i)][1]
                                                else
                                                        FindGroupValue28 = FindGroupValue28.."\n"..i..".无"
                                                end
                                        end
                                        if #FindGroupTarget > (FindGroupValue41+1)*6 then
                                                FindGroupValue43 = FindGroupValue43 + 32
                                        end
                                        if FindGroupValue41 > 0 then
                                                FindGroupValue43 = FindGroupValue43 + 16
                                        end
                                        NLG.ShowWindowTalked(player,npc,2,FindGroupValue43,FindGroupValue42,FindGroupValue28)
                                else
                                        local FindGroupValue40 = Seqno-10
                                        if tonumber(Data) == 1 then
                                                FindGroupValue3[player][1] = FindGroupValue40*6+1
                                        elseif tonumber(Data) == 2 then
                                                FindGroupValue3[player][1] = FindGroupValue40*6+2
                                        elseif tonumber(Data) == 3 then
                                                FindGroupValue3[player][1] = FindGroupValue40*6+3
                                        elseif tonumber(Data) == 4 then
                                                FindGroupValue3[player][1] = FindGroupValue40*6+4
                                        elseif tonumber(Data) == 5 then
                                                FindGroupValue3[player][1] = FindGroupValue40*6+5
                                        elseif tonumber(Data) == 6 then
                                                FindGroupValue3[player][1] = FindGroupValue40*6+6
                                        end
                                        local FindGroupValue42 = 100
                                        local FindGroupValue43 = 34
                                        NLG.ShowWindowTalked(player,npc,0,FindGroupValue43,FindGroupValue42,FindGroupTarget[FindGroupValue3[player][1]][2])
                                end
                        elseif Seqno == 100 then
                                if Select == 32 then
                                        local FindGroupValue51 = FindGroupValue12(player,FindGroupValue3[player][1],FindGroupTargetLimet[FindGroupValue3[player][1]][4],0)
                                        if FindGroupValue51 == 0 then
                                                local FindGroupValue42 = 200
                                                local FindGroupValue43 = 2
                                                local FindGroupValue28 = "2\n ◆◆◆◆◆◆请设定您队伍的人数◆◆◆◆◆◆\n\n1人\n2人\n3人\n4人\n5人"
                                                NLG.ShowWindowTalked(player,npc,2,FindGroupValue43,FindGroupValue42,FindGroupValue28)
                                        elseif FindGroupValue51 == 1 then
                                                NLG.SystemMessage(player,"您的职业不符合队长的需求。")
                                        elseif FindGroupValue51 == 2 then
                                                NLG.SystemMessage(player,"您的魔币不足。")
                                        elseif FindGroupValue51 == 3 then
                                                NLG.SystemMessage(player,"您没有所需的消耗道具。")
                                        elseif FindGroupValue51 == 4 then
                                                NLG.SystemMessage(player,"您的等级太低。")
                                        elseif FindGroupValue51 == 5 then
                                                NLG.SystemMessage(player,"您没有所需的道具。")
                                        elseif FindGroupValue51 == 6 then
                                                NLG.SystemMessage(player,"您没有完成前置任务。")
                                        elseif FindGroupValue51 == 7 then
                                                NLG.SystemMessage(player,"您没有完成前置任务。")
                                        end
                                end
                        elseif Seqno == 200 then
                                if tonumber(Data) == 1 then
                                        FindGroupValue3[player][4] = 1
                                elseif tonumber(Data) == 2 then
                                        FindGroupValue3[player][4] = 2
                                elseif tonumber(Data) == 3 then
                                        FindGroupValue3[player][4] = 3
                                elseif tonumber(Data) == 4 then
                                        FindGroupValue3[player][4] = 4
                                elseif tonumber(Data) == 5 then
                                        FindGroupValue3[player][4] = 5
                                end
                                local FindGroupValue42 = 300
                                local FindGroupValue43 = 6
                                local FindGroupValue44 = FindGroupTargetLimet[FindGroupValue3[player][1]][4] or 0
                                local FindGroupValue28 = "\n ◆◆◆◆◆◆设置额外的等级限制◆◆◆◆◆◆\n\n请输入您本队限制的最低等级后点击【是】\n\n*最低等级可设置范围("..FindGroupValue44.."-"..Char.GetData(player,%对象_等级%)..") \n\n超出此范围的设置将默认为"..FindGroupValue44
                                NLG.ShowWindowTalked(player,npc,1,FindGroupValue43,FindGroupValue42,FindGroupValue28)
                        elseif Seqno == 300 then
                                if Select == 4 then
                                        local FindGroupValue44 = FindGroupTargetLimet[FindGroupValue3[player][1]][4] or 0
                                        if tonumber(Data) ~= nil and math.floor(tonumber(Data)) > FindGroupValue44 and math.floor(tonumber(Data)) <= Char.GetData(player,%对象_等级%) then
                                                FindGroupValue44 = math.floor(tonumber(Data))
                                        end
                                        FindGroupValue3[player][2] = FindGroupValue44
                                        local FindGroupValue42 = 400
                                        local FindGroupValue43 = 2
                                        local FindGroupValue28
                                        if ClassBalance == 1 then
                                                FindGroupValue28 = "4\n ◆◆◆◆◆请选择您预期队员的职业◆◆◆◆◆\n*注意:当前启用职业平衡模式。只能选择接受任何职业。\n\n1.接受任何职业\n2.接受任何职业\n3.接受任何职业\n4.接受任何职业\n5.接受任何职业"
                                        else
                                                FindGroupValue28 = "4\n ◆◆◆◆◆请选择您预期队员的职业◆◆◆◆◆\n*如果您自己的职业不在您所选择的范围内,将设置为接受任何职业的组队。\n\n1.接受任何职业\n2.接受剑、斧、骑、弓、格、魔、传\n3.接受弓箭手、格斗士和魔术师\n4.接受格斗士和魔法师\n5.只接受魔法师"
                                        end
                                        NLG.ShowWindowTalked(player,npc,2,FindGroupValue43,FindGroupValue42,FindGroupValue28)
                                end
                        elseif Seqno == 400 then
                                if tonumber(Data) ~= nil and tonumber(Data) >= 1 and tonumber(Data) <= 5 then
                                        local FindGroupValue45 = 1
                                        if FindGroupValue10(Char.GetData(player,%对象_职类ID%)) >= tonumber(Data) then
                                                FindGroupValue45 = tonumber(Data)
                                        end
                                        FindGroupValue3[player][3] = FindGroupValue45
                                        local FindGroupValue42 = 505
                                        local FindGroupValue43 = 6
                                        local FindGroupValue28 = "\n请输入您的组队说明后点击【是】"
                                        NLG.ShowWindowTalked(player,npc,1,FindGroupValue43,FindGroupValue42,FindGroupValue28)
                                end
                        elseif Seqno == 505 then
                                local FindGroupValue28
                                if string.len(Data) > 60 then
                                        FindGroupValue28 = string.sub(Data,1,60)
                                elseif Data == "" then
                                        FindGroupValue28 = "欢迎加入我的队列。祝我们游戏愉快。"
                                else
                                        FindGroupValue28 = Data
                                end
                                FindGroupValue3[player][5] = FindGroupValue28
                                local FindGroupValue46 = 0
                                for i = 1,5 do
                                        if FindGroupValue3[player][i] == nil then
                                                FindGroupValue46 = 1
                                                break
                                        end
                                end
                                if FindGroupValue46 == 0 then
                                        FindGroupValue15(player,FindGroupValue3[player][1],FindGroupValue3[player][2],FindGroupValue3[player][3],FindGroupValue3[player][4],FindGroupValue3[player][5])
                                end
                        elseif Seqno >= 509 and Seqno <= 599 then
                                local FindGroupValue37 = FindGroupValue16(player)
                                if tonumber(Data) <= 0 then
                                        local FindGroupValue40 = Seqno-510
                                        local FindGroupValue41
                                        local FindGroupValue42
                                        local FindGroupValue43 = 2
                                        local FindGroupValue28 = "1\n ☆☆☆☆☆☆请选择您要查看的队伍☆☆☆☆☆☆"
                                        if Select == 32 then
                                                FindGroupValue42 = Seqno+1
                                                FindGroupValue41 = FindGroupValue40+1
                                        elseif Select == 16 then
                                                FindGroupValue42 = Seqno-1
                                                FindGroupValue41 = FindGroupValue40-1
                                        end
                                        for i = 1,8 do
                                                if type(FindGroupValue37[(FindGroupValue41*8+i)]) == "number" then
                                                        if Char.GetData(FindGroupValue37[(FindGroupValue41*8+i)],(%对象_序%)) == (%对象类型_人%) then
                                                                --FindGroupValue28 = FindGroupValue28.."\n"..i.."."..FindGroupTarget[FindGroupValue1[FindGroupValue37[(FindGroupValue41*8+i)]][1]][1].." "..FindGroupValue11(FindGroupValue37[(FindGroupValue41*8+i)]);
                                                                FindGroupValue28 = FindGroupValue28.."\n"..i.."."..FindGroupTarget[FindGroupValue1[FindGroupValue37[(FindGroupValue41*8+i)]][1]][1].." ("..(JobName[Char.GetData(FindGroupValue37[(FindGroupValue41*8+i)],%对象_职类ID%)] or "其他职业").." Lv"..Char.GetData(FindGroupValue37[(FindGroupValue41*8+i)],%对象_等级%)..")"
                                                        else
                                                                FindGroupValue28 = FindGroupValue28.."\n"..i..".无"
                                                        end
                                                else
                                                        FindGroupValue28 = FindGroupValue28.."\n"..i..".无"
                                                end
                                        end
                                        if #FindGroupValue37 > (FindGroupValue41+1)*8 then
                                                FindGroupValue43 = FindGroupValue43 + 32
                                        end
                                        if FindGroupValue41 > 0 then
                                                FindGroupValue43 = FindGroupValue43 + 16
                                        end
                                        NLG.ShowWindowTalked(player,npc,2,FindGroupValue43,FindGroupValue42,FindGroupValue28)
                                else
                                        local FindGroupValue40 = Seqno-510
                                        if tonumber(Data) == 1 then
                                                if FindGroupValue37[FindGroupValue40*8+1] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+1]
                                                end
                                        elseif tonumber(Data) == 2 then
                                                if FindGroupValue37[FindGroupValue40*8+2] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+2]
                                                end
                                        elseif tonumber(Data) == 3 then
                                                if FindGroupValue37[FindGroupValue40*8+3] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+3]
                                                end
                                        elseif tonumber(Data) == 4 then
                                                if FindGroupValue37[FindGroupValue40*8+4] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+4]
                                                end
                                        elseif tonumber(Data) == 5 then
                                                if FindGroupValue37[FindGroupValue40*8+5] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+5]
                                                end
                                        elseif tonumber(Data) == 6 then
                                                if FindGroupValue37[FindGroupValue40*8+6] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+6]
                                                end
                                        elseif tonumber(Data) == 7 then
                                                if FindGroupValue37[FindGroupValue40*8+7] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+7]
                                                end
                                        elseif tonumber(Data) == 8 then
                                                if FindGroupValue37[FindGroupValue40*8+8] then
                                                        FindGroupValue3[player][6] = FindGroupValue37[FindGroupValue40*8+8]
                                                end
                                        end
                                        if FindGroupValue3[player][6] then
                                                local FindGroupValue42 = 600
                                                local FindGroupValue43 = 6
                                                local FindGroupValue47 = FindGroupValue1[FindGroupValue3[player][6]][1]
                                                local FindGroupValue48 = FindGroupValue3[player][6]
                                                local FindGroupValue28 = FindGroupTarget[FindGroupValue47][1].."\n要求等级:"..FindGroupValue1[FindGroupValue48][2].."     目标人数:"..FindGroupValue1[FindGroupValue48][4].."\n队长:"..FindGroupValue11(FindGroupValue48).."\n"..FindGroupValue1[FindGroupValue48][5].."\n其他队员:"
                                                for i = 1,#FindGroupValue1[FindGroupValue48][6] do
                                                        FindGroupValue28 = FindGroupValue28.."\n"..i.."."..FindGroupValue11(FindGroupValue1[FindGroupValue48][6][i])
                                                end
                                                FindGroupValue28 = FindGroupValue28.."\n*选择【是】加入队伍"
                                                NLG.ShowWindowTalked(player,npc,0,FindGroupValue43,FindGroupValue42,FindGroupValue28)
                                        end
                                end
                        elseif Seqno == 600 then
                                if Select == 4 then
                                        FindGroupValue17(player,FindGroupValue3[player][6])
                                end
                        elseif Seqno == 700 then
                                if type(FindGroupValue1[player]) == "table" then
                                        local FindGroupValue28 = "2\n ☆☆☆☆☆选择要移出队列的队员☆☆☆☆☆\n"
                                        for i = 1,#FindGroupValue1[player][6] do
                                                FindGroupValue28 = FindGroupValue28.."\n"..i.."."..FindGroupValue11(FindGroupValue1[player][6][i])
                                        end
                                        NLG.ShowWindowTalked(player,npc,2,2,800,FindGroupValue28)
                                end
                        elseif Seqno == 800 then
                                if type(FindGroupValue1[player]) == "table" then
                                        if tonumber(Data) == 1 then
                                                if FindGroupValue1[player][6][1] then
                                                        NLG.SystemMessage(FindGroupValue1[player][6][1],"您已被队长移出队列。")
                                                        FindGroupValue14(FindGroupValue1[player][6][1])
                                                end
                                        elseif tonumber(Data) == 2 then
                                                if FindGroupValue1[player][6][2] then
                                                        NLG.SystemMessage(FindGroupValue1[player][6][2],"您已被队长移出队列。")
                                                        FindGroupValue14(FindGroupValue1[player][6][2])
                                                end
                                        elseif tonumber(Data) == 3 then
                                                if FindGroupValue1[player][6][3] then
                                                        NLG.SystemMessage(FindGroupValue1[player][6][3],"您已被队长移出队列。")
                                                        FindGroupValue14(FindGroupValue1[player][6][3])
                                                end
                                        elseif tonumber(Data) == 4 then
                                                if FindGroupValue1[player][6][4] then
                                                        NLG.SystemMessage(FindGroupValue1[player][6][4],"您已被队长移出队列。")
                                                        FindGroupValue14(FindGroupValue1[player][6][4])
                                                end
                                        end
                                end
                        end
                end
        --end
end

function FindGroupValue22(npc)
        local FindGroupValue50 = os.time()
        for k,v in pairs(FindGroupValue6) do
                if FindGroupValue50 > v[1] then
                        if v[2] >= FindGroupValue1[k][4] then
                                FindGroupValue19(k)
                        else
                                for i,j in pairs(FindGroupValue1[k][6]) do
                                        if FindGroupValue4[j][1] then
                                                FindGroupValue4[j] = nil
                                        else
                                                FindGroupValue14(j)
                                        end
                                end
                                FindGroupValue5[k] = 1
                                FindGroupValue6[k] = nil
                                NLG.SystemMessage(k,"就位确认失败!重新开始等待新队员加入。")
                        end
                end
        end
end

function FindGroupValue23(npc)
        Char.SetTalkedEvent(nil,"FindGroupValue20",npc)
        Char.SetWindowTalkedEvent(nil,"FindGroupValue21",npc)
        return true
end

if FindGroupValue24 == nil then
        for i = 1,#FindGroupNpcMap do
                local FindGroupValue49 = NL.CreateNpc(nil,"FindGroupValue23")
                Char.SetData(FindGroupValue49,%对象_形象%,FindGroupNpcMetamo)
                Char.SetData(FindGroupValue49,%对象_原形%,FindGroupNpcMetamo)
                Char.SetData(FindGroupValue49,%对象_地图%,FindGroupNpcMap[i])
                Char.SetData(FindGroupValue49,%对象_X%,FindGroupNpcPosX[i])
                Char.SetData(FindGroupValue49,%对象_Y%,FindGroupNpcPosY[i])
                Char.SetData(FindGroupValue49,%对象_方向%,FindGroupNpcDir[i])
                Char.SetData(FindGroupValue49,%对象_原名%,FindGroupNpcName)
                NLG.UpChar(FindGroupValue49)
                FindGroupValue24 = FindGroupValue49
        end
        Char.SetLoopEvent(nil,"FindGroupValue22",FindGroupValue24,1000)
end


回复

使用道具 举报

Archiver|魔力研究社

GMT+8, 2025-5-12 19:36 , Processed in 0.129521 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表