function c9010071_On_Talk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) local rolelevel = role.GetRoleLevel(MapID, InstanceID, RoleID) local a = role.GetRoleItemNum(RoleID, 6600210) --Компас сутки local b = role.GetRoleItemNum(RoleID, 6600572) --Компас неделя local c = role.GetRoleItemNum(RoleID, 6600573) --Компас месяц if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 930203) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 930204) msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 100002) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then if rolelevel < 60 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 930208) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 26) msg.AddMsgEvent(MsgID, 1, 100002) msg.DispatchRoleMsgEvent(RoleID, MsgID) else if a>=1 or b>=1 or c>=1 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, 3390518312, 402, 40, 1022) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 930205) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 26) msg.AddMsgEvent(MsgID, 1, 100002) msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end end aux.RegisterCreatureEvent(9010071, 7, "c9010071_On_Talk")