--dmap2ʥ�㵺�����ˣ�һ������˵�����޸ģ� function chuansong_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 650330) --���׿�ŵ��\n ʥ�㵺���������������ĵ��죬����ħ������Ҫ���ᵺ�ϵ�Զ����������ͼռ��ʥ�㵺����Ը��ǰȥ�������ǵ��������𣿡� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100001) --��ȷ���� msg.AddMsgEvent(MsgID, 21, 5) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100002) --��ȡ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level < 60 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 650331) --�׿�ŵ��\n �Բ���ֻ�д���60������Ҳſ��Բ���ս�� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 5) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100001) --��ȷ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) else if role.GetBagFreeSize(RoleID) < 2 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 444266) --���᣺����ʣ�಻�㾯�� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, -1) -- ȷ����ť msg.AddMsgEvent(MsgID, 1, 100001) -- ��ȷ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) --������Ϣ else if role.GetRoleItemNum(RoleID, 3010138) >= 1 then role.RemoveFromRole(MapID, InstanceID, RoleID, 3010138, 1, 420) role.RoleGotoNewMap(MapID, InstanceID, RoleID, 2962677164, 22005/50, 2811, 10518/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 650332) --�׿�ŵ��\n �Բ���������û��ʥ�����ʥ�������ÿ�����׿���������ȡ�� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 5) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100002) --��ȡ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end --[[local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 100012) --κ���ɣ�\n �Բ���ֻ�д���60������Ҳſ��Բ���ս�� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100001) --��ȷ���� msg.DispatchRoleMsgEvent(RoleID, MsgID)]] end end aux.RegisterCreatureEvent(4020162, 7, "chuansong_OnTalk") function jinruemoshangu_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207501) --���᣺\n ��ħɽ�����ʺ���λ�����ĵط�����������ȴ��һ��λ�õ���������ռ����ô��Ҿ�ȫ��ȥ�������ɡ� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100001) --��ȷ���� msg.AddMsgEvent(MsgID, 21, 5) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100002) --��ȡ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level < 60 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20,207502) --���᣺\n �Բ���ֻ�д���60������Ҳſ��Բ���ս�� msg.AddMsgEvent(MsgID, 24,TargetID) --npcid msg.AddMsgEvent(MsgID, 21,5) --ȡ����ť msg.AddMsgEvent(MsgID, 1,100001) --��ȷ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) else if role.GetBagFreeSize(RoleID) < 5 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207577) --���᣺����ʣ�಻�㾯�� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, -1) -- ȷ����ť msg.AddMsgEvent(MsgID, 1, 100001) -- ��ȷ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) --������Ϣ else if role.GetRoleItemNum(RoleID, 4810172) >= 1 then role.RemoveFromRole(MapID, InstanceID, RoleID, 4810172, 1, 420) role.RoleGotoNewMap(MapID, InstanceID, RoleID, 2962677420, 949,4962,108) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20,207503) --���᣺\n �Բ���������û�ж�ħɽ��̽��֤������ħɽ��̽��֤����ÿ�������ŷ���ɶӳ�������ȡ�� msg.AddMsgEvent(MsgID, 24,TargetID) --npcid msg.AddMsgEvent(MsgID, 21,5) --ȡ����ť msg.AddMsgEvent(MsgID, 1,100002) --��ȡ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end end end aux.RegisterCreatureEvent(1086579, 7, "jinruemoshangu_OnTalk") function emoshanguchuanhsong_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) local x = role.GetWarGold(MapID, InstanceID,RoleID) if TalkIndex == -1 then if map.GetMapScriptData(MapID,InstanceID,1,7) ~= 1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207554) --��ܽ�ȣ� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif map.GetMapScriptData(MapID,InstanceID,1,7) == 0 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207556) --��ܽ�ȣ� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207511) --��ܽ�ȣ�\n ��ħɽ����һ���Ӵ�ĵط����������Ǻ�����ʱ��ģ���ô����ף��һ��֮���ɡ����͵�ÿ���ط���Ҫ����ͬ�ķ��õġ�\n ���͵����ء��������׹ȡ��ƶ�ɭ�ֺ��ﶡ�����м����\n ���͵����ޱ�ѩɽ�������ߵغ������ҵظ�10ս�����\n ���͵�������Ͽ�Ⱥ��ֺ�Ͽ���м��30ս�����\n ���͵����ܲر���60ս����� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 207512) --���͵����� msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207513) --���͵��������׹� msg.AddMsgEvent(MsgID, 21, 6) msg.AddMsgEvent(MsgID, 1, 207514) --���͵��ƶ�ɭ�� msg.AddMsgEvent(MsgID, 21, 7) msg.AddMsgEvent(MsgID, 1, 207515) --���͵����ޱ�ѩɽ msg.AddMsgEvent(MsgID, 21, 8) msg.AddMsgEvent(MsgID, 1, 207516) --���͵������ߵ� msg.AddMsgEvent(MsgID, 21, 9) msg.AddMsgEvent(MsgID, 1, 207517) --���͵������ҵ� msg.AddMsgEvent(MsgID, 21, 10 ) msg.AddMsgEvent(MsgID, 1, 207518) --���͵�������Ͽ�Ⱥ��ֺ�Ͽ���м� msg.AddMsgEvent(MsgID, 21, 11 ) msg.AddMsgEvent(MsgID, 1, 207519) --���͵����ܲر��� msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 4 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 45700/50,4212,4400/50) elseif TalkIndex == 5 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 19350/50,4458,13000/50) elseif TalkIndex == 6 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 35531/50,4647,18676/50) elseif TalkIndex == 7 then if x >= 10 then role.SetWarGold(MapID, InstanceID,RoleID,-10) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 16300/50,5025,31050/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --������ս����Ҳ��� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 8 then if x >= 10 then role.SetWarGold(MapID, InstanceID,RoleID,-10) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 19900/50,5866,35750/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --������ս����Ҳ��� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 9 then if x >= 10 then role.SetWarGold(MapID, InstanceID,RoleID,-10) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 24800/50,7912,33100/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --������ս����Ҳ��� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 10 then if x >= 30 then role.SetWarGold(MapID, InstanceID,RoleID,-30) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 46500/50,5336,32950/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --������ս����Ҳ��� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 11 then if x >= 60 then if map.GetMapScriptData(MapID,InstanceID,1,8) == 1 and map.GetMapScriptData(MapID,InstanceID,1,9) == 1 then role.SetWarGold(MapID, InstanceID,RoleID,-60) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 5600/50,10,50750/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207569) --������ս����Ҳ��� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) end else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --������ս����Ҳ��� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --ȷ�� msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end aux.RegisterCreatureEvent(1086571, 7, "emoshanguchuanhsong_OnTalk") function likaiemoshangu_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207568) --���᣺\n ��ħɽ�����ʺ���λ�����ĵط�����������ȴ��һ��λ�õ���������ռ����ô��Ҿ�ȫ��ȥ�������ɡ� msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100001) --��ȷ���� msg.AddMsgEvent(MsgID, 21, 5) --ȡ����ť msg.AddMsgEvent(MsgID, 1, 100002) --��ȡ���� msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, 3424073512, 610,23094,669) end end aux.RegisterCreatureEvent(1086572, 7, "likaiemoshangu_OnTalk")