function NPC6040164_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) --营地to战舰 local m1 = map.GetMapScriptData(MapID,InstanceID,1,5) local m2 = map.GetMapScriptData(MapID,InstanceID,1,6) if TalkIndex == -1 then if m1 == 1 and m2 ~= 1 then --弗雷斯将军存在 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207194) --战舰传送官:弗雷斯将军不慎被敌兵俘虏了,十分钟之后将被杀害,请速去把他救出来。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 207195) --我想去近处的船上看看 msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207183) --我想去解救弗雷斯将军 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif m2 == 1 and m1 ~= 1 then --血泣存在 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207182) --战舰传送官:大批海盗正在占领我方舰艇,将在十分钟之后得手,血泣舰长需要支援 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 207181) --请送我去支援血泣舰长 msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207196) --我想去远处的船上看看 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif m1 == 1 and m2 == 1 then --两个都存在 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207197) --战舰传送官:大批海盗正在占领我方舰艇,弗雷斯将军也不慎被敌兵俘虏了,这一切都将在十分钟之内结束,时间不多了! msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 207181) --请送我去支援血泣舰长 msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207183) --我想去解救弗雷斯将军 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207180) --战舰传送官:现在战舰上空无一物,只有到了特殊时期才会有特殊时期发生。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 207195) --我想去近处的船上看看 msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207196) --我想去远处的船上看看 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 4 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 42412/50, 3683, 40498/50) elseif TalkIndex == 5 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 31838/50, 3683, 54744/50) end end function NPC6040165_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) --营地to训练场 if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207185) --训练营传送官:如果你给我100战场金币的话,我可以送你进入训练营 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 20) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 20 then if role.GetWarGold(MapID, InstanceID,RoleID) >= 100 then role.SetWarGold(MapID, InstanceID, RoleID, -100) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 8677/50, 3253, 35431/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207186) --训练营传送官:你的钱不够,无法传送 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end function NPC6040167_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) --营地to怪区 if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207187) --打野区传送员:如果你给我100战场金币的话,我可以送你去野怪区 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 20) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 20 then if role.GetWarGold(MapID, InstanceID,RoleID) >= 100 then role.SetWarGold(MapID, InstanceID, RoleID, -100) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 25033/50, 2722, 41451/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207188) --打野区传送员:你的钱不够,无法传送 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end function NPC6040168_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) --怪区to营地 if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207189) --打野区传送员:你确定要传送回营地么? msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 20) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 20 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 22520/50, 2728, 9862/50) end end function NPC6040169_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) --船to营地 if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207190) --舰艇传送员:你确定要传送回营地么? msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 20) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 20 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 22520/50, 2728, 9862/50) end end aux.RegisterCreatureEvent(6040164, 7, "NPC6040164_OnTalk") aux.RegisterCreatureEvent(6040165, 7, "NPC6040165_OnTalk") aux.RegisterCreatureEvent(6040167, 7, "NPC6040167_OnTalk") aux.RegisterCreatureEvent(6040168, 7, "NPC6040168_OnTalk") aux.RegisterCreatureEvent(6040169, 7, "NPC6040169_OnTalk")